Changeset 754


Ignore:
Timestamp:
Oct 21, 2015, 11:05:08 PM (9 years ago)
Author:
chronos
Message:
  • Added: New module Notify for sending periodic system notification for monitoring various states to user.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/Version.php

    r751 r754  
    11<?php
    22
    3 $Revision = 751; // Subversion revision
    4 $DatabaseRevision = 748; // SQL structure revision
    5 $ReleaseTime = strtotime('2015-10-04');
     3$Revision = 752; // Subversion revision
     4$DatabaseRevision = 752; // SQL structure revision
     5$ReleaseTime = strtotime('2015-10-21');
  • trunk/Common/Setup/Updates.php

    r748 r754  
    15171517  }
    15181518}
     1519
     1520function UpdateTo752($Manager)
     1521{
     1522  $Manager->Database->query('INSERT INTO `SchedulerAction` (`Id`, `Name`, `Class`) '.
     1523    'VALUES (NULL, "Kontrola změn stavů", "SchedulerNotifyCheck");');
     1524
     1525  $this->Database->query('
     1526  CREATE TABLE IF NOT EXISTS `NotifyUser` (
     1527  `Id` int(11) NOT NULL AUTO_INCREMENT,
     1528  `User` int(11) NOT NULL,
     1529  `Contact` int(11) NOT NULL,
     1530  `Period` int(11) NOT NULL,
     1531  PRIMARY KEY (`Id`),
     1532  KEY `User` (`User`),
     1533  KEY `Contact` (`Contact`)
     1534    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;');
     1535  $this->Database->query('ALTER TABLE `NotifyUser`
     1536ADD CONSTRAINT `NotifyUser_ibfk_1` FOREIGN KEY (`User`) REFERENCES `User` (`Id`),
     1537ADD CONSTRAINT `NotifyUser_ibfk_2` FOREIGN KEY (`Contact`) REFERENCES `Contact` (`Id`);');
     1538
     1539  $this->Database->query('CREATE TABLE IF NOT EXISTS `NotifyCategory` (
     1540      `Id` int(11) NOT NULL AUTO_INCREMENT,
     1541      `Name` varchar(255) NOT NULL,
     1542      `SysName` varchar(255) NOT NULL,
     1543      PRIMARY KEY (`Id`)
     1544    ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;');
     1545
     1546  $this->Database->query("INSERT INTO `NotifyCategory` (`Id`, `Name`, `SysName`) VALUES
     1547    (1, 'Dostupnost zařízení (ping)', 'NetworkReachability'),
     1548    (2, 'Dostupnost URL', 'URL'),
     1549    (3, 'Minimální úroveň signálu', 'WirelessSignal'),
     1550    (4, 'Dostupnost síťového portu', 'NetworkPort'),
     1551    (5, 'Minimální odezva', 'NetworkLatency'),
     1552    (6, 'Minimální propustnost', 'NetworkBandwidth');");
     1553}
     1554
    15191555
    15201556class Updates
     
    15901626      742 => array('Revision' => 747, 'Function' => 'UpdateTo747'),
    15911627      747 => array('Revision' => 748, 'Function' => 'UpdateTo748'),
     1628      748 => array('Revision' => 752, 'Function' => 'UpdateTo752'),
    15921629    ));
    15931630  }
  • trunk/Modules/Scheduler/Scheduler.php

    r738 r754  
    7575          $Class = new $DbRow['Class']($this->System);
    7676          $Output = $Class->Execute();
     77          echo($Output);
    7778        } else echo('Class '.$DbRow['Class'].' not found'."\n");
    7879        $this->Database->update('Scheduler', 'Id='.$DbRow['Id'],
  • trunk/Modules/Subject/Subject.php

    r747 r754  
    112112      ),
    113113    ));
     114    $this->System->FormManager->RegisterFormType('TContact', array(
     115      'Type' => 'Reference',
     116      'Table' => 'Contact',
     117      'Id' => 'Id',
     118      'Name' => 'Value',
     119      'Filter' => '1',
     120    ));
    114121    $this->System->FormManager->RegisterFormType('TSubject', array(
    115122      'Type' => 'Reference',
Note: See TracChangeset for help on using the changeset viewer.