statusengine / interface

AngularJS based Web Interface for Statusengine
https://statusengine.org/ui/#overview
GNU General Public License v3.0
18 stars 7 forks source link

schedule downtime 15 min becomes 15 hours #45

Closed skaynl closed 4 years ago

skaynl commented 4 years ago

I have this strange problem with the statusengine-ui, if I schedule a downtime for a host for 30 min or other times (tested a few) everything works fine. But if I choose the 15 min option it's scheduling the downtime for 15 hours setdowntime15min resultdowntime15min I'm running a test environment of it all at home and there I don't have this issue. But I'm wondering if anyone can tell me where to look to solve this issue at work.

nook24 commented 4 years ago

This got fixed a while ago: https://github.com/statusengine/interface/commit/bfbf9646e70e6608b4577d2f235f9401663fa519

Please update Statusengine UI to resolve the issue. Docs: https://statusengine.org/ui/#how-to-update

Daniel

skaynl commented 4 years ago

Thanks, for the update…. Updating was the first thing I tried I going to look into it some more!

From: Daniel notifications@github.com Sent: Thursday, 25 June 2020 12:06 To: statusengine/interface interface@noreply.github.com Cc: skay skay@skay.nl; Author author@noreply.github.com Subject: Re: [statusengine/interface] schedule downtime 15 min becomes 15 hours (#45)

This got fixed a while ago: bfbf964https://github.com/statusengine/interface/commit/bfbf9646e70e6608b4577d2f235f9401663fa519

Please update Statusengine UI to resolve the issue. Docs: https://statusengine.org/ui/#how-to-update

Daniel

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/statusengine/interface/issues/45#issuecomment-649443616, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAXCJEVKNMYNQ65YX7WJWJDRYMOQDANCNFSM4OIEAUIQ.

skaynl commented 4 years ago

I renamed the /usr/share/statusengine-ui to statusengine-ui-old to be sure I got all files anew with git clone, copied config.yml.example to config.yml and only changed use_crate: 0 and use_mysql: 1 and pasted the password from the old config.yml file. So everything should be set to the latest files but still I get
EXTERNAL COMMAND: SCHEDULE_HOST_SVC_DOWNTIME;**;1593081572;1593135572;1;0;54000;admin;test 1;0;54000 -> 1 minute from now but 54000 is still equal to 15 hours.

I tried adding a 14 min option in public/templates/modals/submitHostDowntime.html option value="{{ 60 * 14}}" 14 minutes /option option value="900" 15 minutes /option just for testing but that doesn't show up in the menu... it's as if the system is working from another folder but I looked for one and couldn't find any files matching the files from /usr/share/statusengine-ui

skaynl commented 4 years ago

oh wtf.... colleage must have moved the folder to /var/www/html.... I found files there! the basterd :P

skaynl commented 4 years ago

Still with apache now pointing to the right folder (/usr/share/statuseng..) as root document folder I got the 15 hours error! Tried this: option value="{{ 60 * 15}}">15 minutes (1)</option option value="900">15 minutes</option

and the 60*15 works... I'm going to remove the 900 line (in services too)

nook24 commented 4 years ago

I would say you run old code :) Thats from the current master branch:

https://github.com/statusengine/interface/blob/64cb7645ca317b8b5a7712dbdb52718351c3d2d3/public/js/scripts/controllers/SubmitHostDowntimeController.js#L6

https://github.com/statusengine/interface/blob/64cb7645ca317b8b5a7712dbdb52718351c3d2d3/public/js/scripts/controllers/SubmitServiceDowntimeController.js#L5

skaynl commented 4 years ago

is that even possible to have old code if you removed the folder and did a new git clone https://github.com/statusengine/interface.git statusengine-ui?

nook24 commented 4 years ago

No that's not possible...

In addition please check if you have the Date mode, otherwise you run old code ^^ date_mode

skaynl commented 4 years ago

git pull origin master: From https://github.com/statusengine/interface

$scope.end = "900" is found in the following files (I used Midnight Commander to search) SubmitHostDowntimeController.js SubmitServiceDowntimeController.js

Date mode is available

and like I said I got 15 minutes working after changing the templates/models files from: option value="900">15 minutes</option to option value="{{ 60 * 15}}">15 minutes</option

no idea why this corrected the problem (seeing this didn't need to be changed at home installation) but if it works I'm happy ;)

skaynl commented 4 years ago

sorry bit new at github, I see I can close the issue here.