Skip to content

Commit

Permalink
bugfix for output var missing
Browse files Browse the repository at this point in the history
  • Loading branch information
petersem committed Dec 29, 2023
1 parent f7c02d9 commit 8912f8e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,12 @@ async function list(){
}
else{
// if only offline is set, then only show state changes that are offline
var output = c.Names[0].replace("/","") + ": " + c.State + " " + hcStatus;
if(SHA.toLowerCase()=='true'){
output += " " + c.ImageID
}
if(ONLY_OFFLINE_STATES=='true'){
if(offlineStates.includes(c.State) || offlineStates.includes(c.State + " " + hcStatus)){
var output = c.Names[0].replace("/","") + ": " + c.State + " " + hcStatus;
if(SHA.toLowerCase()=='true'){
output += " " + c.ImageID
}
console.log(" - " + output);
send(output);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "monocker",
"version": "2.8.1",
"version": "2.8.2",
"description": "Monitors and alerts for docker containers state changes",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 8912f8e

Please sign in to comment.