-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #92 from iml-it/set-variable-types
Set variable types
- Loading branch information
Showing
7 changed files
with
59 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,36 @@ | ||
#!/bin/bash | ||
# ====================================================================== | ||
# | ||
# UPDATE APPMONITOR CLIENT | ||
# A P P M O N I T O R :: CLIENT - UPDATE | ||
# | ||
# requires git, rsync | ||
# This script will install or update the appmonitor client only. | ||
# | ||
# Below the document root of a website create a new directory, | ||
# i.e. [webroot]/appmonitor/ and copy this script there. | ||
# Change the directory "cd [webroot]/appmonitor/" and execute it. | ||
# | ||
# ---------------------------------------------------------------------- | ||
# 2022-04-11 <[email protected]> first lines | ||
# 2022-04-12 <[email protected]> add help; exclude unneeded files | ||
# 2022-05-03 <[email protected]> create general_include.php | ||
# requires git, rsync | ||
# ---------------------------------------------------------------------- | ||
# 2022-04-11 0.1 <[email protected]> first lines | ||
# 2022-04-12 0.2 <[email protected]> add help; exclude unneeded files | ||
# 2022-05-03 0.3 <[email protected]> create general_include.php | ||
# 2024-07-25 0.4 <[email protected]> update quoting and comments | ||
# ====================================================================== | ||
|
||
# ---------------------------------------------------------------------- | ||
# CONFIG | ||
# ---------------------------------------------------------------------- | ||
|
||
readonly git_repo_url="https://github.com/iml-it/appmonitor.git" | ||
readonly line="____________________________________________________________" | ||
readonly version="0.3" | ||
readonly line="______________________________________________________________________________" | ||
readonly version="0.4" | ||
|
||
git_target=/tmp/git_data__appmonitor | ||
client_from="${git_target}/public_html/client" | ||
client_to="." | ||
|
||
cd $( dirname "$0" ) || exit 1 | ||
cd "$( dirname "$0" )" || exit 1 | ||
|
||
# ---------------------------------------------------------------------- | ||
# FUNCTIONS | ||
|
@@ -99,6 +106,9 @@ case "$1" in | |
This is a helper script to get the files of the IML Appmonitor | ||
client part only. | ||
Below the document root of a website create a new directory, | ||
i.e. [webroot]/appmonitor/ and copy this script there. | ||
This script clones and updates the repository in the /tmp | ||
directory and syncs the client files of it to a given directory. | ||
|
@@ -165,7 +175,7 @@ _fileupdate general_include.sample.php | |
echo $line | ||
echo ">>> #3 of 3 >>> Diff" | ||
echo | ||
diff -r "$client_from" "$client_to" | ||
diff --color -r "$client_from" "$client_to" | ||
echo | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,7 @@ | |
* | ||
* 2019-06-06 <[email protected]> | ||
* 2024-07-23 <[email protected]> php 8 only: use typed variables | ||
* 2024-07-25 <[email protected]> float return with 2 digits behind comma | ||
* | ||
*/ | ||
class checkLoadmeter extends appmonitorcheck | ||
|
@@ -132,12 +133,12 @@ public function run(array $aParams): array | |
// | ||
return [ | ||
$iResult, | ||
($fLoad === false ? 'load value is not available' : 'current load is: ' . $fLoad), | ||
($fLoad === false ? 'load value is not available' : 'current load is: ' . round($fLoad, 2)), | ||
($fLoad === false | ||
? [] | ||
: [ | ||
'type' => 'counter', | ||
'count' => $fLoad, | ||
'count' => round($fLoad, 2), | ||
'visual' => 'line', | ||
] | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -470,9 +470,9 @@ protected function _generateWebappTiles(string $sAppId): string | |
: ''; | ||
break; | ||
case 'receiver': | ||
$this->oNotification->setApp($sAppId, $this->_data[$sAppId]); | ||
$this->oNotification->setApp($sAppId); | ||
$aEmailNotifiers = $this->oNotification->getAppNotificationdata('email'); | ||
$aSlackChannels = $this->oNotification->getAppNotificationdata('slack', 1); | ||
$aSlackChannels = $this->oNotification->getAppNotificationdata('slack'); | ||
|
||
// $aPeople=[ '[email protected]', '[email protected]' ]; | ||
$sMoreNotify = (count($aEmailNotifiers) ? '<span title="' . implode("\n", $aEmailNotifiers) . '">' . count($aEmailNotifiers) . ' x ' . $this->_aIco['notify-email'] . '</span> ' : '') | ||
|
@@ -1261,7 +1261,7 @@ protected function _renderCounter(string $sAppId, string $sCounterId, array $aOp | |
'xValue' => false, | ||
|
||
'yGrid' => false, | ||
'yLabel' => $aOptions['label'], | ||
// 'yLabel' => $aOptions['label'], | ||
'yLabel' => false, | ||
'yValue' => false, | ||
|
||
|
@@ -1846,6 +1846,7 @@ public function _access_denied(string $sMessage): string | |
'text' => $sMessage, | ||
]); | ||
} | ||
return ''; | ||
} | ||
|
||
/** | ||
|
@@ -2026,7 +2027,7 @@ function _generateWeblist(bool $bSkipOk = false, array $aOptions = []): array | |
$aTags = $aEntries["meta"]["tags"] ?? false; | ||
$sTaglist = $aTags ? $this->_getTaglist($aTags) : ''; | ||
|
||
$this->oNotification->setApp($sAppId, $this->_data[$sAppId]); | ||
$this->oNotification->setApp($sAppId); | ||
|
||
$aLastStatus = $this->oNotification->getAppLastResult(); | ||
$sSince = isset($aLastStatus['laststatus']['result']['ts']) | ||
|
@@ -2208,7 +2209,7 @@ public function generateViewWeblist(): string | |
* it is used to build an url; the "-" will be used to parse the app id | ||
* | ||
* @param string $sAppid | ||
* @return type | ||
* @return string | ||
*/ | ||
protected function _getDivIdForApp(string $sAppid): string | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters