Overview

When you launch Skynet via webbrowser you will see Skynet Control Panel. This is the front-end of Skynet. By default, no admin password is set - you must define password hash and place generated hash into config file if you want secure access to Control Panel. At first launch you will see a monit about empty password and information about password hash generation. With Skynet Panel you can control your Skynet - sending requests, receiving resonses, sending commands and checks cluster status. Every cluster has its own Control Panel, so you can control every Skynet Cluster by opening it in webbrowser. Skynet Panel is also a debugger for your Event Listeners - with section "Debug" you can debug your code - informations about debugger are in "Features: Debugger" documentation section. You can also control Skynet by CLI Mode - usage of CLI mode is described in "CLI Mode" section.

skynet.php or skynet_dev.php

Skynet Control Panel can work in 3 modes: connections view, database view and text logs view.
You can switch between this two views by switching buttons at the top right corner of Skynet Panel (CONNECTIONS | DATABASE | TXT LOGS).



In connections view you can sending requests, receiving responses and controls all of data. In database view you can view, edit and delete records stored in Skynet's database like logs, clusters list, options, registry and more.

Connection View

Connection View has 6 sections:

- Cluster summary informations (1)
- Connection mode controller (2)
- Clusters list (3)
- Status and debugger (4)
- Webconsole (5)
- Connection Data (6)



1) Cluster summary informations
This section shows clusters summary and most important informations about actual clusters.
- My address - cluster address
- Chain - actual chain value (in every connection chain value is incrementing) and time of last update
- Skynet Key ID - your Skynet Key ID
- Sleeped - information about Cluster state - sleeped cluster not sends requests and not generates responses

- Cluster IP - cluster (server) IP address
- Your IP - your IP address
- Encryption - data encryption method (default: OpenSSL)
- Connections - connections provider (default: CURL)

- Broadcasting clusters - number of actual broadcasting clusters
- Clusters is DB - number of stored in database connections
- Connections attemts - number of actual connections
- Successful connections - number of finished actual connections



2) Connection mode controller
This is the switch between connections modes. Every Skynet cluster can be in 3 different states:
- Idle - when no connections are sending
- Single - when you connects to single clusters
- Broadcast - when you connects to all clusters stored in database at once



You can switch between modes by clicking on one of this modes - Skynet will connect and show connection data in "Connection Data" section (6).
Connection will be executed via ajax request, so when you change mode Control Panel will not be refreshed and all data will be sent "on fly".

3) Clusters list
This is the clusters list stored in database.
When you connects to cluster or another cluster is connects with your cluster then Skynet stores other cluster address in database.



Every cluster entry has 4 fields:

A) Status (colored square on left whitch shows actual state: GREY icon - idle, GREEN icon - connected, RED icon - connection error.
B) Address - this is the cluster remote address (you can click on address to launch its Control Panel)
C) Ping - ping in miliseconds (if there is no connection then 0 wil be shown)
D) Connect button - if you click on "CONNECT" then command for connect to selected cluster will be placed in webconsole and next if you send this command via "Send request" then single connection with cluster will be executed.



4) Status and debugger
You have 6 tabs here:
- States - this is the cluster states list generated by Skynet (every part of Skynet can generate its own state). This is a simple info about status of different parts of Skynet
- Errors - when errors occurs then it will be shown in this tab. If there is no errors then list will be empty
- Config - list of all config values placed in your config file
- Console - if you sending commands from webconsole then commands output from console will be shown here
- Debug - output of debugger (debugger usage is described in section "Feature: Debugger")
- Listeners - informations about Event Listeners (Listners / Loggers). Your custom listeners are marked here by green colour.

In green window you will see Skynet Monitor output.



You can switch between tabs by clicking on Tab name.
All of data placed here are updated via Ajax when you are connecting to other cluster, so data here is always actual.

5) Webconsole
This is a webconsole for sending commands and requests.
You can send commands and parameters from here by typing commands and click on "Send request" button.
At the top of webconsole a shortcuts list to commands given from listeners is placed. When you will choose a command from this list then command will be placed in console window.
You can define command placed here in your own listeners (more about this is in "registerCommands" section.



6) Connection Data
This is the output from connections. All of data placed here are generated via ajax-requests "on fly".
There is 3 tabs:



- Plain data - displays all of data (params, commands, etc.) in plain text
- Encrypted data - displays the same data but encrypted (Skynet sends encryted data, so you will see here how your encrypted fields looks like in connection)
- Raw data - displays raw data whitch is sending and receiving from cluster.


Connection fields are splitted into sections:
- Cluster Info - information about connected cluster
- Request Fields {sended} (plain) - raw requested to cluster fields
- Response Fields {received} (decrypted) - encrypted fields from cluster response
- Request Fields {sended} (encrypted) - encrypted requested to cluster fields
- Response Fields {received} (raw) - raw fields from cluster response
- SENDED RAW DATA - raw sended data packet
- RECEIVED RAW DATA - raw received response packet


All "_" and "@_" prefixed parameters are internal Skynet parameters (if not translated fields are displayed).

Connection data is built from 2 parts: request and response.
Request fields are fields whitch are sended to other cluster when connection is executed.
Response fields are fields whitch are received from other cluster when connection is executed.
All of both parts are built from parameters and commands list - every field is a pair "key=value".
Most of this parameters are intenal Skynet parameters like cluster address, version, time, key, etc.... You can disable internal parameters display by disabling it in config file.

When you connects on "broadcast mode", or by defining more than one receiver then all of connections data will be shown here and its will be numered by "@Connection 1,2,3, etc...".
If there will be an error with receiving response then no data will be shown here.

At the top of connections you can see form to setting connection interval.
If value greather than "0" is set then interval will work and Skynet will auto-relaunchs connections "on fly".



From here you can also set below options:

- Display internal params - if YES then internal Skynet parameters (like Skynet ID, time, hash, etc.) will be displayed
- Display @echo - if YES then interal @echo returned parameters will be displayed (Skynet attachs requests fields to response and prefix them by @ - you can disable this option in config file)

In left top corner you can also Logout from Panel and change colour theme (default is "dark"):



Database View

In this view you have access to Skynet's database. Every cluster has its own database created dynamicaly in cluster directory (if SQLite database type is choosen).
You have access to all of database tables and records here. Records can be edited and deleted from here (expect "Chain value" record).



At the top of window tables list is placed. You can choose a table from here and then when you click on "Show stored data" all records will be show.



You can sort records by fields in defined order by change options in form. Records are paginated, so you can choose actual page via "Page" list and click "Execute".
To delete all records in actual table click on the "DELETE ALL RECORDS" button.

Every record has 3 buttons:

- Generate TXT - generates .txt file from choosen record
- Edit - opens record for edition
- Delete - deletes choosen record from database



You can define and create you own tables in Event Listeners (more info about it is in "registerDatabase" section).

By clicking on "New record" button you can put new record into table manualy.



- Clusters - stores clusters list
- Clusters (corrupted/blocked) - stores clusters with connection problems (when Skynet cluster not responds then Skynet marks it as corrupted)
- Registry - stores registry options`
- Options - stores configuration
- Chain - stores actual chain value
- Logs: user logs - stored user logs
- Logs: Responses - stored responses
- Logs: Requests - stored requests
- Logs: Echo - stored echo commands
- Logs: Broadcasts - stored broadcast commands
- Logs: Errors - stored errors
- Logs: Access Errors - stored security errors (unathorized access to Panel and incorrect KEY ID in connections)
- Logs: Self-updates - stored update procedures


Information about newest versions



At the top left corner after link to GitHub Skynet displays information about newest version available on GitHub. You can disable new versions check in config file.

TXT Logs View

This view allow you to browse generated by Skynet txt log files. In this panel you can browse, read, and delete logs saved in your logs directory.
By default, Skynet displays all stored logs:



When you will click on filename then log will be open in new window.
You can also delete specified logs by clicking on "Delete" button.

If you want to display logs only from specified event you can choose Event from list:



If you choose option from list then Skynet will display only logs matches to pattern.
As you see table is splitted by columns - Skynet parses this data from filenames whitch are generated by special pattern.
Thanks to that you can easy reads your logs finding files by fields:

- Filename - log filename
- Time - generation time
- Event - event type
- Context - information if log was saved when request/response was sended or when was received
- Cluster - cluster address whitch generated log file

Logs created when sending data are marked by green colour.
You can also delete all log files by clicking on "Delete ALL TXT FILES" - when button will be clicked on "All" files then all files will be deleted.
If it will be clicked when only specified event logs are displayed then only these files will be erased.
Full API Documentation is included in Skynet packages available on GitHub.