summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--create/data/images/Hub.pngbin0 -> 1959 bytes
-rw-r--r--create/data/images/Hub_small.pngbin0 -> 991 bytes
-rw-r--r--create/data/images/Network.pngbin0 -> 1959 bytes
-rw-r--r--create/data/images/Network_small.pngbin0 -> 991 bytes
-rw-r--r--create/data/images/Notebook.pngbin0 -> 1922 bytes
-rw-r--r--create/data/images/Notebook_small.pngbin0 -> 919 bytes
-rw-r--r--create/data/images/Phone.pngbin0 -> 3385 bytes
-rw-r--r--create/data/images/Phone_small.pngbin0 -> 1314 bytes
-rw-r--r--create/data/images/Printer.pngbin0 -> 1761 bytes
-rw-r--r--create/data/images/Printer_small.pngbin0 -> 950 bytes
-rw-r--r--create/data/images/Router.pngbin0 -> 1959 bytes
-rw-r--r--create/data/images/Router_small.pngbin0 -> 991 bytes
-rw-r--r--create/data/images/Satellite.pngbin0 -> 2702 bytes
-rw-r--r--create/data/images/Satellite_small.pngbin0 -> 1186 bytes
-rw-r--r--create/data/images/Server.pngbin0 -> 1595 bytes
-rw-r--r--create/data/images/Server_small.pngbin0 -> 819 bytes
-rw-r--r--create/data/images/UPS.pngbin0 -> 2275 bytes
-rw-r--r--create/data/images/UPS_small.pngbin0 -> 860 bytes
-rw-r--r--create/data/images/Workstation.pngbin0 -> 2325 bytes
-rw-r--r--create/data/images/Workstation_small.pngbin0 -> 1055 bytes
-rw-r--r--create/mysql/schema.sql13
-rw-r--r--frontends/php/sysmap.php15
23 files changed, 23 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 42eb929e..b04b43a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
Changes for 1.1alpha1:
+ - added table 'images' (Alexei)
- added small icons for maps (Alexei)
- added basic support of background images (Alexei)
- added frontends/php/include/html.inc.php (Alexei)
diff --git a/create/data/images/Hub.png b/create/data/images/Hub.png
new file mode 100644
index 00000000..3f45f255
--- /dev/null
+++ b/create/data/images/Hub.png
Binary files differ
diff --git a/create/data/images/Hub_small.png b/create/data/images/Hub_small.png
new file mode 100644
index 00000000..af8db605
--- /dev/null
+++ b/create/data/images/Hub_small.png
Binary files differ
diff --git a/create/data/images/Network.png b/create/data/images/Network.png
new file mode 100644
index 00000000..3f45f255
--- /dev/null
+++ b/create/data/images/Network.png
Binary files differ
diff --git a/create/data/images/Network_small.png b/create/data/images/Network_small.png
new file mode 100644
index 00000000..c07f5039
--- /dev/null
+++ b/create/data/images/Network_small.png
Binary files differ
diff --git a/create/data/images/Notebook.png b/create/data/images/Notebook.png
new file mode 100644
index 00000000..be6e6a6e
--- /dev/null
+++ b/create/data/images/Notebook.png
Binary files differ
diff --git a/create/data/images/Notebook_small.png b/create/data/images/Notebook_small.png
new file mode 100644
index 00000000..79962e44
--- /dev/null
+++ b/create/data/images/Notebook_small.png
Binary files differ
diff --git a/create/data/images/Phone.png b/create/data/images/Phone.png
new file mode 100644
index 00000000..1a74f408
--- /dev/null
+++ b/create/data/images/Phone.png
Binary files differ
diff --git a/create/data/images/Phone_small.png b/create/data/images/Phone_small.png
new file mode 100644
index 00000000..e79d92a1
--- /dev/null
+++ b/create/data/images/Phone_small.png
Binary files differ
diff --git a/create/data/images/Printer.png b/create/data/images/Printer.png
new file mode 100644
index 00000000..362b5eca
--- /dev/null
+++ b/create/data/images/Printer.png
Binary files differ
diff --git a/create/data/images/Printer_small.png b/create/data/images/Printer_small.png
new file mode 100644
index 00000000..00a35db8
--- /dev/null
+++ b/create/data/images/Printer_small.png
Binary files differ
diff --git a/create/data/images/Router.png b/create/data/images/Router.png
new file mode 100644
index 00000000..3f45f255
--- /dev/null
+++ b/create/data/images/Router.png
Binary files differ
diff --git a/create/data/images/Router_small.png b/create/data/images/Router_small.png
new file mode 100644
index 00000000..0f8ebcc8
--- /dev/null
+++ b/create/data/images/Router_small.png
Binary files differ
diff --git a/create/data/images/Satellite.png b/create/data/images/Satellite.png
new file mode 100644
index 00000000..d51106e9
--- /dev/null
+++ b/create/data/images/Satellite.png
Binary files differ
diff --git a/create/data/images/Satellite_small.png b/create/data/images/Satellite_small.png
new file mode 100644
index 00000000..cde64845
--- /dev/null
+++ b/create/data/images/Satellite_small.png
Binary files differ
diff --git a/create/data/images/Server.png b/create/data/images/Server.png
new file mode 100644
index 00000000..a5eb1231
--- /dev/null
+++ b/create/data/images/Server.png
Binary files differ
diff --git a/create/data/images/Server_small.png b/create/data/images/Server_small.png
new file mode 100644
index 00000000..e55c1d37
--- /dev/null
+++ b/create/data/images/Server_small.png
Binary files differ
diff --git a/create/data/images/UPS.png b/create/data/images/UPS.png
new file mode 100644
index 00000000..cc423e75
--- /dev/null
+++ b/create/data/images/UPS.png
Binary files differ
diff --git a/create/data/images/UPS_small.png b/create/data/images/UPS_small.png
new file mode 100644
index 00000000..aa87927d
--- /dev/null
+++ b/create/data/images/UPS_small.png
Binary files differ
diff --git a/create/data/images/Workstation.png b/create/data/images/Workstation.png
new file mode 100644
index 00000000..efd416f5
--- /dev/null
+++ b/create/data/images/Workstation.png
Binary files differ
diff --git a/create/data/images/Workstation_small.png b/create/data/images/Workstation_small.png
new file mode 100644
index 00000000..e844c2ff
--- /dev/null
+++ b/create/data/images/Workstation_small.png
Binary files differ
diff --git a/create/mysql/schema.sql b/create/mysql/schema.sql
index 39f2f507..121a0e38 100644
--- a/create/mysql/schema.sql
+++ b/create/mysql/schema.sql
@@ -560,3 +560,16 @@ CREATE TABLE trends (
value_max double(16,4) DEFAULT '0.0000' NOT NULL,
PRIMARY KEY (itemid,clock)
) type=InnoDB;
+
+--
+-- Table structure for table 'images'
+--
+
+CREATE TABLE images (
+ imageid int(4) DEFAULT '0' NOT NULL,
+ imagetype int(4) DEFAULT '0' NOT NULL,
+ name varchar(64) DEFAULT '0' NOT NULL,
+ image blob DEFAULT '' NOT NULL,
+ PRIMARY KEY (imageid),
+ UNIQUE (imagetype, name)
+) type=InnoDB;
diff --git a/frontends/php/sysmap.php b/frontends/php/sysmap.php
index 2fdc5649..40e8d1f5 100644
--- a/frontends/php/sysmap.php
+++ b/frontends/php/sysmap.php
@@ -270,7 +270,7 @@
echo "Icon";
show_table2_h_delimiter();
echo "<select class=\"biginput\" name=\"icon\" size=1>";
- $icons=array();
+/* $icons=array();
if(function_exists("imagecreatetruecolor")&&@imagecreatetruecolor(1,1))
{
$icons[0]="Server";
@@ -291,17 +291,20 @@
$icons[2]="Printer";
$icons[3]="Hub";
$num=4;
- }
- for($i=0;$i<$num;$i++)
+ }*/
+ $result=DBselect("select name from images where imagetype=1 order by name");
+/* for($i=0;$i<$num;$i++)*/
+ for($i=0;$i<DBnum_rows($result);$i++)
{
- if(isset($HTTP_GET_VARS["shostid"]) && ($icon==$icons[$i]))
+ $name=DBget_field($result,$i,0);
+ if(isset($HTTP_GET_VARS["shostid"]) && ($icon==$name))
// if(isset($HTTP_GET_VARS["hostid"]) && ($HTTP_GET_VARS["icon"]==$icons[$i]))
{
- echo "<OPTION VALUE='".$icons[$i]."' SELECTED>".$icons[$i];
+ echo "<OPTION VALUE='".$name."' SELECTED>".$name;
}
else
{
- echo "<OPTION VALUE='".$icons[$i]."'>".$icons[$i];
+ echo "<OPTION VALUE='".$name."'>".$name;
}
}
echo "</SELECT>";