mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
Starting the useful classes for the new networkmaps.
This commit is contained in:
parent
c5baf3670b
commit
f90ed7a05b
43
pandora_console/include/class/Map.class.php
Normal file
43
pandora_console/include/class/Map.class.php
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// Pandora FMS - http://pandorafms.com
|
||||||
|
// ==================================================
|
||||||
|
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||||
|
// Please see http://pandorafms.org for full contribution list
|
||||||
|
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License
|
||||||
|
// as published by the Free Software Foundation; version 2
|
||||||
|
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Include
|
||||||
|
* @subpackage Maps
|
||||||
|
*/
|
||||||
|
|
||||||
|
class Map {
|
||||||
|
protected $id = null;
|
||||||
|
|
||||||
|
public function __construct($id) {
|
||||||
|
$this->id = $id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function show() {
|
||||||
|
?>
|
||||||
|
<div class="map">
|
||||||
|
<svg width="800" height="800" pointer-events="all" style="border: 2px solid red;">
|
||||||
|
<g>
|
||||||
|
<circle id="node_10" class="node" r="5" style="fill: rgb(128, 186, 39);" cx="100" cy="100"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
33
pandora_console/include/class/Networkmap.class.php
Normal file
33
pandora_console/include/class/Networkmap.class.php
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// Pandora FMS - http://pandorafms.com
|
||||||
|
// ==================================================
|
||||||
|
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
||||||
|
// Please see http://pandorafms.org for full contribution list
|
||||||
|
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License
|
||||||
|
// as published by the Free Software Foundation; version 2
|
||||||
|
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @package Include
|
||||||
|
* @subpackage Networkmap
|
||||||
|
*/
|
||||||
|
|
||||||
|
class Networkmap extends Map {
|
||||||
|
public function __construct($id) {
|
||||||
|
parent::__construct($id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function show() {
|
||||||
|
parent::show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
@ -158,8 +158,10 @@ function maps_is_visualmap($id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function maps_show($id) {
|
function maps_show($id) {
|
||||||
|
require_once("include/class/Map.class.php");
|
||||||
|
|
||||||
if (maps_is_networkmap($id)) {
|
if (maps_is_networkmap($id)) {
|
||||||
require_once("include/functions_networkmaps.php");
|
require_once("include/class/Networkmap.class.php");
|
||||||
|
|
||||||
$map = new Networkmap($id);
|
$map = new Networkmap($id);
|
||||||
$map->show();
|
$map->show();
|
||||||
@ -168,24 +170,4 @@ function maps_show($id) {
|
|||||||
//TODO VISUAL
|
//TODO VISUAL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class Map {
|
|
||||||
protected $id = null;
|
|
||||||
|
|
||||||
public function __construct($id) {
|
|
||||||
$this->id = $id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function show() {
|
|
||||||
?>
|
|
||||||
<div class="map">
|
|
||||||
<svg width="800" height="800" pointer-events="all" style="border: 2px solid red;">
|
|
||||||
<g>
|
|
||||||
<circle id="node_10" class="node" r="5" style="fill: rgb(128, 186, 39);" cx="100" cy="100"/>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
</div>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
|
@ -27,14 +27,4 @@ function networkmaps_show($id) {
|
|||||||
networkmaps_show_staged_area($id);
|
networkmaps_show_staged_area($id);
|
||||||
networkmaps_show_black_list_staged_area($id);
|
networkmaps_show_black_list_staged_area($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
class Networkmap extends Map {
|
|
||||||
public function __construct($id) {
|
|
||||||
parent::__construct($id);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function show() {
|
|
||||||
parent::show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
?>
|
Loading…
x
Reference in New Issue
Block a user