diff --git a/app/pages/config.php b/app/pages/config.php index cbc2a7f..ee2fcaf 100644 --- a/app/pages/config.php +++ b/app/pages/config.php @@ -94,6 +94,8 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { break; default: if ($userObject->hasRight($user_id, 'view config file')) { + require '../app/classes/agent.php'; + $agentObject = new Agent($dbWeb); include '../app/templates/config-list.php'; } else { include '../app/templates/unauthorized.php'; diff --git a/app/templates/config-list.php b/app/templates/config-list.php index 44a3615..f947fc0 100644 --- a/app/templates/config-list.php +++ b/app/templates/config-list.php @@ -11,47 +11,95 @@ echo "\n"; ?>
-

platforms configuration  add

+

platforms configuration  add new

- +getAgentDetails($platform_array['id']); +?>
-
-
-
- platform id : +
+ +
+ + platform ()
-
- edit + +
+ +
+
+ +
+
+ edit platform - delete + delete platform - delete + delete platform -
-
+
+
+ +
+
$value) { if ($key === 'id') continue; ?> -
-
- : +
+
+ : +
+
+ +
-
- + + +
+
+

jilo agents on platform () +
+ total   + + add new + +

+ + + +
+
+
+
+ agent id : +
+ +
+ $value) { + if ($key === 'id') continue; +?> +
+
+ : +
+
+ +
+
+ +
+
-
-
- configured jilo agents: -
-
- 0 - configure -
+ +
diff --git a/doc/jilo-web.agents.schema b/doc/jilo-web.agents.schema new file mode 100644 index 0000000..72432c0 --- /dev/null +++ b/doc/jilo-web.agents.schema @@ -0,0 +1,5 @@ +INSERT INTO jilo_agent_types VALUES(1,'jvb','/jvb'); +INSERT INTO jilo_agent_types VALUES(2,'jicofo','/jicofo'); +INSERT INTO jilo_agent_types VALUES(3,'prosody','/prosody'); +INSERT INTO jilo_agent_types VALUES(4,'nginx','/nginx'); +INSERT INTO jilo_agent_types VALUES(5,'jibri','/jibri'); diff --git a/doc/jilo-web.schema b/doc/jilo-web.schema index 0413997..919ef66 100644 --- a/doc/jilo-web.schema +++ b/doc/jilo-web.schema @@ -34,10 +34,11 @@ CREATE TABLE platforms ( CREATE TABLE jilo_agents ( id INTEGER PRIMARY KEY AUTOINCREMENT, platform_id INTEGER NOT NULL, - type_id INTEGER NOT NULL, + agent_type_id INTEGER NOT NULL, url TEXT NOT NULL, secret_key TEXT, - FOREIGN KEY (platform_id) REFERENCES platforms(id) + FOREIGN KEY (platform_id) REFERENCES platforms(id), + FOREIGN KEY (agent_type_id) REFERENCES jilo_agent_types(id) ); CREATE TABLE jilo_agent_types ( id INTEGER PRIMARY KEY AUTOINCREMENT,