fixing line endings

This commit is contained in:
Pepijn Over 2015-02-27 11:07:11 +01:00
parent b9a6bb4f41
commit e3dc55220c
34 changed files with 1361 additions and 1361 deletions

View File

@ -1,242 +1,242 @@
@ECHO OFF
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set BUILDDIR=_build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
set I18NSPHINXOPTS=%SPHINXOPTS% .
if NOT "%PAPER%" == "" (
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
)
if "%1" == "" goto help
if "%1" == "help" (
:help
echo.Please use `make ^<target^>` where ^<target^> is one of
echo. html to make standalone HTML files
echo. dirhtml to make HTML files named index.html in directories
echo. singlehtml to make a single large HTML file
echo. pickle to make pickle files
echo. json to make JSON files
echo. htmlhelp to make HTML files and a HTML help project
echo. qthelp to make HTML files and a qthelp project
echo. devhelp to make HTML files and a Devhelp project
echo. epub to make an epub
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
echo. text to make text files
echo. man to make manual pages
echo. texinfo to make Texinfo files
echo. gettext to make PO message catalogs
echo. changes to make an overview over all changed/added/deprecated items
echo. xml to make Docutils-native XML files
echo. pseudoxml to make pseudoxml-XML files for display purposes
echo. linkcheck to check all external links for integrity
echo. doctest to run all doctests embedded in the documentation if enabled
goto end
)
if "%1" == "clean" (
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
del /q /s %BUILDDIR%\*
goto end
)
%SPHINXBUILD% 2> nul
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
if "%1" == "html" (
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
goto end
)
if "%1" == "dirhtml" (
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
goto end
)
if "%1" == "singlehtml" (
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
goto end
)
if "%1" == "pickle" (
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the pickle files.
goto end
)
if "%1" == "json" (
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the JSON files.
goto end
)
if "%1" == "htmlhelp" (
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run HTML Help Workshop with the ^
.hhp project file in %BUILDDIR%/htmlhelp.
goto end
)
if "%1" == "qthelp" (
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in %BUILDDIR%/qthelp, like this:
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\phpservermon.qhcp
echo.To view the help file:
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\phpservermon.ghc
goto end
)
if "%1" == "devhelp" (
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished.
goto end
)
if "%1" == "epub" (
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The epub file is in %BUILDDIR%/epub.
goto end
)
if "%1" == "latex" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
if errorlevel 1 exit /b 1
echo.
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "latexpdf" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf
cd %BUILDDIR%/..
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "latexpdfja" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf-ja
cd %BUILDDIR%/..
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "text" (
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The text files are in %BUILDDIR%/text.
goto end
)
if "%1" == "man" (
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The manual pages are in %BUILDDIR%/man.
goto end
)
if "%1" == "texinfo" (
%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
goto end
)
if "%1" == "gettext" (
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
goto end
)
if "%1" == "changes" (
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
if errorlevel 1 exit /b 1
echo.
echo.The overview file is in %BUILDDIR%/changes.
goto end
)
if "%1" == "linkcheck" (
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
if errorlevel 1 exit /b 1
echo.
echo.Link check complete; look for any errors in the above output ^
or in %BUILDDIR%/linkcheck/output.txt.
goto end
)
if "%1" == "doctest" (
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
if errorlevel 1 exit /b 1
echo.
echo.Testing of doctests in the sources finished, look at the ^
results in %BUILDDIR%/doctest/output.txt.
goto end
)
if "%1" == "xml" (
%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The XML files are in %BUILDDIR%/xml.
goto end
)
if "%1" == "pseudoxml" (
%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
goto end
)
:end
@ECHO OFF
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set BUILDDIR=_build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
set I18NSPHINXOPTS=%SPHINXOPTS% .
if NOT "%PAPER%" == "" (
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
)
if "%1" == "" goto help
if "%1" == "help" (
:help
echo.Please use `make ^<target^>` where ^<target^> is one of
echo. html to make standalone HTML files
echo. dirhtml to make HTML files named index.html in directories
echo. singlehtml to make a single large HTML file
echo. pickle to make pickle files
echo. json to make JSON files
echo. htmlhelp to make HTML files and a HTML help project
echo. qthelp to make HTML files and a qthelp project
echo. devhelp to make HTML files and a Devhelp project
echo. epub to make an epub
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
echo. text to make text files
echo. man to make manual pages
echo. texinfo to make Texinfo files
echo. gettext to make PO message catalogs
echo. changes to make an overview over all changed/added/deprecated items
echo. xml to make Docutils-native XML files
echo. pseudoxml to make pseudoxml-XML files for display purposes
echo. linkcheck to check all external links for integrity
echo. doctest to run all doctests embedded in the documentation if enabled
goto end
)
if "%1" == "clean" (
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
del /q /s %BUILDDIR%\*
goto end
)
%SPHINXBUILD% 2> nul
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
if "%1" == "html" (
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
goto end
)
if "%1" == "dirhtml" (
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
goto end
)
if "%1" == "singlehtml" (
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
goto end
)
if "%1" == "pickle" (
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the pickle files.
goto end
)
if "%1" == "json" (
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the JSON files.
goto end
)
if "%1" == "htmlhelp" (
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run HTML Help Workshop with the ^
.hhp project file in %BUILDDIR%/htmlhelp.
goto end
)
if "%1" == "qthelp" (
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in %BUILDDIR%/qthelp, like this:
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\phpservermon.qhcp
echo.To view the help file:
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\phpservermon.ghc
goto end
)
if "%1" == "devhelp" (
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished.
goto end
)
if "%1" == "epub" (
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The epub file is in %BUILDDIR%/epub.
goto end
)
if "%1" == "latex" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
if errorlevel 1 exit /b 1
echo.
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "latexpdf" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf
cd %BUILDDIR%/..
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "latexpdfja" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf-ja
cd %BUILDDIR%/..
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "text" (
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The text files are in %BUILDDIR%/text.
goto end
)
if "%1" == "man" (
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The manual pages are in %BUILDDIR%/man.
goto end
)
if "%1" == "texinfo" (
%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
goto end
)
if "%1" == "gettext" (
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
goto end
)
if "%1" == "changes" (
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
if errorlevel 1 exit /b 1
echo.
echo.The overview file is in %BUILDDIR%/changes.
goto end
)
if "%1" == "linkcheck" (
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
if errorlevel 1 exit /b 1
echo.
echo.Link check complete; look for any errors in the above output ^
or in %BUILDDIR%/linkcheck/output.txt.
goto end
)
if "%1" == "doctest" (
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
if errorlevel 1 exit /b 1
echo.
echo.Testing of doctests in the sources finished, look at the ^
results in %BUILDDIR%/doctest/output.txt.
goto end
)
if "%1" == "xml" (
%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The XML files are in %BUILDDIR%/xml.
goto end
)
if "%1" == "pseudoxml" (
%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
goto end
)
:end

View File

@ -1,56 +1,56 @@
<?php
/**
* PHP Server Monitor
* Monitor your servers and websites.
*
* This file is part of PHP Server Monitor.
* PHP Server Monitor is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PHP Server Monitor 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.
*
* You should have received a copy of the GNU General Public License
* along with PHP Server Monitor. If not, see <http://www.gnu.org/licenses/>.
*
* @package phpservermon
* @author Pepijn Over <pep@neanderthal-technology.com>
* @copyright Copyright (c) 2008-2014 Pepijn Over <pep@neanderthal-technology.com>
* @license http://www.gnu.org/licenses/gpl.txt GNU GPL v3
* @version Release: @package_version@
* @link http://www.phpservermonitor.org/
* @since phpservermon 3.1
**/
namespace psm\Module\Error\Controller;
use psm\Module\AbstractController;
use psm\Service\Database;
class ErrorController extends AbstractController {
function __construct(Database $db, \Twig_Environment $twig) {
parent::__construct($db, $twig);
$this->setMinUserLevelRequired(PSM_USER_ANONYMOUS);
$this->setActions(array(
'401',
), '401');
}
/**
* 401 error page
*
* @return string
*/
protected function execute401() {
return $this->twig->render('module/error/401.tpl.html', array(
'label_title' => psm_get_lang('error', '401_unauthorized'),
'label_description' => psm_get_lang('error', '401_unauthorized_description'),
));
}
}
<?php
/**
* PHP Server Monitor
* Monitor your servers and websites.
*
* This file is part of PHP Server Monitor.
* PHP Server Monitor is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PHP Server Monitor 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.
*
* You should have received a copy of the GNU General Public License
* along with PHP Server Monitor. If not, see <http://www.gnu.org/licenses/>.
*
* @package phpservermon
* @author Pepijn Over <pep@neanderthal-technology.com>
* @copyright Copyright (c) 2008-2014 Pepijn Over <pep@neanderthal-technology.com>
* @license http://www.gnu.org/licenses/gpl.txt GNU GPL v3
* @version Release: @package_version@
* @link http://www.phpservermonitor.org/
* @since phpservermon 3.1
**/
namespace psm\Module\Error\Controller;
use psm\Module\AbstractController;
use psm\Service\Database;
class ErrorController extends AbstractController {
function __construct(Database $db, \Twig_Environment $twig) {
parent::__construct($db, $twig);
$this->setMinUserLevelRequired(PSM_USER_ANONYMOUS);
$this->setActions(array(
'401',
), '401');
}
/**
* 401 error page
*
* @return string
*/
protected function execute401() {
return $this->twig->render('module/error/401.tpl.html', array(
'label_title' => psm_get_lang('error', '401_unauthorized'),
'label_description' => psm_get_lang('error', '401_unauthorized_description'),
));
}
}

View File

@ -1,39 +1,39 @@
<?php
/**
* PHP Server Monitor
* Monitor your servers and websites.
*
* This file is part of PHP Server Monitor.
* PHP Server Monitor is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PHP Server Monitor 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.
*
* You should have received a copy of the GNU General Public License
* along with PHP Server Monitor. If not, see <http://www.gnu.org/licenses/>.
*
* @package phpservermon
* @author Pepijn Over <pep@neanderthal-technology.com>
* @copyright Copyright (c) 2008-2014 Pepijn Over <pep@neanderthal-technology.com>
* @license http://www.gnu.org/licenses/gpl.txt GNU GPL v3
* @version Release: @package_version@
* @link http://www.phpservermonitor.org/
* @since phpservermon 3.1
**/
namespace psm\Module\Error;
use psm\Module\ModuleInterface;
class ErrorModule implements ModuleInterface {
public function getControllers() {
return array(
'error' => __NAMESPACE__ . '\Controller\ErrorController',
);
}
}
<?php
/**
* PHP Server Monitor
* Monitor your servers and websites.
*
* This file is part of PHP Server Monitor.
* PHP Server Monitor is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PHP Server Monitor 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.
*
* You should have received a copy of the GNU General Public License
* along with PHP Server Monitor. If not, see <http://www.gnu.org/licenses/>.
*
* @package phpservermon
* @author Pepijn Over <pep@neanderthal-technology.com>
* @copyright Copyright (c) 2008-2014 Pepijn Over <pep@neanderthal-technology.com>
* @license http://www.gnu.org/licenses/gpl.txt GNU GPL v3
* @version Release: @package_version@
* @link http://www.phpservermonitor.org/
* @since phpservermon 3.1
**/
namespace psm\Module\Error;
use psm\Module\ModuleInterface;
class ErrorModule implements ModuleInterface {
public function getControllers() {
return array(
'error' => __NAMESPACE__ . '\Controller\ErrorController',
);
}
}

View File

@ -1,119 +1,119 @@
<?php
/**
* PHP Server Monitor
* Monitor your servers and websites.
*
* This file is part of PHP Server Monitor.
* PHP Server Monitor is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PHP Server Monitor 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.
*
* You should have received a copy of the GNU General Public License
* along with PHP Server Monitor. If not, see <http://www.gnu.org/licenses/>.
*
* @package phpservermon
* @author Pepijn Over <pep@neanderthal-technology.com>
* @copyright Copyright (c) 2008-2014 Pepijn Over <pep@neanderthal-technology.com>
* @license http://www.gnu.org/licenses/gpl.txt GNU GPL v3
* @version Release: @package_version@
* @link http://www.phpservermonitor.org/
* @since phpservermon 3.1
**/
namespace psm\Util\Server;
/**
* Makes sure all data of servers is being archived properly or removed if necessary.
*/
class ArchiveManager {
/**
* Available archiver utils.
* @var array $archivers
*/
protected $archivers = array();
/**
* Database service
* @var \psm\Service\Database $db
*/
protected $db;
/**
* Retention period
* @var \DateInterval $retention_period
* @see setRetentionPeriod()
*/
protected $retention_period;
public function __construct(\psm\Service\Database $db) {
$this->db = $db;
$this->setRetentionPeriod(psm_get_conf('log_retention_period', 365));
$this->archivers[] = new Archiver\UptimeArchiver($db);
$this->archivers[] = new Archiver\LogsArchiver($db);
}
/**
* Archive one or more servers.
* @param int $server_id
* @return boolean
*/
public function archive($server_id = null) {
$result = true;
foreach($this->archivers as $archiver) {
if(!$archiver->archive($server_id)) {
$result = false;
}
}
return $result;
}
/**
* Cleanup old records for one or more servers
* @param int $server_id
* @return boolean
*/
public function cleanup($server_id = null) {
$result = true;
if(!$this->retention_period) {
// cleanup is disabled
return $result;
}
$retdate = new \DateTime();
$retdate->sub($this->retention_period);
foreach($this->archivers as $archiver) {
if(!$archiver->cleanup($retdate, $server_id)) {
$result = false;
}
}
return $result;
}
/**
* Set retention period for this archive run.
*
* Set period to 0 to disable cleanup altogether.
* @param \DateInterval|int $period \DateInterval object or number of days (int)
* @return \psm\Util\Server\ArchiveManager
*/
public function setRetentionPeriod($period) {
if(is_object($period) && $period instanceof \DateInterval) {
$this->retention_period = $period;
} elseif(intval($period) == 0) {
// cleanup disabled
$this->retention_period = false;
} else {
$this->retention_period = new \DateInterval('P' . intval($period) . 'D');
}
return $this;
}
<?php
/**
* PHP Server Monitor
* Monitor your servers and websites.
*
* This file is part of PHP Server Monitor.
* PHP Server Monitor is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PHP Server Monitor 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.
*
* You should have received a copy of the GNU General Public License
* along with PHP Server Monitor. If not, see <http://www.gnu.org/licenses/>.
*
* @package phpservermon
* @author Pepijn Over <pep@neanderthal-technology.com>
* @copyright Copyright (c) 2008-2014 Pepijn Over <pep@neanderthal-technology.com>
* @license http://www.gnu.org/licenses/gpl.txt GNU GPL v3
* @version Release: @package_version@
* @link http://www.phpservermonitor.org/
* @since phpservermon 3.1
**/
namespace psm\Util\Server;
/**
* Makes sure all data of servers is being archived properly or removed if necessary.
*/
class ArchiveManager {
/**
* Available archiver utils.
* @var array $archivers
*/
protected $archivers = array();
/**
* Database service
* @var \psm\Service\Database $db
*/
protected $db;
/**
* Retention period
* @var \DateInterval $retention_period
* @see setRetentionPeriod()
*/
protected $retention_period;
public function __construct(\psm\Service\Database $db) {
$this->db = $db;
$this->setRetentionPeriod(psm_get_conf('log_retention_period', 365));
$this->archivers[] = new Archiver\UptimeArchiver($db);
$this->archivers[] = new Archiver\LogsArchiver($db);
}
/**
* Archive one or more servers.
* @param int $server_id
* @return boolean
*/
public function archive($server_id = null) {
$result = true;
foreach($this->archivers as $archiver) {
if(!$archiver->archive($server_id)) {
$result = false;
}
}
return $result;
}
/**
* Cleanup old records for one or more servers
* @param int $server_id
* @return boolean
*/
public function cleanup($server_id = null) {
$result = true;
if(!$this->retention_period) {
// cleanup is disabled
return $result;
}
$retdate = new \DateTime();
$retdate->sub($this->retention_period);
foreach($this->archivers as $archiver) {
if(!$archiver->cleanup($retdate, $server_id)) {
$result = false;
}
}
return $result;
}
/**
* Set retention period for this archive run.
*
* Set period to 0 to disable cleanup altogether.
* @param \DateInterval|int $period \DateInterval object or number of days (int)
* @return \psm\Util\Server\ArchiveManager
*/
public function setRetentionPeriod($period) {
if(is_object($period) && $period instanceof \DateInterval) {
$this->retention_period = $period;
} elseif(intval($period) == 0) {
// cleanup disabled
$this->retention_period = false;
} else {
$this->retention_period = new \DateInterval('P' . intval($period) . 'D');
}
return $this;
}
}

View File

@ -1,47 +1,47 @@
<?php
/**
* PHP Server Monitor
* Monitor your servers and websites.
*
* This file is part of PHP Server Monitor.
* PHP Server Monitor is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PHP Server Monitor 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.
*
* You should have received a copy of the GNU General Public License
* along with PHP Server Monitor. If not, see <http://www.gnu.org/licenses/>.
*
* @package phpservermon
* @author Pepijn Over <pep@neanderthal-technology.com>
* @copyright Copyright (c) 2008-2014 Pepijn Over <pep@neanderthal-technology.com>
* @license http://www.gnu.org/licenses/gpl.txt GNU GPL v3
* @version Release: @package_version@
* @link http://www.phpservermonitor.org/
* @since phpservermon 3.1
**/
namespace psm\Util\Server\Archiver;
interface ArchiverInterface {
/**
* Archive for one or all servers.
* @param int $server_id
* @return boolean
*/
public function archive($server_id = null);
/**
* Cleanup data older than the retention period given.
* @param \DateTime $retention_date
* @param int $server_id
* @return boolean
*/
public function cleanup(\DateTime $retention_date, $server_id = null);
<?php
/**
* PHP Server Monitor
* Monitor your servers and websites.
*
* This file is part of PHP Server Monitor.
* PHP Server Monitor is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PHP Server Monitor 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.
*
* You should have received a copy of the GNU General Public License
* along with PHP Server Monitor. If not, see <http://www.gnu.org/licenses/>.
*
* @package phpservermon
* @author Pepijn Over <pep@neanderthal-technology.com>
* @copyright Copyright (c) 2008-2014 Pepijn Over <pep@neanderthal-technology.com>
* @license http://www.gnu.org/licenses/gpl.txt GNU GPL v3
* @version Release: @package_version@
* @link http://www.phpservermonitor.org/
* @since phpservermon 3.1
**/
namespace psm\Util\Server\Archiver;
interface ArchiverInterface {
/**
* Archive for one or all servers.
* @param int $server_id
* @return boolean
*/
public function archive($server_id = null);
/**
* Cleanup data older than the retention period given.
* @param \DateTime $retention_date
* @param int $server_id
* @return boolean
*/
public function cleanup(\DateTime $retention_date, $server_id = null);
}

View File

@ -1,70 +1,70 @@
<?php
/**
* PHP Server Monitor
* Monitor your servers and websites.
*
* This file is part of PHP Server Monitor.
* PHP Server Monitor is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PHP Server Monitor 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.
*
* You should have received a copy of the GNU General Public License
* along with PHP Server Monitor. If not, see <http://www.gnu.org/licenses/>.
*
* @package phpservermon
* @author Pepijn Over <pep@neanderthal-technology.com>
* @copyright Copyright (c) 2008-2014 Pepijn Over <pep@neanderthal-technology.com>
* @license http://www.gnu.org/licenses/gpl.txt GNU GPL v3
* @version Release: @package_version@
* @link http://www.phpservermonitor.org/
* @since phpservermon 3.1
**/
/**
* Cleanup log table
*/
namespace psm\Util\Server\Archiver;
use psm\Service\Database;
class LogsArchiver implements ArchiverInterface {
/**
* Database service
* @var \psm\Service\Database $db
*/
protected $db;
function __construct(Database $db) {
$this->db = $db;
}
/**
* Currently there is not really a log archive.
*
* It stays in the log table until cleaned up.
* @param int $server_id
*/
public function archive($server_id = null) {
return true;
}
public function cleanup(\DateTime $retention_date, $server_id = null) {
$sql_where_server = ($server_id !== null)
// this is obviously not the cleanest way to implement this when using paramter binding.. sorry.
? ' `server_id` = ' . intval($server_id) . ' AND '
: '';
$this->db->execute(
"DELETE FROM `".PSM_DB_PREFIX."log` WHERE {$sql_where_server} `datetime` < :latest_date",
array('latest_date' => $retention_date->format('Y-m-d 00:00:00')),
false
);
return true;
}
<?php
/**
* PHP Server Monitor
* Monitor your servers and websites.
*
* This file is part of PHP Server Monitor.
* PHP Server Monitor is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PHP Server Monitor 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.
*
* You should have received a copy of the GNU General Public License
* along with PHP Server Monitor. If not, see <http://www.gnu.org/licenses/>.
*
* @package phpservermon
* @author Pepijn Over <pep@neanderthal-technology.com>
* @copyright Copyright (c) 2008-2014 Pepijn Over <pep@neanderthal-technology.com>
* @license http://www.gnu.org/licenses/gpl.txt GNU GPL v3
* @version Release: @package_version@
* @link http://www.phpservermonitor.org/
* @since phpservermon 3.1
**/
/**
* Cleanup log table
*/
namespace psm\Util\Server\Archiver;
use psm\Service\Database;
class LogsArchiver implements ArchiverInterface {
/**
* Database service
* @var \psm\Service\Database $db
*/
protected $db;
function __construct(Database $db) {
$this->db = $db;
}
/**
* Currently there is not really a log archive.
*
* It stays in the log table until cleaned up.
* @param int $server_id
*/
public function archive($server_id = null) {
return true;
}
public function cleanup(\DateTime $retention_date, $server_id = null) {
$sql_where_server = ($server_id !== null)
// this is obviously not the cleanest way to implement this when using paramter binding.. sorry.
? ' `server_id` = ' . intval($server_id) . ' AND '
: '';
$this->db->execute(
"DELETE FROM `".PSM_DB_PREFIX."log` WHERE {$sql_where_server} `datetime` < :latest_date",
array('latest_date' => $retention_date->format('Y-m-d 00:00:00')),
false
);
return true;
}
}

View File

@ -1,80 +1,80 @@
{% block header %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{ title }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, minimum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link rel="icon" type="image/png" href="favicon.png" />
<link rel="apple-touch-icon" href="favicon.png" />
{% if auto_refresh %}
<meta http-equiv="refresh" content="{{ auto_refresh_seconds }}" />
{% endif %}
<!-- Le styles -->
<link href="static/plugin/twitter-bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="static/plugin/twitter-bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet">
<link href="static/plugin/bootstrap-multiselect/bootstrap-multiselect.min.css" rel="stylesheet">
<link href="static/css/style.css" rel="stylesheet">
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script type="text/javascript" src="static/plugin/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="static/plugin/twitter-bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="static/plugin/bootstrap-multiselect/bootstrap-multiselect.min.js"></script>
<script type="text/javascript" src="static/js/scripts.js"></script>
</head>
{% endblock %}
<body data-spy="scroll" data-target=".subnav" data-offset="50" class="{{ body_class }}">
<!-- navbar -->
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="index.php">{{ title }}</a>
{{ html_menu|raw }}
</div>
</div>
</div>
<!-- /navbar -->
{{ html_modal|raw }}
<!-- container -->
<div id="main-container">
<div class="page-header">
<div class="header-label"><h1>{{ subtitle }}</h1></div>
<div class="header-accessories">{{ header_accessories|raw }}</div>
</div>
<div id="main-content">
{{ html_sidebar|raw }}
<div id="page-container">
<div id="flashmessage" class="hide">
{% for msg in messages %}
<div class="alert alert-{{ msg.shortcode }}">
<p class="pull-left span1"><i class="icon-{{ msg.icon }}"></i></p>
<p>{{ msg.message }}</p>
</div>
{% endfor %}
</div>
{{ html_content|raw }}
</div>
</div>
{% if add_footer %}
{% block footer %}
<footer class="footer">
<p class="pull-right"><a href="#">{{ label_back_to_top }}</a></p>
<p class="powered"><small>Powered by <a href="http://www.phpservermonitor.org/" target="_blank">PHP Server Monitor {{ version }}</a>.<br/>{{ update_available }}</small></p>
</footer>
{% endblock %}
{% endif %}
</div>
<!-- /container -->
</body>
</html>
{% block header %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{ title }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, minimum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link rel="icon" type="image/png" href="favicon.png" />
<link rel="apple-touch-icon" href="favicon.png" />
{% if auto_refresh %}
<meta http-equiv="refresh" content="{{ auto_refresh_seconds }}" />
{% endif %}
<!-- Le styles -->
<link href="static/plugin/twitter-bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="static/plugin/twitter-bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet">
<link href="static/plugin/bootstrap-multiselect/bootstrap-multiselect.min.css" rel="stylesheet">
<link href="static/css/style.css" rel="stylesheet">
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script type="text/javascript" src="static/plugin/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="static/plugin/twitter-bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="static/plugin/bootstrap-multiselect/bootstrap-multiselect.min.js"></script>
<script type="text/javascript" src="static/js/scripts.js"></script>
</head>
{% endblock %}
<body data-spy="scroll" data-target=".subnav" data-offset="50" class="{{ body_class }}">
<!-- navbar -->
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="index.php">{{ title }}</a>
{{ html_menu|raw }}
</div>
</div>
</div>
<!-- /navbar -->
{{ html_modal|raw }}
<!-- container -->
<div id="main-container">
<div class="page-header">
<div class="header-label"><h1>{{ subtitle }}</h1></div>
<div class="header-accessories">{{ header_accessories|raw }}</div>
</div>
<div id="main-content">
{{ html_sidebar|raw }}
<div id="page-container">
<div id="flashmessage" class="hide">
{% for msg in messages %}
<div class="alert alert-{{ msg.shortcode }}">
<p class="pull-left span1"><i class="icon-{{ msg.icon }}"></i></p>
<p>{{ msg.message }}</p>
</div>
{% endfor %}
</div>
{{ html_content|raw }}
</div>
</div>
{% if add_footer %}
{% block footer %}
<footer class="footer">
<p class="pull-right"><a href="#">{{ label_back_to_top }}</a></p>
<p class="powered"><small>Powered by <a href="http://www.phpservermonitor.org/" target="_blank">PHP Server Monitor {{ version }}</a>.<br/>{{ update_available }}</small></p>
</footer>
{% endblock %}
{% endif %}
</div>
<!-- /container -->
</body>
</html>

View File

@ -1,22 +1,22 @@
<div class="nav-collapse">
<ul class="nav">
{% for item in menu %}
<li class="{{ item.active }}"><a href="{{ item.url|raw }}">{{ item.label }}</a></li>
{% endfor %}
<li id="nav_option_help">
<a href="http://www.phpservermonitor.org/support" target="_blank">{{ label_help }}</a>
</li>
</ul>
<ul class="nav pull-right">
<li class="dropdown visible-desktop">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ label_usermenu }} <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="{{ url_profile|raw }}"><i class="icon-cog"></i>&nbsp;{{ label_profile }}</a></li>
<li><a href="{{ url_logout|raw }}"><i class="icon-off"></i>&nbsp;{{ label_logout }}</a></li>
</ul>
</li>
<li class="hidden-desktop divider"></li>
<li class="hidden-desktop"><a href="{{ url_profile|raw }}">{{ label_profile }}</a></li>
<li class="hidden-desktop"><a href="{{ url_logout|raw }}">{{ label_logout }}</a></li>
</ul>
<div class="nav-collapse">
<ul class="nav">
{% for item in menu %}
<li class="{{ item.active }}"><a href="{{ item.url|raw }}">{{ item.label }}</a></li>
{% endfor %}
<li id="nav_option_help">
<a href="http://www.phpservermonitor.org/support" target="_blank">{{ label_help }}</a>
</li>
</ul>
<ul class="nav pull-right">
<li class="dropdown visible-desktop">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ label_usermenu }} <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="{{ url_profile|raw }}"><i class="icon-cog"></i>&nbsp;{{ label_profile }}</a></li>
<li><a href="{{ url_logout|raw }}"><i class="icon-off"></i>&nbsp;{{ label_logout }}</a></li>
</ul>
</li>
<li class="hidden-desktop divider"></li>
<li class="hidden-desktop"><a href="{{ url_profile|raw }}">{{ label_profile }}</a></li>
<li class="hidden-desktop"><a href="{{ url_logout|raw }}">{{ label_logout }}</a></li>
</ul>
</div>

View File

@ -1,2 +1,2 @@
<h2>{{ label_title }}</h2>
<h2>{{ label_title }}</h2>
<p>{{ label_description }}</p>

View File

@ -1,61 +1,61 @@
{% extends "module/install/main.tpl.html" %}
{% use "module/install/results.tpl.html" %}
{% block install %}
<div class="row-fluid">
<div class="span12">{{ block('results') }}</div>
</div>
<div class="row-fluid">
<div class="span6">
<form id="psm_config" class="form-horizontal" action="install.php?action=config" method="post">
<p>Please enter your database info:</p>
<div class="control-group">
<label class="control-label" for="host">Database host</label>
<div class="controls">
<input type="text" id="host" name="host" value="{{ host }}" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="name">Database name</label>
<div class="controls">
<input type="text" id="name" name="name" value="{{ name }}" placeholder="db name" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="user">Database user</label>
<div class="controls">
<input type="text" id="user" name="user" value="{{ user }}" placeholder="db user" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="pass">Database password</label>
<div class="controls">
<input type="password" id="pass" name="pass" value="{{ pass }}" placeholder="db password" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="prefix">Table prefix</label>
<div class="controls">
<input type="text" id="prefix" name="prefix" value="{{ prefix }}" />
</div>
</div>
<div class="control-group">
<div class="controls">
<button type="submit" class="btn">Save configuration</button>
</div>
</div>
</form>
</div>
{% if include_config_new_copy %}
<div class="span6">
<h3>Your config file:</h3>
<div class="alert alert-error">Unable to save your configuration.</div>
<p>Your database information is valid, however we are unable to create the configuration file automatically.
Please create a new file in the project directory called "config.php" and copy the information below.</p>
<p>After you have copied the configuration, press the button to continue.</p>
<p class="pull-left"><textarea rows="10">{{ php_config }}</textarea></p>
<p class="offset2"><input type="submit" class="btn btn-primary" value="I have saved the configuration" onclick="location.reload(true);" /></p>
</div>
{% endif %}
</div>
{% extends "module/install/main.tpl.html" %}
{% use "module/install/results.tpl.html" %}
{% block install %}
<div class="row-fluid">
<div class="span12">{{ block('results') }}</div>
</div>
<div class="row-fluid">
<div class="span6">
<form id="psm_config" class="form-horizontal" action="install.php?action=config" method="post">
<p>Please enter your database info:</p>
<div class="control-group">
<label class="control-label" for="host">Database host</label>
<div class="controls">
<input type="text" id="host" name="host" value="{{ host }}" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="name">Database name</label>
<div class="controls">
<input type="text" id="name" name="name" value="{{ name }}" placeholder="db name" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="user">Database user</label>
<div class="controls">
<input type="text" id="user" name="user" value="{{ user }}" placeholder="db user" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="pass">Database password</label>
<div class="controls">
<input type="password" id="pass" name="pass" value="{{ pass }}" placeholder="db password" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="prefix">Table prefix</label>
<div class="controls">
<input type="text" id="prefix" name="prefix" value="{{ prefix }}" />
</div>
</div>
<div class="control-group">
<div class="controls">
<button type="submit" class="btn">Save configuration</button>
</div>
</div>
</form>
</div>
{% if include_config_new_copy %}
<div class="span6">
<h3>Your config file:</h3>
<div class="alert alert-error">Unable to save your configuration.</div>
<p>Your database information is valid, however we are unable to create the configuration file automatically.
Please create a new file in the project directory called "config.php" and copy the information below.</p>
<p>After you have copied the configuration, press the button to continue.</p>
<p class="pull-left"><textarea rows="10">{{ php_config }}</textarea></p>
<p class="offset2"><input type="submit" class="btn btn-primary" value="I have saved the configuration" onclick="location.reload(true);" /></p>
</div>
{% endif %}
</div>
{% endblock %}

View File

@ -1,44 +1,44 @@
{% extends "module/install/main.tpl.html" %}
{% use "module/install/results.tpl.html" %}
{% block install %}
<p>Sweet, your database connection is up and running!</p>
<p>Next, please set up a new account to access your monitor:</p>
{{ block('results') }}
<p>&nbsp;</p>
<div class="row-fluid">
<div class="span6">
<form id="psm_config" class="form-horizontal" action="install.php?action=install" method="post">
<div class="control-group">
<label class="control-label" for="username">Username</label>
<div class="controls">
<input type="text" id="username" name="username" value="{{ username }}">
</div>
</div>
<div class="control-group">
<label class="control-label" for="password">Password</label>
<div class="controls">
<input type="password" id="password" name="password" value="">
</div>
</div>
<div class="control-group">
<label class="control-label" for="password_repeat">Password repeat</label>
<div class="controls">
<input type="password" id="password_repeat" name="password_repeat" value="">
</div>
</div>
<div class="control-group">
<label class="control-label" for="email">Email</label>
<div class="controls">
<input type="text" id="email" name="email" value="{{ email }}" />
</div>
</div>
<div class="control-group">
<div class="controls">
<button type="submit" class="btn btn-primary btn-large">Install</button>
</div>
</div>
</form>
</div>
</div>
{% extends "module/install/main.tpl.html" %}
{% use "module/install/results.tpl.html" %}
{% block install %}
<p>Sweet, your database connection is up and running!</p>
<p>Next, please set up a new account to access your monitor:</p>
{{ block('results') }}
<p>&nbsp;</p>
<div class="row-fluid">
<div class="span6">
<form id="psm_config" class="form-horizontal" action="install.php?action=install" method="post">
<div class="control-group">
<label class="control-label" for="username">Username</label>
<div class="controls">
<input type="text" id="username" name="username" value="{{ username }}">
</div>
</div>
<div class="control-group">
<label class="control-label" for="password">Password</label>
<div class="controls">
<input type="password" id="password" name="password" value="">
</div>
</div>
<div class="control-group">
<label class="control-label" for="password_repeat">Password repeat</label>
<div class="controls">
<input type="password" id="password_repeat" name="password_repeat" value="">
</div>
</div>
<div class="control-group">
<label class="control-label" for="email">Email</label>
<div class="controls">
<input type="text" id="email" name="email" value="{{ email }}" />
</div>
</div>
<div class="control-group">
<div class="controls">
<button type="submit" class="btn btn-primary btn-large">Install</button>
</div>
</div>
</form>
</div>
</div>
{% endblock %}

View File

@ -1,9 +1,9 @@
{% extends "module/install/main.tpl.html" %}
{% block install %}
<p>We have discovered a previous version.</p>
<p>In the next step we will upgrade your database to the latest version.</p>
{{ block('results') }}
<p>&nbsp;</p>
<p><a class="btn btn-primary btn-large" href="install.php?action=install">Upgrade to {{ version }}</a></p>
{% extends "module/install/main.tpl.html" %}
{% block install %}
<p>We have discovered a previous version.</p>
<p>In the next step we will upgrade your database to the latest version.</p>
{{ block('results') }}
<p>&nbsp;</p>
<p><a class="btn btn-primary btn-large" href="install.php?action=install">Upgrade to {{ version }}</a></p>
{% endblock %}

View File

@ -1,15 +1,15 @@
{% extends "module/install/main.tpl.html" %}
{% use "module/install/results.tpl.html" %}
{% block install %}
<p>Welcome to the installation of PHP Server Monitor. This page will guide you through the steps to install or upgrade your monitor.</p>
<p>Before we start, we need to verify your system meets the requirements.
If you see any errors in the list below, you may still continue, but PHP Server Monitor may not work correctly.
It is recommended you fix any errors before continuing.
</p>
{{ block('results') }}
<p>&nbsp;</p>
<p>
<a class="btn btn-primary btn-large" href="install.php?action=config">Let's go</a>
</p>
{% extends "module/install/main.tpl.html" %}
{% use "module/install/results.tpl.html" %}
{% block install %}
<p>Welcome to the installation of PHP Server Monitor. This page will guide you through the steps to install or upgrade your monitor.</p>
<p>Before we start, we need to verify your system meets the requirements.
If you see any errors in the list below, you may still continue, but PHP Server Monitor may not work correctly.
It is recommended you fix any errors before continuing.
</p>
{{ block('results') }}
<p>&nbsp;</p>
<p>
<a class="btn btn-primary btn-large" href="install.php?action=config">Let's go</a>
</p>
{% endblock %}

View File

@ -1,8 +1,8 @@
<div class="hero-unit">
<div class="install_header">
<p class="pull-left"><a href="http://www.phpservermonitor.org/"><img class="pull-left" src="static/phpservermon.png" alt="" /></a></p>
<h2>&nbsp;PHP Server Monitor</h2>
<p class="clearfix"></p>
</div>
{% block install %} {% endblock %}
<div class="hero-unit">
<div class="install_header">
<p class="pull-left"><a href="http://www.phpservermonitor.org/"><img class="pull-left" src="static/phpservermon.png" alt="" /></a></p>
<h2>&nbsp;PHP Server Monitor</h2>
<p class="clearfix"></p>
</div>
{% block install %} {% endblock %}
</div>

View File

@ -1,12 +1,12 @@
{% block results %}
{% if messages %}
{% for msg in messages %}
<div>
<p class="pull-left"><span class="label label-{{ msg.shortcode }}">{{ msg.shortcode }}</span></p>
{% autoescape false %}
<p class="offset1">{{ msg.message }}</p>
{% endautoescape %}
</div>
{% endfor %}
{% endif %}
{% block results %}
{% if messages %}
{% for msg in messages %}
<div>
<p class="pull-left"><span class="label label-{{ msg.shortcode }}">{{ msg.shortcode }}</span></p>
{% autoescape false %}
<p class="offset1">{{ msg.message }}</p>
{% endautoescape %}
</div>
{% endfor %}
{% endif %}
{% endblock %}

View File

@ -1,20 +1,20 @@
{% extends "module/install/main.tpl.html" %}
{% use "module/install/results.tpl.html" %}
{% block install %}
<div class="row-fluid">
<div class="span12">{{ block('results') }}</div>
</div>
<div class="row-fluid">
<div class="span12">
<p>&nbsp;</p>
<p>The installation is complete. Please check above if errors have occurred.<br>
If no errors have occurred, you are good to go.<br><br></p>
<p>
<a class="btn btn-primary btn-large" href="index.php">Go to your monitor</a>
<a class="btn btn-large" target="_blank" href="http://www.phpservermonitor.org/">PHP Server Monitor</a>
<a class="btn btn-large" target="_blank" href="http://docs.phpservermonitor.org/">Documentation</a>
</p>
</div>
</div>
{% extends "module/install/main.tpl.html" %}
{% use "module/install/results.tpl.html" %}
{% block install %}
<div class="row-fluid">
<div class="span12">{{ block('results') }}</div>
</div>
<div class="row-fluid">
<div class="span12">
<p>&nbsp;</p>
<p>The installation is complete. Please check above if errors have occurred.<br>
If no errors have occurred, you are good to go.<br><br></p>
<p>
<a class="btn btn-primary btn-large" href="index.php">Go to your monitor</a>
<a class="btn btn-large" target="_blank" href="http://www.phpservermonitor.org/">PHP Server Monitor</a>
<a class="btn btn-large" target="_blank" href="http://docs.phpservermonitor.org/">Documentation</a>
</p>
</div>
</div>
{% endblock %}

View File

@ -1,60 +1,60 @@
<div class="tabbable">
<ul class="nav nav-tabs">
<li class="active"><a href="#log_status_content" data-toggle="tab">{{ label_status }}</a></li>
<li><a href="#log_email_content" data-toggle="tab">{{ label_email }}</a></li>
<li><a href="#log_sms_content" data-toggle="tab">{{ label_sms }}</a></li>
<li><a href="#log_pushover_content" data-toggle="tab">{{ label_pushover }}</a></li>
</ul>
<div class="tab-content well">
{% for tab in tabs %}
<div class="tab-pane {{ tab.tab_active }}" id="log_{{ tab.id }}_content">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th class="hidden-phone">{{ label_server }}</th>
<th class="hidden-phone">{{ label_message }}</th>
<th class="hidden-phone">{{ label_date }}</th>
{% if tab.has_users %} <th class="hidden-phone">{{ label_users }}</th> {% endif %}
</tr>
</thead>
<tbody>
{% for entry in tab.entries %}
<tr class="{{ entry.class }}">
<td>
<div class="table-body">
<div class="table-cell">
<div class="visible-phone pull-right">
&nbsp;{{ entry.datetime_format }}
</div>
<i class="{{ entry.type_icon }}" title="{{ entry.type_title }}"></i> <span class="title">{{ entry.server }}</span> {{ entry.ip }}
</div>
</div>
<div class="visible-phone">
<div class="table-separator"/></div>
<div class="table-body">
<div class="table-cell-details">{{ entry.message|raw }}</div>
</div>
</div>
{% if tab.has_users %}<div class="visible-phone">
<div class="table-separator"/></div>
<div class="table-body">
<div class="table-cell-details">{{ label_users }}: {{ entry.user_list|raw }}</div>
</div>
</div>{% endif %}
</td>
<td class="hidden-phone">{{ entry.message|raw }}</td>
<td class="hidden-phone tight">{{ entry.datetime_format }}</td>
{% if tab.has_users %}<td class="hidden-phone tight">{{ entry.users|raw }}</td>{% endif %}
</tr>
{% endfor %}
{% if tab.no_logs %}
<tr class="{{ class }}">
<td colspan="4" class="cell-center">{{ label_no_logs }}</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
{% endfor %}
</div>
<div class="tabbable">
<ul class="nav nav-tabs">
<li class="active"><a href="#log_status_content" data-toggle="tab">{{ label_status }}</a></li>
<li><a href="#log_email_content" data-toggle="tab">{{ label_email }}</a></li>
<li><a href="#log_sms_content" data-toggle="tab">{{ label_sms }}</a></li>
<li><a href="#log_pushover_content" data-toggle="tab">{{ label_pushover }}</a></li>
</ul>
<div class="tab-content well">
{% for tab in tabs %}
<div class="tab-pane {{ tab.tab_active }}" id="log_{{ tab.id }}_content">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th class="hidden-phone">{{ label_server }}</th>
<th class="hidden-phone">{{ label_message }}</th>
<th class="hidden-phone">{{ label_date }}</th>
{% if tab.has_users %} <th class="hidden-phone">{{ label_users }}</th> {% endif %}
</tr>
</thead>
<tbody>
{% for entry in tab.entries %}
<tr class="{{ entry.class }}">
<td>
<div class="table-body">
<div class="table-cell">
<div class="visible-phone pull-right">
&nbsp;{{ entry.datetime_format }}
</div>
<i class="{{ entry.type_icon }}" title="{{ entry.type_title }}"></i> <span class="title">{{ entry.server }}</span> {{ entry.ip }}
</div>
</div>
<div class="visible-phone">
<div class="table-separator"/></div>
<div class="table-body">
<div class="table-cell-details">{{ entry.message|raw }}</div>
</div>
</div>
{% if tab.has_users %}<div class="visible-phone">
<div class="table-separator"/></div>
<div class="table-body">
<div class="table-cell-details">{{ label_users }}: {{ entry.user_list|raw }}</div>
</div>
</div>{% endif %}
</td>
<td class="hidden-phone">{{ entry.message|raw }}</td>
<td class="hidden-phone tight">{{ entry.datetime_format }}</td>
{% if tab.has_users %}<td class="hidden-phone tight">{{ entry.users|raw }}</td>{% endif %}
</tr>
{% endfor %}
{% if tab.no_logs %}
<tr class="{{ class }}">
<td colspan="4" class="cell-center">{{ label_no_logs }}</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
{% endfor %}
</div>
</div>

View File

@ -1,66 +1,66 @@
<table class="table table-bordered table-striped">
<thead>
<tr>
<th class="hidden-phone">&nbsp;</th>
<th class="hidden-phone">{{ label_label }}</th>
<th class="hidden-phone">{{ label_domain }}</th>
<th class="visible-desktop">{{ label_port }}</th>
<th class="visible-desktop">{{ label_type }}</th>
<th class="hidden-phone">{{ label_rtime }}</th>
<th class="hidden-phone">{{ label_last_online }}</th>
<th class="hidden-phone">{{ label_monitoring }}</th>
<th class="hidden-phone">{{ label_action }}</th>
</tr>
</thead>
<tbody>
{% for server in servers %}
<tr>
<td class="hidden-phone"><div class="table-cell-title"><span class="label label-status-{{ server.status }}"><a href="{{ server.url_view|raw }}" title="{{ server.error }}">{{ server.status }}</a></span></div></td>
<td class="hidden-phone"><div class="table-cell-title"><a href="{{ server.url_view|raw }}">{{ server.label }}</a></div></td>
<td class="nowrap visible-tablet"><div class="table-cell-title"><i class="{{ server.type_icon }}" title="{{ server.type }}"></i> {{ server.ip_short|raw }}</div></td>
<td class="nowrap visible-desktop"><div class="table-cell-title">{{ server.ip|raw }}</div></td>
<td class="nowrap visible-desktop"><div class="table-cell-title">{{ server.port }}</div></td>
<td class="nowrap visible-desktop"><div class="table-cell-title">{{ server.type }}</div></td>
<td class="nowrap hidden-phone"><div class="table-cell-title">{{ server.rtime }} s</div></td>
<td class="nowrap hidden-phone"><div class="table-cell-title">{{ server.last_online }}</div></td>
<td class="tight hidden-phone"><div class="table-cell-title"><i class="{{ server.active_icon }}" title="{{ server.active_title }}"></i> <i class="{{ server.email_icon }}" title="{{ label_email }}"></i> <i class="{{ server.sms_icon }}" title="{{ label_sms }}"></i> <i class="{{ server.pushover_icon }}" title="Pushover"></i></div></td>
<td class="tight hidden-phone">
<div class="table-cell-title">
<a class="btn btn-small" href="{{ server.url_view|raw }}"><i class="icon-chart"></i></a>
{% if user_level == 10 %}
<a class="btn btn-small" href="{{ server.url_edit|raw }}" title="{{ label_edit }}"><i class="icon-pencil"></i></a>
<a class="btn btn-small btn-danger show-modal" href="{{ server.url_delete|raw }}" title="{{ label_delete }}" data-modal-id="delete" data-modal-param="{{ server.label }}"><i class="icon-remove icon-white"></i></a>
{% endif %}
</div>
</td>
<td class="visible-phone">
<div class="table-body">
<div class="table-cell-title">
<span class="label label-status-{{ server.status }}"><a href="{{ server.url_view|raw }}" title="{{ server.error }}">{{ server.status }}</a></span>
<a class="title" href="{{ server.url_view|raw }}">{{ server.label }}</a>
</div>
<div class="table-cell tight">
&nbsp;<a class="btn btn-small" href="{{ server.url_view|raw }}"><i class="icon-chart"></i></a>
{% if user_level == 10 %}
<a class="btn btn-small" href="{{ server.url_edit|raw }}" title="{{ label_edit }}"><i class="icon-pencil"></i></a>
<a class="btn btn-small btn-danger show-modal" href="{{ server.url_delete|raw }}" title="{{ label_delete }}" data-modal-id="delete" data-modal-param="{{ server.label }}"><i class="icon-remove icon-white"></i></a>
{% endif %}
</div>
</div>
<div class="table-body">
<div class="table-row">
<div class="table-cell"><i class="{{ server.type_icon }}" title="{{ server.type }}"></i> {{ server.ip_short|raw }}</div>
<div class="table-cell tight">
<i class="{{ server.active_icon }}" title="{{ server.active_title }}"></i> <i class="{{ server.email_icon }}" title="{{ label_email }}"></i> <i class="{{ server.sms_icon }}" title="{{ label_sms }}"></i> <i class="{{ server.pushover_icon }}" title="Pushover"></i>
</div>
</div>
</div>
<div class="table-body">
<div class="table-row"><div class="table-cell-details tight">{{ label_rtime }}: &nbsp;</div><div class="table-cell-details">{{ server.rtime }} s</div></div>
<div class="table-row"><div class="table-cell-details tight">{{ label_last_online }}: &nbsp;</div><div class="table-cell-details">{{ server.last_online }}</div></div>
</div>
</td>
</tr>
{% endfor %}
</tbody>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th class="hidden-phone">&nbsp;</th>
<th class="hidden-phone">{{ label_label }}</th>
<th class="hidden-phone">{{ label_domain }}</th>
<th class="visible-desktop">{{ label_port }}</th>
<th class="visible-desktop">{{ label_type }}</th>
<th class="hidden-phone">{{ label_rtime }}</th>
<th class="hidden-phone">{{ label_last_online }}</th>
<th class="hidden-phone">{{ label_monitoring }}</th>
<th class="hidden-phone">{{ label_action }}</th>
</tr>
</thead>
<tbody>
{% for server in servers %}
<tr>
<td class="hidden-phone"><div class="table-cell-title"><span class="label label-status-{{ server.status }}"><a href="{{ server.url_view|raw }}" title="{{ server.error }}">{{ server.status }}</a></span></div></td>
<td class="hidden-phone"><div class="table-cell-title"><a href="{{ server.url_view|raw }}">{{ server.label }}</a></div></td>
<td class="nowrap visible-tablet"><div class="table-cell-title"><i class="{{ server.type_icon }}" title="{{ server.type }}"></i> {{ server.ip_short|raw }}</div></td>
<td class="nowrap visible-desktop"><div class="table-cell-title">{{ server.ip|raw }}</div></td>
<td class="nowrap visible-desktop"><div class="table-cell-title">{{ server.port }}</div></td>
<td class="nowrap visible-desktop"><div class="table-cell-title">{{ server.type }}</div></td>
<td class="nowrap hidden-phone"><div class="table-cell-title">{{ server.rtime }} s</div></td>
<td class="nowrap hidden-phone"><div class="table-cell-title">{{ server.last_online }}</div></td>
<td class="tight hidden-phone"><div class="table-cell-title"><i class="{{ server.active_icon }}" title="{{ server.active_title }}"></i> <i class="{{ server.email_icon }}" title="{{ label_email }}"></i> <i class="{{ server.sms_icon }}" title="{{ label_sms }}"></i> <i class="{{ server.pushover_icon }}" title="Pushover"></i></div></td>
<td class="tight hidden-phone">
<div class="table-cell-title">
<a class="btn btn-small" href="{{ server.url_view|raw }}"><i class="icon-chart"></i></a>
{% if user_level == 10 %}
<a class="btn btn-small" href="{{ server.url_edit|raw }}" title="{{ label_edit }}"><i class="icon-pencil"></i></a>
<a class="btn btn-small btn-danger show-modal" href="{{ server.url_delete|raw }}" title="{{ label_delete }}" data-modal-id="delete" data-modal-param="{{ server.label }}"><i class="icon-remove icon-white"></i></a>
{% endif %}
</div>
</td>
<td class="visible-phone">
<div class="table-body">
<div class="table-cell-title">
<span class="label label-status-{{ server.status }}"><a href="{{ server.url_view|raw }}" title="{{ server.error }}">{{ server.status }}</a></span>
<a class="title" href="{{ server.url_view|raw }}">{{ server.label }}</a>
</div>
<div class="table-cell tight">
&nbsp;<a class="btn btn-small" href="{{ server.url_view|raw }}"><i class="icon-chart"></i></a>
{% if user_level == 10 %}
<a class="btn btn-small" href="{{ server.url_edit|raw }}" title="{{ label_edit }}"><i class="icon-pencil"></i></a>
<a class="btn btn-small btn-danger show-modal" href="{{ server.url_delete|raw }}" title="{{ label_delete }}" data-modal-id="delete" data-modal-param="{{ server.label }}"><i class="icon-remove icon-white"></i></a>
{% endif %}
</div>
</div>
<div class="table-body">
<div class="table-row">
<div class="table-cell"><i class="{{ server.type_icon }}" title="{{ server.type }}"></i> {{ server.ip_short|raw }}</div>
<div class="table-cell tight">
<i class="{{ server.active_icon }}" title="{{ server.active_title }}"></i> <i class="{{ server.email_icon }}" title="{{ label_email }}"></i> <i class="{{ server.sms_icon }}" title="{{ label_sms }}"></i> <i class="{{ server.pushover_icon }}" title="Pushover"></i>
</div>
</div>
</div>
<div class="table-body">
<div class="table-row"><div class="table-cell-details tight">{{ label_rtime }}: &nbsp;</div><div class="table-cell-details">{{ server.rtime }} s</div></div>
<div class="table-row"><div class="table-cell-details tight">{{ label_last_online }}: &nbsp;</div><div class="table-cell-details">{{ server.last_online }}</div></div>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>

View File

@ -1,106 +1,106 @@
<form class="form-horizontal well" action="{{ url_save|raw }}" method="post">
<fieldset>
<legend>{{ titlemode }}</legend>
<div class="control-group">
<label class="control-label" for="label">{{ label_label }}</label>
<div class="controls">
<input type="text" id="label" name="label" value="{{ edit_value_label }}" maxlength="255" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="ip">{{ label_domain }}</label>
<div class="controls">
<input type="text" id="ip" name="ip" value="{{ edit_value_ip }}" maxlength="100" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="type">{{ label_type }}</label>
<div class="controls">
<select id="type" name="type">
<option value="service" {{ edit_type_selected_service|raw }}>{{ label_service }}</option>
<option value="website" {{ edit_type_selected_website|raw }}>{{ label_website }}</option>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label" for="port">{{ label_port }}</label>
<div class="controls">
<input class="input-mini" type="text" id="port" name="port" value="{{ edit_value_port }}" maxlength="5" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="pattern">{{ label_pattern }}</label>
<div class="controls">
<input type="text" id="pattern" name="pattern" value="{{ edit_value_pattern }}" maxlength="255" data-toggle="tooltip" title="{{ label_pattern_description }}" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="warning_threshold">{{ label_warning_threshold }}</label>
<div class="controls">
<input class="input-mini" type="text" id="warning_threshold" name="warning_threshold" value="{{ edit_value_warning_threshold }}" maxlength="5" data-toggle="tooltip" title="{{ label_warning_threshold_description }}" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="timeout">{{ label_timeout }}</label>
<div class="controls">
<input class="input-mini" type="text" id="timeout" name="timeout" value="{{ edit_value_timeout }}" placeholder="{{ default_value_timeout }}" maxlength="10" data-toggle="tooltip" title="{{ label_timeout_description }}" /> s
</div>
</div>
<div class="control-group">
<label class="control-label" for="active">{{ label_monitoring }}</label>
<div class="controls">
<select id="active" name="active">
<option value="yes" {{ edit_active_selected_yes|raw }}>{{ label_yes }}</option>
<option value="no" {{ edit_active_selected_no|raw }}>{{ label_no }}</option>
</select>
</div>
</div>
<div class="control-group {{ control_class_email }}">
<label class="control-label" for="email">{{ label_send_email }}
{% if warning_email %} <p class="help-inline"><i class="icon-warning-sign" data-toggle="tooltip" title="{{ label_warning_email }}"></i></p> {% endif %}
</label>
<div class="controls">
<select id="email" name="email">
<option value="yes" {{ edit_email_selected_yes|raw }}>{{ label_yes }}</option>
<option value="no" {{ edit_email_selected_no|raw }}>{{ label_no }}</option>
</select>
</div>
</div>
<div class="control-group {{ control_class_sms }}">
<label class="control-label" for="sms">{{ label_send_sms }}
{% if warning_sms %} <p class="help-inline"><i class="icon-warning-sign" data-toggle="tooltip" title="{{ label_warning_sms }}"></i></p> {% endif %}
</label>
<div class="controls">
<select id="sms" name="sms">
<option value="yes" {{ edit_sms_selected_yes|raw }}>{{ label_yes }}</option>
<option value="no" {{ edit_sms_selected_no|raw }}>{{ label_no }}</option>
</select>
</div>
</div>
<div class="control-group {{ control_class_pushover }}">
<label class="control-label" for="pushover">{{ label_pushover }}
{% if warning_pushover %} <p class="help-inline"><i class="icon-warning-sign" data-toggle="tooltip" title="{{ label_warning_pushover }}"></i></p> {% endif %}
</label>
<div class="controls">
<select id="pushover" name="pushover">
<option value="yes" {{ edit_pushover_selected_yes|raw }}>{{ label_yes }}</option>
<option value="no" {{ edit_pushover_selected_no|raw }}>{{ label_no }}</option>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label" for="user_id">{{ label_users }}</label>
<div class="controls">
<select class="multiselect" multiple="multiple" id="user_id" name="user_id[]">
{% for user in users %}
<option value="{{ user.user_id }}" {{ user.edit_selected|raw }}> {{ user.name }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="form-actions">
<button class="btn btn-success" type="submit">{{ label_save }}</button>
<a class="btn" href="{{ url_go_back|raw }}" >{{ label_go_back }}</a>
</div>
</fieldset>
<form class="form-horizontal well" action="{{ url_save|raw }}" method="post">
<fieldset>
<legend>{{ titlemode }}</legend>
<div class="control-group">
<label class="control-label" for="label">{{ label_label }}</label>
<div class="controls">
<input type="text" id="label" name="label" value="{{ edit_value_label }}" maxlength="255" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="ip">{{ label_domain }}</label>
<div class="controls">
<input type="text" id="ip" name="ip" value="{{ edit_value_ip }}" maxlength="100" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="type">{{ label_type }}</label>
<div class="controls">
<select id="type" name="type">
<option value="service" {{ edit_type_selected_service|raw }}>{{ label_service }}</option>
<option value="website" {{ edit_type_selected_website|raw }}>{{ label_website }}</option>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label" for="port">{{ label_port }}</label>
<div class="controls">
<input class="input-mini" type="text" id="port" name="port" value="{{ edit_value_port }}" maxlength="5" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="pattern">{{ label_pattern }}</label>
<div class="controls">
<input type="text" id="pattern" name="pattern" value="{{ edit_value_pattern }}" maxlength="255" data-toggle="tooltip" title="{{ label_pattern_description }}" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="warning_threshold">{{ label_warning_threshold }}</label>
<div class="controls">
<input class="input-mini" type="text" id="warning_threshold" name="warning_threshold" value="{{ edit_value_warning_threshold }}" maxlength="5" data-toggle="tooltip" title="{{ label_warning_threshold_description }}" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="timeout">{{ label_timeout }}</label>
<div class="controls">
<input class="input-mini" type="text" id="timeout" name="timeout" value="{{ edit_value_timeout }}" placeholder="{{ default_value_timeout }}" maxlength="10" data-toggle="tooltip" title="{{ label_timeout_description }}" /> s
</div>
</div>
<div class="control-group">
<label class="control-label" for="active">{{ label_monitoring }}</label>
<div class="controls">
<select id="active" name="active">
<option value="yes" {{ edit_active_selected_yes|raw }}>{{ label_yes }}</option>
<option value="no" {{ edit_active_selected_no|raw }}>{{ label_no }}</option>
</select>
</div>
</div>
<div class="control-group {{ control_class_email }}">
<label class="control-label" for="email">{{ label_send_email }}
{% if warning_email %} <p class="help-inline"><i class="icon-warning-sign" data-toggle="tooltip" title="{{ label_warning_email }}"></i></p> {% endif %}
</label>
<div class="controls">
<select id="email" name="email">
<option value="yes" {{ edit_email_selected_yes|raw }}>{{ label_yes }}</option>
<option value="no" {{ edit_email_selected_no|raw }}>{{ label_no }}</option>
</select>
</div>
</div>
<div class="control-group {{ control_class_sms }}">
<label class="control-label" for="sms">{{ label_send_sms }}
{% if warning_sms %} <p class="help-inline"><i class="icon-warning-sign" data-toggle="tooltip" title="{{ label_warning_sms }}"></i></p> {% endif %}
</label>
<div class="controls">
<select id="sms" name="sms">
<option value="yes" {{ edit_sms_selected_yes|raw }}>{{ label_yes }}</option>
<option value="no" {{ edit_sms_selected_no|raw }}>{{ label_no }}</option>
</select>
</div>
</div>
<div class="control-group {{ control_class_pushover }}">
<label class="control-label" for="pushover">{{ label_pushover }}
{% if warning_pushover %} <p class="help-inline"><i class="icon-warning-sign" data-toggle="tooltip" title="{{ label_warning_pushover }}"></i></p> {% endif %}
</label>
<div class="controls">
<select id="pushover" name="pushover">
<option value="yes" {{ edit_pushover_selected_yes|raw }}>{{ label_yes }}</option>
<option value="no" {{ edit_pushover_selected_no|raw }}>{{ label_no }}</option>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label" for="user_id">{{ label_users }}</label>
<div class="controls">
<select class="multiselect" multiple="multiple" id="user_id" name="user_id[]">
{% for user in users %}
<option value="{{ user.user_id }}" {{ user.edit_selected|raw }}> {{ user.name }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="form-actions">
<button class="btn btn-success" type="submit">{{ label_save }}</button>
<a class="btn" href="{{ url_go_back|raw }}" >{{ label_go_back }}</a>
</div>
</fieldset>
</form>

View File

@ -1,4 +1,4 @@
<div class="btn-group" data-toggle="buttons-radio">
<button class="btn {{ block_layout_active }}" data-toggle="tab" data-target="#flow-layout" onclick="psm_saveLayout(0)"><i class="icon-th-large"></i></button>
<button class="btn {{ list_layout_active }}" data-toggle="tab" data-target="#list-layout" onclick="psm_saveLayout(1)"><i class="icon-th-list"></i></button>
<div class="btn-group" data-toggle="buttons-radio">
<button class="btn {{ block_layout_active }}" data-toggle="tab" data-target="#flow-layout" onclick="psm_saveLayout(0)"><i class="icon-th-large"></i></button>
<button class="btn {{ list_layout_active }}" data-toggle="tab" data-target="#list-layout" onclick="psm_saveLayout(1)"><i class="icon-th-list"></i></button>
</div>

View File

@ -1,8 +1,8 @@
<div class="container">
<form class="form-signin" method="post">
<h3 class="form-signin-heading">{{ title_forgot }}</h3>
<input type="text" name="user_name" class="input-block-level" placeholder="{{ label_username }}" value="{{ value_user_name }}" required>
<button class="btn btn-primary" type="submit">{{ label_submit }}</button>
<a class="btn" href="?">{{ label_go_back }}</a>
</form>
<div class="container">
<form class="form-signin" method="post">
<h3 class="form-signin-heading">{{ title_forgot }}</h3>
<input type="text" name="user_name" class="input-block-level" placeholder="{{ label_username }}" value="{{ value_user_name }}" required>
<button class="btn btn-primary" type="submit">{{ label_submit }}</button>
<a class="btn" href="?">{{ label_go_back }}</a>
</form>
</div>

View File

@ -1,13 +1,13 @@
<div class="container">
<form class="form-signin" method="post">
<h3 class="form-signin-heading">{{ title_sign_in }}</h3>
<input type="text" name="user_name" class="input-block-level" placeholder="{{ label_username }}" value="{{ value_user_name }}" required>
<input type="password" name="user_password" class="input-block-level" placeholder="{{ label_password }}" required>
<input type="hidden" name="action" value="login">
<label class="checkbox">
<input type="checkbox" name="user_rememberme" value="1" {{ value_rememberme }}> {{ label_remember_me }}
</label>
<button class="btn btn-primary" type="submit">{{ label_login }}</button>
<a class="btn" href="?action=forgot">{{ label_password_forgot }}</a>
</form>
<div class="container">
<form class="form-signin" method="post">
<h3 class="form-signin-heading">{{ title_sign_in }}</h3>
<input type="text" name="user_name" class="input-block-level" placeholder="{{ label_username }}" value="{{ value_user_name }}" required>
<input type="password" name="user_password" class="input-block-level" placeholder="{{ label_password }}" required>
<input type="hidden" name="action" value="login">
<label class="checkbox">
<input type="checkbox" name="user_rememberme" value="1" {{ value_rememberme }}> {{ label_remember_me }}
</label>
<button class="btn btn-primary" type="submit">{{ label_login }}</button>
<a class="btn" href="?action=forgot">{{ label_password_forgot }}</a>
</form>
</div>

View File

@ -1,10 +1,10 @@
<div class="container">
<form class="form-signin" method="post">
<h3 class="form-signin-heading">{{ title_reset }}</h3>
<input type="text" name="user_name" class="input-block-level" placeholder="{{ label_username }}" value="{{ value_user_name }}" required disabled="disabled">
<input type="password" name="user_password_new" class="input-block-level" placeholder="{{ label_password }}" required autocomplete="off">
<input type="password" name="user_password_repeat" class="input-block-level" placeholder="{{ label_password_repeat }}" required autocomplete="off">
<button class="btn btn-primary" type="submit">{{ label_reset }}</button>
<a class="btn" href="?">{{ label_go_back }}</a>
</form>
<div class="container">
<form class="form-signin" method="post">
<h3 class="form-signin-heading">{{ title_reset }}</h3>
<input type="text" name="user_name" class="input-block-level" placeholder="{{ label_username }}" value="{{ value_user_name }}" required disabled="disabled">
<input type="password" name="user_password_new" class="input-block-level" placeholder="{{ label_password }}" required autocomplete="off">
<input type="password" name="user_password_repeat" class="input-block-level" placeholder="{{ label_password_repeat }}" required autocomplete="off">
<button class="btn btn-primary" type="submit">{{ label_reset }}</button>
<a class="btn" href="?">{{ label_go_back }}</a>
</form>
</div>

View File

@ -1,71 +1,71 @@
<form class="form-horizontal well" action="{{ form_action|raw }}" method="post">
<fieldset>
<div class="row-fluid">
<div class="span6">
<div class="control-group">
<label class="control-label" for="user_name">{{ label_user_name }}</label>
<div class="controls">
<input type="text" id="user_name" name="user_name" value="{{ user_name }}" maxlength="64" required autofocus=>
</div>
</div>
<div class="control-group">
<label class="control-label" for="name">{{ label_name }}</label>
<div class="controls">
<input type="text" id="name" name="name" value="{{ name }}" maxlength="255" required>
</div>
</div>
<div class="control-group">
<label class="control-label" for="level">{{ label_level }}</label>
<div class="controls"><input type="text" value="{{ level }}" disabled="disabled" /></div>
</div>
<div class="control-group">
<label class="control-label" for="password">{{ label_password }}</label>
<div class="controls">
<input type="password" id="password" name="password" maxlength="255" placeholder="{{ placeholder_password }}" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="password_repeat">{{ label_password_repeat }}</label>
<div class="controls">
<input type="password" id="password_repeat" name="password_repeat" maxlength="255" placeholder="{{ placeholder_password }}" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="email">{{ label_email }}</label>
<div class="controls">
<input type="text" id="email" name="email" value="{{ email }}" maxlength="255" required>
</div>
</div>
<div class="control-group">
<label class="control-label" for="email">{{ label_mobile }}</label>
<div class="controls">
<input type="text" id="mobile" name="mobile" value="{{ mobile }}" maxlength="15" />
</div>
</div>
</div>
<div class="span6">
<div class="control-group">
<label class="control-label">{{ label_pushover }}</label>
<div class="controls">{{ label_pushover_description|raw }} </div>
</div>
<div class="control-group">
<label class="control-label" for="mobile">{{ label_pushover_key }}</label>
<div class="controls">
<input type="text" id="pushover_key" name="pushover_key" value="{{ pushover_key }}" maxlength="255" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="mobile">{{ label_pushover_device }}</label>
<div class="controls">
<input type="text" id="pushover_device" name="pushover_device" value="{{ pushover_device }}" maxlength="255" data-toggle="tooltip" title="{{ label_pushover_device_description }}" />
</div>
</div>
</div>
</div>
<div class="row-fluid">
<div class="form-actions">
<button class="btn btn-success" type="submit">{{ label_save }}</button>
</div>
</div>
</fieldset>
<form class="form-horizontal well" action="{{ form_action|raw }}" method="post">
<fieldset>
<div class="row-fluid">
<div class="span6">
<div class="control-group">
<label class="control-label" for="user_name">{{ label_user_name }}</label>
<div class="controls">
<input type="text" id="user_name" name="user_name" value="{{ user_name }}" maxlength="64" required autofocus=>
</div>
</div>
<div class="control-group">
<label class="control-label" for="name">{{ label_name }}</label>
<div class="controls">
<input type="text" id="name" name="name" value="{{ name }}" maxlength="255" required>
</div>
</div>
<div class="control-group">
<label class="control-label" for="level">{{ label_level }}</label>
<div class="controls"><input type="text" value="{{ level }}" disabled="disabled" /></div>
</div>
<div class="control-group">
<label class="control-label" for="password">{{ label_password }}</label>
<div class="controls">
<input type="password" id="password" name="password" maxlength="255" placeholder="{{ placeholder_password }}" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="password_repeat">{{ label_password_repeat }}</label>
<div class="controls">
<input type="password" id="password_repeat" name="password_repeat" maxlength="255" placeholder="{{ placeholder_password }}" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="email">{{ label_email }}</label>
<div class="controls">
<input type="text" id="email" name="email" value="{{ email }}" maxlength="255" required>
</div>
</div>
<div class="control-group">
<label class="control-label" for="email">{{ label_mobile }}</label>
<div class="controls">
<input type="text" id="mobile" name="mobile" value="{{ mobile }}" maxlength="15" />
</div>
</div>
</div>
<div class="span6">
<div class="control-group">
<label class="control-label">{{ label_pushover }}</label>
<div class="controls">{{ label_pushover_description|raw }} </div>
</div>
<div class="control-group">
<label class="control-label" for="mobile">{{ label_pushover_key }}</label>
<div class="controls">
<input type="text" id="pushover_key" name="pushover_key" value="{{ pushover_key }}" maxlength="255" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="mobile">{{ label_pushover_device }}</label>
<div class="controls">
<input type="text" id="pushover_device" name="pushover_device" value="{{ pushover_device }}" maxlength="255" data-toggle="tooltip" title="{{ label_pushover_device_description }}" />
</div>
</div>
</div>
</div>
<div class="row-fluid">
<div class="form-actions">
<button class="btn btn-success" type="submit">{{ label_save }}</button>
</div>
</div>
</fieldset>
</form>

View File

@ -1,66 +1,66 @@
<table class="table table-bordered table-striped">
<thead>
<tr>
<th class="hidden-phone">{{ label_user }}</th>
<th class="visible-desktop">{{ label_name }}</th>
<th class="visible-desktop">{{ label_level }}</th>
<th class="hidden-phone">{{ label_email }}</th>
<th class="hidden-phone">{{ label_mobile }}</th>
<th class="hidden-phone">{{ label_servers }}</th>
<th class="hidden-phone tight">{{ label_action }}</th>
</tr>
</thead>
<tbody>
{% for user in users %}
<tr>
<td>
<div class="table-body">
<div class="table-cell-title">
<span class="nowrap">
<span class="hidden-desktop">
{% if user.level == '10' %}
<i class="icon-admin" title="{{ user.level_text }}"></i>&nbsp;
{% elseif user.level == '20' %}
<i class="icon-user" title="{{ user.level_text }}"></i>&nbsp;
{% endif %}
</span>
<span class="title">{{ user.user_name }}</span>
</span>
<span class="hidden-desktop">({{ user.name }})</span>
</div>
<div class="table-cell tight">
<div class="visible-phone">
<a class="btn btn-small" href="{{ user.url_edit|raw }}" title="{{ user.label_edit }}">
<i class="icon-pencil"></i>
</a>
<a class="btn btn-small btn-danger show-modal" href="{{ user.url_delete|raw }}" title="{{ label_delete }}" data-modal-id="delete" data-modal-param="{{ user.user_name }}">
<i class="icon-remove icon-white"></i>
</a>
</div>
</div>
</div>
<div class="visible-phone">
<div class="table-body">
<div class="table-row"><div class="table-cell-details tight">{{ label_email }}:&nbsp;</div><div class="table-cell-details">{{ user.email }}</div></div>
<div class="table-row"><div class="table-cell-details tight">{{ label_mobile }}:&nbsp;</div><div class="table-cell-details">{{ user.mobile }}</div></div>
<div class="table-row"><div class="table-cell-details tight">{{ label_servers }}:&nbsp;</div><div class="table-cell-details">{% for server in user.emp_servers %} {{ server.label }}<br/> {% endfor %}</div></div>
</div>
</div>
</td>
<td class="visible-desktop nowrap"><div class="table-cell-title">{{ user.name }}</div></td>
<td class="visible-desktop tight"><div class="table-cell-title">{{ user.level_text }}</div></td>
<td class="hidden-phone tight"><div class="table-cell-title">{{ user.email }}</div></td>
<td class="hidden-phone tight"><div class="table-cell-title">{{ user.mobile }}</div></td>
<td class="hidden-phone"><div class="table-cell-title">{% for server in user.emp_servers %} {{ server.label }}<br/> {% endfor %}</div></td>
<td class="hidden-phone tight">
<a class="btn btn-small" href="{{ user.url_edit|raw }}" title="{{ label_edit }}">
<i class="icon-pencil"></i>
</a>
<a class="btn btn-small btn-danger show-modal" href="{{ user.url_delete|raw }}" title="{{ label_delete }}" data-modal-id="delete" data-modal-param="{{ user.user_name }}">
<i class="icon-remove icon-white"></i>
</a>
</td>
</tr>
{% endfor %}
</tbody>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th class="hidden-phone">{{ label_user }}</th>
<th class="visible-desktop">{{ label_name }}</th>
<th class="visible-desktop">{{ label_level }}</th>
<th class="hidden-phone">{{ label_email }}</th>
<th class="hidden-phone">{{ label_mobile }}</th>
<th class="hidden-phone">{{ label_servers }}</th>
<th class="hidden-phone tight">{{ label_action }}</th>
</tr>
</thead>
<tbody>
{% for user in users %}
<tr>
<td>
<div class="table-body">
<div class="table-cell-title">
<span class="nowrap">
<span class="hidden-desktop">
{% if user.level == '10' %}
<i class="icon-admin" title="{{ user.level_text }}"></i>&nbsp;
{% elseif user.level == '20' %}
<i class="icon-user" title="{{ user.level_text }}"></i>&nbsp;
{% endif %}
</span>
<span class="title">{{ user.user_name }}</span>
</span>
<span class="hidden-desktop">({{ user.name }})</span>
</div>
<div class="table-cell tight">
<div class="visible-phone">
<a class="btn btn-small" href="{{ user.url_edit|raw }}" title="{{ user.label_edit }}">
<i class="icon-pencil"></i>
</a>
<a class="btn btn-small btn-danger show-modal" href="{{ user.url_delete|raw }}" title="{{ label_delete }}" data-modal-id="delete" data-modal-param="{{ user.user_name }}">
<i class="icon-remove icon-white"></i>
</a>
</div>
</div>
</div>
<div class="visible-phone">
<div class="table-body">
<div class="table-row"><div class="table-cell-details tight">{{ label_email }}:&nbsp;</div><div class="table-cell-details">{{ user.email }}</div></div>
<div class="table-row"><div class="table-cell-details tight">{{ label_mobile }}:&nbsp;</div><div class="table-cell-details">{{ user.mobile }}</div></div>
<div class="table-row"><div class="table-cell-details tight">{{ label_servers }}:&nbsp;</div><div class="table-cell-details">{% for server in user.emp_servers %} {{ server.label }}<br/> {% endfor %}</div></div>
</div>
</div>
</td>
<td class="visible-desktop nowrap"><div class="table-cell-title">{{ user.name }}</div></td>
<td class="visible-desktop tight"><div class="table-cell-title">{{ user.level_text }}</div></td>
<td class="hidden-phone tight"><div class="table-cell-title">{{ user.email }}</div></td>
<td class="hidden-phone tight"><div class="table-cell-title">{{ user.mobile }}</div></td>
<td class="hidden-phone"><div class="table-cell-title">{% for server in user.emp_servers %} {{ server.label }}<br/> {% endfor %}</div></td>
<td class="hidden-phone tight">
<a class="btn btn-small" href="{{ user.url_edit|raw }}" title="{{ label_edit }}">
<i class="icon-pencil"></i>
</a>
<a class="btn btn-small btn-danger show-modal" href="{{ user.url_delete|raw }}" title="{{ label_delete }}" data-modal-id="delete" data-modal-param="{{ user.user_name }}">
<i class="icon-remove icon-white"></i>
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>

View File

@ -1,82 +1,82 @@
<form class="form-horizontal well" action="{{ url_save|raw }}" method="post">
<fieldset>
<legend>{{ titlemode }}</legend>
<div class="control-group">
<label class="control-label" for="user_name">{{ label_user_name }}</label>
<div class="controls">
<input type="text" id="user_name" name="user_name" value="{{ edit_value_user_name }}" maxlength="64" required>
</div>
</div>
<div class="control-group">
<label class="control-label" for="name">{{ label_name }}</label>
<div class="controls">
<input type="text" id="name" name="name" value="{{ edit_value_name }}" maxlength="255" required>
</div>
</div>
<div class="control-group">
<label class="control-label" for="level">{{ label_level }}</label>
<div class="controls">
<select id="level" name="level">
{% for level in levels %}
<option value="{{ level.value }}" {% if level.value == user_level %} selected="selected" {% endif %}>{{ level.label }}</option>
{% endfor %}
</select>
<p class="help-block">{{ label_level_description|raw }}</p>
</div>
</div>
<div class="control-group">
<label class="control-label" for="password">{{ label_password }}</label>
<div class="controls">
<input type="password" id="password" name="password" maxlength="255" placeholder="{{ placeholder_password }}" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="password_repeat">{{ label_password_repeat }}</label>
<div class="controls">
<input type="password" id="password_repeat" name="password_repeat" maxlength="255" placeholder="{{ placeholder_password }}" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="email">{{ label_email }}</label>
<div class="controls">
<input type="text" id="email" name="email" value="{{ edit_value_email }}" maxlength="255" required>
</div>
</div>
<div class="control-group">
<label class="control-label" for="mobile">{{ label_mobile }}</label>
<div class="controls">
<input type="text" id="mobile" name="mobile" value="{{ edit_value_mobile }}" maxlength="15" />
</div>
</div>
<div class="control-group">
<label class="control-label">{{ label_pushover }}</label>
<div class="controls">{{ label_pushover_description|raw }} </div>
</div>
<div class="control-group">
<label class="control-label" for="mobile">{{ label_pushover_key }}</label>
<div class="controls">
<input type="text" id="pushover_key" name="pushover_key" value="{{ edit_value_pushover_key }}" maxlength="255" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="mobile">{{ label_pushover_device }}</label>
<div class="controls">
<input type="text" id="pushover_device" name="pushover_device" value="{{ edit_value_pushover_device }}" maxlength="255" data-toggle="tooltip" title="{{ label_pushover_device_description }}" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="server_id">{{ label_servers }}</label>
<div class="controls">
<select class="multiselect" multiple="multiple" id="server_id" name="server_id[]">
{% for server in servers %}
<option value="{{ server.server_id }}" {{ server.edit_selected }}> {{ server.label }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="form-actions">
<button class="btn btn-success" type="submit">{{ label_save }}</button>
<button class="btn" onclick="history.back();return false;" >{{ label_go_back }}</button>
</div>
</fieldset>
<form class="form-horizontal well" action="{{ url_save|raw }}" method="post">
<fieldset>
<legend>{{ titlemode }}</legend>
<div class="control-group">
<label class="control-label" for="user_name">{{ label_user_name }}</label>
<div class="controls">
<input type="text" id="user_name" name="user_name" value="{{ edit_value_user_name }}" maxlength="64" required>
</div>
</div>
<div class="control-group">
<label class="control-label" for="name">{{ label_name }}</label>
<div class="controls">
<input type="text" id="name" name="name" value="{{ edit_value_name }}" maxlength="255" required>
</div>
</div>
<div class="control-group">
<label class="control-label" for="level">{{ label_level }}</label>
<div class="controls">
<select id="level" name="level">
{% for level in levels %}
<option value="{{ level.value }}" {% if level.value == user_level %} selected="selected" {% endif %}>{{ level.label }}</option>
{% endfor %}
</select>
<p class="help-block">{{ label_level_description|raw }}</p>
</div>
</div>
<div class="control-group">
<label class="control-label" for="password">{{ label_password }}</label>
<div class="controls">
<input type="password" id="password" name="password" maxlength="255" placeholder="{{ placeholder_password }}" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="password_repeat">{{ label_password_repeat }}</label>
<div class="controls">
<input type="password" id="password_repeat" name="password_repeat" maxlength="255" placeholder="{{ placeholder_password }}" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="email">{{ label_email }}</label>
<div class="controls">
<input type="text" id="email" name="email" value="{{ edit_value_email }}" maxlength="255" required>
</div>
</div>
<div class="control-group">
<label class="control-label" for="mobile">{{ label_mobile }}</label>
<div class="controls">
<input type="text" id="mobile" name="mobile" value="{{ edit_value_mobile }}" maxlength="15" />
</div>
</div>
<div class="control-group">
<label class="control-label">{{ label_pushover }}</label>
<div class="controls">{{ label_pushover_description|raw }} </div>
</div>
<div class="control-group">
<label class="control-label" for="mobile">{{ label_pushover_key }}</label>
<div class="controls">
<input type="text" id="pushover_key" name="pushover_key" value="{{ edit_value_pushover_key }}" maxlength="255" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="mobile">{{ label_pushover_device }}</label>
<div class="controls">
<input type="text" id="pushover_device" name="pushover_device" value="{{ edit_value_pushover_device }}" maxlength="255" data-toggle="tooltip" title="{{ label_pushover_device_description }}" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="server_id">{{ label_servers }}</label>
<div class="controls">
<select class="multiselect" multiple="multiple" id="server_id" name="server_id[]">
{% for server in servers %}
<option value="{{ server.server_id }}" {{ server.edit_selected }}> {{ server.label }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="form-actions">
<button class="btn btn-success" type="submit">{{ label_save }}</button>
<button class="btn" onclick="history.back();return false;" >{{ label_go_back }}</button>
</div>
</fieldset>
</form>

View File

@ -1,14 +1,14 @@
<div id="{{ modal_id }}Modal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="{{ modal_id }}ModalLabel" aria-hidden="true">
<div class="modal-header">
<h3 id="{{ modal_id }}ModalLabel">{{ modal_title }}</h3>
</div>
<div class="modal-body">
<p>{{ modal_body|raw }}</p>
</div>
<div class="modal-footer">
{% if has_cancel %}
<button class="btn btn-default" data-dismiss="modal" aria-hidden="true">{{ label_cancel }}</button>
{% endif %}
<button class="btn btn-{{ modal_button_type }} modalOKButton" >{{ modal_button_label }}</button>
</div>
</div>
<div id="{{ modal_id }}Modal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="{{ modal_id }}ModalLabel" aria-hidden="true">
<div class="modal-header">
<h3 id="{{ modal_id }}ModalLabel">{{ modal_title }}</h3>
</div>
<div class="modal-body">
<p>{{ modal_body|raw }}</p>
</div>
<div class="modal-footer">
{% if has_cancel %}
<button class="btn btn-default" data-dismiss="modal" aria-hidden="true">{{ label_cancel }}</button>
{% endif %}
<button class="btn btn-{{ modal_button_type }} modalOKButton" >{{ modal_button_label }}</button>
</div>
</div>

View File

@ -1,26 +1,26 @@
<div id="sidebar-container">
<div class="sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header">{{ subtitle }}</li>
{% for item in items %}
<li class="{{ item.class_active }}">
{% if item.type == 'link' %}
<a href="{{ item.url|raw }}"><i class="icon-{{ item.icon }}"></i>&nbsp;{{ item.label }}</a>
{% elseif item.type == 'button' %}
<button class="btn btn-{{ item.btn_class }}" onclick="{{ item.onclick|raw }}"><i class="icon-{{ item.icon }}"></i>&nbsp;{{ item.label }}</button>
{% elseif item.type == 'dropdown' %}
<div class="btn-group">
<button class="btn btn-{{ item.btn_class }} dropdown-toggle" data-toggle="dropdown"><i class="icon-{{ item.icon }}"></i>&nbsp;{{ item.label }} <span class="caret"></span></button>
<ul class="dropdown-menu">
{% for option in item.options %}
<li class="{{ option.class_active }}"><a href="{{ option.url|raw }}">{{ option.label }}</a></li>
{% endfor %}
</ul>
</div>
{% endif %}
</li>
{% endfor %}
</ul>
<div class="clearfix"></div>
</div>
<div id="sidebar-container">
<div class="sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header">{{ subtitle }}</li>
{% for item in items %}
<li class="{{ item.class_active }}">
{% if item.type == 'link' %}
<a href="{{ item.url|raw }}"><i class="icon-{{ item.icon }}"></i>&nbsp;{{ item.label }}</a>
{% elseif item.type == 'button' %}
<button class="btn btn-{{ item.btn_class }}" onclick="{{ item.onclick|raw }}"><i class="icon-{{ item.icon }}"></i>&nbsp;{{ item.label }}</button>
{% elseif item.type == 'dropdown' %}
<div class="btn-group">
<button class="btn btn-{{ item.btn_class }} dropdown-toggle" data-toggle="dropdown"><i class="icon-{{ item.icon }}"></i>&nbsp;{{ item.label }} <span class="caret"></span></button>
<ul class="dropdown-menu">
{% for option in item.options %}
<li class="{{ option.class_active }}"><a href="{{ option.url|raw }}">{{ option.label }}</a></li>
{% endfor %}
</ul>
</div>
{% endif %}
</li>
{% endfor %}
</ul>
<div class="clearfix"></div>
</div>
</div>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long