Working in the new networkmap, the view and d3

This commit is contained in:
mdtrooper 2016-02-03 11:40:08 +01:00
parent fe3f404837
commit f0afd427bb
7 changed files with 991 additions and 18798 deletions

View File

@ -91,4 +91,26 @@ function maps_update_map ($id, $values) {
return (int)$result;
}
function maps_is_networkmap($id) {
$return = db_get_value('type', 'tmap', 'id', $id);
if ($return === false)
return false;
if ($return == MAP_TYPE_NETWORKMAP)
return true;
else
return false;
}
function maps_show($id) {
if (maps_is_networkmap($id)) {
require_once("include/functions_networkmaps.php");
networkmaps_show($id);
}
else {
//TODO VISUAL
}
}
?>

View File

@ -0,0 +1,27 @@
<?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 Networkmaps
*/
function networkmaps_show($id) {
}
?>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -64,6 +64,15 @@ ui_print_page_header(
false,
$buttons);
if (empty($id)) {
ui_print_error_message(__('Not found networkmap.'));
return;
}
else {
maps_show($id);
}
?>

View File

@ -230,7 +230,7 @@ else if ($delete_networkmap || $duplicate_networkmap || $update_networkmap) {
$filter['id_tag'] = $id_tag;
$filter['text'] = $text;
$values['filter'] = json_encode($filter);
$result_update = false;
if (!empty($name)) {
$result_update = maps_update_map($id, $values);