summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-04-28 13:29:58 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-04-28 13:29:58 +0000
commitd5dea01e509ef5f5aaa1bece2845c4aeb4d716ef (patch)
treecaf186c5d7fd26d0e0d75b2618e184a16f011db3
parent29da2c144f6f4f47675853484f89d507cf59eff9 (diff)
downloadzabbix-d5dea01e509ef5f5aaa1bece2845c4aeb4d716ef.tar.gz
zabbix-d5dea01e509ef5f5aaa1bece2845c4aeb4d716ef.tar.xz
zabbix-d5dea01e509ef5f5aaa1bece2845c4aeb4d716ef.zip
- minor fix (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@2790 97f52cf1-0a1b-0410-bd0e-c28be96e8082
-rw-r--r--create/mysql/schema.sql2
-rw-r--r--create/postgresql/schema.sql2
-rw-r--r--frontends/php/include/classes/graph.inc.php5
-rw-r--r--frontends/php/include/config.inc.php4
-rw-r--r--upgrades/dbpatches/1.1beta9_to_1.1beta10/mysql/patch.sql2
-rw-r--r--upgrades/dbpatches/1.1beta9_to_1.1beta10/postgresql/patch.sql2
6 files changed, 10 insertions, 7 deletions
diff --git a/create/mysql/schema.sql b/create/mysql/schema.sql
index 2d075258..08b83c45 100644
--- a/create/mysql/schema.sql
+++ b/create/mysql/schema.sql
@@ -147,7 +147,7 @@ CREATE TABLE config (
alert_history int(4) DEFAULT '0' NOT NULL,
alarm_history int(4) DEFAULT '0' NOT NULL,
refresh_unsupported int(4) DEFAULT '0' NOT NULL,
- work_period varchar(100) DEFAULT '1-7,00:00-23:59' NOT NULL
+ work_period varchar(100) DEFAULT '1-5,00:00-24:00' NOT NULL
) type=InnoDB;
--
diff --git a/create/postgresql/schema.sql b/create/postgresql/schema.sql
index 8ecca675..0f8dbe25 100644
--- a/create/postgresql/schema.sql
+++ b/create/postgresql/schema.sql
@@ -101,7 +101,7 @@ CREATE TABLE config (
alert_history int4 DEFAULT '0' NOT NULL,
alarm_history int4 DEFAULT '0' NOT NULL,
refresh_unsupported int4 DEFAULT '0' NOT NULL
- work_period varchar(100) DEFAULT '1-7,00:00-23:59' NOT NULL,
+ work_period varchar(100) DEFAULT '1-5,00:00-24:00' NOT NULL,
);
--
diff --git a/frontends/php/include/classes/graph.inc.php b/frontends/php/include/classes/graph.inc.php
index 743d6212..60d509e7 100644
--- a/frontends/php/include/classes/graph.inc.php
+++ b/frontends/php/include/classes/graph.inc.php
@@ -380,7 +380,8 @@
}
$from = $this->from_time;
$max_time = $this->to_time;
-
+//SDI("from: ".date('r',$from));
+//SDI("max_time: ".date('r',$max_time));
$start = find_period_start($periods,$from);
$end = -1;
while($start < $max_time && $start > 0)
@@ -389,6 +390,8 @@
$x1 = round((($start-$from)*$this->sizeX)/$this->period) + $this->shiftXleft;
$x2 = round((($end-$from)*$this->sizeX)/$this->period) + $this->shiftXleft;
+//SDI("start [$x1]: ".date('r',$start));
+//SDI("end [$x2]:".date('r',$end));
//draw rectangle
ImageFilledRectangle(
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php
index f350dc4c..182e20ad 100644
--- a/frontends/php/include/config.inc.php
+++ b/frontends/php/include/config.inc.php
@@ -772,7 +772,7 @@ function SDI($msg="SDI") { echo "DEBUG INFO: $msg ".BR; } // DEBUG INFO!!!
$date = getdate($time);
$wday = $date['wday'] == 0 ? 7 : $date['wday'];
$curr = $date['hours']*100+$date['minutes'];
-
+//SDI("find_end: ".date('r',$time));
if(isset($periods[$wday]))
{
$next_h = -1;
@@ -806,7 +806,7 @@ function SDI($msg="SDI") { echo "DEBUG INFO: $msg ".BR; } // DEBUG INFO!!!
return $next_time;
}
}
- return $max_time;
+ return -1;
}
function validate_period(&$str)
diff --git a/upgrades/dbpatches/1.1beta9_to_1.1beta10/mysql/patch.sql b/upgrades/dbpatches/1.1beta9_to_1.1beta10/mysql/patch.sql
index 7f4da20f..2bc75fca 100644
--- a/upgrades/dbpatches/1.1beta9_to_1.1beta10/mysql/patch.sql
+++ b/upgrades/dbpatches/1.1beta9_to_1.1beta10/mysql/patch.sql
@@ -1,2 +1,2 @@
-alter table config add work_period varchar(100) DEFAULT '1-7,00:00-23:59' NOT NULL;
+alter table config add work_period varchar(100) DEFAULT '1-5,00:00-24:00' NOT NULL;
alter table graphs add show_work_period int(1) DEFAULT '1' NOT NULL;
diff --git a/upgrades/dbpatches/1.1beta9_to_1.1beta10/postgresql/patch.sql b/upgrades/dbpatches/1.1beta9_to_1.1beta10/postgresql/patch.sql
index d61a716b..c9ed602b 100644
--- a/upgrades/dbpatches/1.1beta9_to_1.1beta10/postgresql/patch.sql
+++ b/upgrades/dbpatches/1.1beta9_to_1.1beta10/postgresql/patch.sql
@@ -1,2 +1,2 @@
-ALTER TABLE config ADD work_period varchar(100) DEFAULT '1-7,00:00-23:59' NOT NULL;
+ALTER TABLE config ADD work_period varchar(100) DEFAULT '1-5,00:00-24:00' NOT NULL;
ALTER TABLE graphs ADD show_work_period int2 DEFAULT '1' NOT NULL;