Coder Social home page Coder Social logo

desertfireballnetwork / desert-fireball-gui_classic Goto Github PK

View Code? Open in Web Editor NEW

This project forked from probablyadev/dfn-maintenance-gui-backend

0.0 0.0 1.0 5.22 MB

A web-based GUI for camera maintenance in the DFN, classic version, py2.7/web.py

Python 39.01% Shell 1.50% JavaScript 20.70% HTML 29.86% CSS 0.57% SCSS 1.59% Sass 6.78%

desert-fireball-gui_classic's People

Contributors

campbellpedersen avatar martincupak avatar morvan68 avatar probablyadev avatar

Watchers

 avatar  avatar  avatar

Forkers

madecicco

desert-fireball-gui_classic's Issues

Error 500 when there is no internet connection

Observed recently in Oman. When the camera has no Internet connection, the basic self check status after login to GUI will not work, but print error 500. That is a bit desperate situation in the field...

GUI log:

172.16.1.134:49822 - - [13/Feb/2022 15:33:18] "HTTP/1.1 GET /" - 200 OK
172.16.1.134:49822 - - [13/Feb/2022 15:33:35] "HTTP/1.1 POST /" - 303 See Other
172.16.1.134:49822 - - [13/Feb/2022 15:33:35] "HTTP/1.1 GET /app" - 200 OK
172.16.1.134:49823 - - [13/Feb/2022 15:33:35] "HTTP/1.1 GET /gethostname" - 200 OK
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 239, in process
    return self.handle()
  File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 230, in handle
    return self._delegate(fn, self.fvars, args)
  File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 462, in _delegate
    return handle_class(cls)
  File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 438, in handle_class
    return tocall(*args)
  File "/opt/dfn-software/GUI/web_gui_server.py", line 1058, in GET
    vpnFeedback, vpnBoolean = commandSender.vpnStatus()
  File "/opt/dfn-software/GUI/commandSender.py", line 857, in vpnStatus
    if "0" not in re.split(",", consoleOutput)[1]:
IndexError: list index out of range

172.16.1.134:49822 - - [13/Feb/2022 15:33:36] "HTTP/1.1 GET /systemstatus" - 500 Internal Server Error
172.16.1.134:49822 - - [13/Feb/2022 15:33:41] "HTTP/1.1 GET /modemstatus" - 200 OK
172.16.1.134:49825 - - [13/Feb/2022 15:33:53] "HTTP/1.1 GET /internetcheck" - 200 OK
172.16.1.134:49825 - - [13/Feb/2022 15:33:55] "HTTP/1.1 GET /modemstatus" - 200 OK
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 239, in process
    return self.handle()
  File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 230, in handle
    return self._delegate(fn, self.fvars, args)
  File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 462, in _delegate
    return handle_class(cls)
  File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 438, in handle_class
    return tocall(*args)
  File "/opt/dfn-software/GUI/web_gui_server.py", line 1058, in GET
    vpnFeedback, vpnBoolean = commandSender.vpnStatus()
  File "/opt/dfn-software/GUI/commandSender.py", line 857, in vpnStatus
    if "0" not in re.split(",", consoleOutput)[1]:
IndexError: list index out of range

172.16.1.134:49825 - - [13/Feb/2022 15:34:03] "HTTP/1.1 GET /systemstatus" - 500 Internal Server Error
172.16.1.134:49827 - - [13/Feb/2022 15:34:18] "HTTP/1.1 GET /hddcheck" - 200 OK
172.16.1.134:49829 - - [13/Feb/2022 15:34:41] "HTTP/1.1 GET /camerastatus" - 200 OK
172.16.1.134:49829 - - [13/Feb/2022 15:34:49] "HTTP/1.1 GET /modemstatus" - 200 OK
172.16.1.134:49829 - - [13/Feb/2022 15:34:52] "HTTP/1.1 GET /restartmodem" - 200 OK
172.16.1.134:49829 - - [13/Feb/2022 15:34:53] "HTTP/1.1 GET /internetcheck" - 200 OK
172.16.1.134:49832 - - [13/Feb/2022 15:35:07] "HTTP/1.1 GET /modemstatus" - 200 OK
172.16.1.134:49832 - - [13/Feb/2022 15:35:11] "HTTP/1.1 GET /populateconfigbox" - 200 OK
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 239, in process
    return self.handle()
  File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 230, in handle
    return self._delegate(fn, self.fvars, args)
  File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 462, in _delegate
    return handle_class(cls)
  File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 438, in handle_class
    return tocall(*args)
  File "/opt/dfn-software/GUI/web_gui_server.py", line 1020, in GET
    data['consoleFeedback'] = commandSender.updateConfigFile(web.input())
  File "/opt/dfn-software/GUI/commandSender.py", line 967, in updateConfigFile
    dfn_functions.save_config_file(r"/opt/dfn-software/dfnstation.cfg", updated_conf_dict)
  File "/opt/dfn-software/dfn_functions.py", line 99, in save_config_file
    return config_handler.save_config_file(fname, conf_dict)
  File "/opt/dfn-software/config_handler.py", line 367, in save_config_file
    os.rename(fname, fname + '.' + datetime.datetime.now().strftime('%s'))
NameError: global name 'datetime' is not defined

172.16.1.134:49834 - - [13/Feb/2022 15:35:23] "HTTP/1.1 GET /updateconfigfile" - 500 Internal Server Error
172.16.1.134:49834 - - [13/Feb/2022 15:35:27] "HTTP/1.1 GET /populateconfigbox" - 200 OK
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 239, in process
    return self.handle()
  File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 230, in handle
    return self._delegate(fn, self.fvars, args)
  File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 462, in _delegate
    return handle_class(cls)
  File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 438, in handle_class
    return tocall(*args)
  File "/opt/dfn-software/GUI/web_gui_server.py", line 1020, in GET
    data['consoleFeedback'] = commandSender.updateConfigFile(web.input())
  File "/opt/dfn-software/GUI/commandSender.py", line 967, in updateConfigFile
    dfn_functions.save_config_file(r"/opt/dfn-software/dfnstation.cfg", updated_conf_dict)
  File "/opt/dfn-software/dfn_functions.py", line 99, in save_config_file
    return config_handler.save_config_file(fname, conf_dict)
  File "/opt/dfn-software/config_handler.py", line 367, in save_config_file
    os.rename(fname, fname + '.' + datetime.datetime.now().strftime('%s'))
NameError: global name 'datetime' is not defined

172.16.1.134:49834 - - [13/Feb/2022 15:35:33] "HTTP/1.1 GET /updateconfigfile" - 500 Internal Server Error
172.16.1.134:49834 - - [13/Feb/2022 15:35:38] "HTTP/1.1 GET /populateconfigbox" - 200 OK

after login automatic status check may confuse leostick micro

The after login status check in the Web GUI includes checking of the GPS lock status by query of leostick and parsing its reply.
However, this can happen at unlucky time when eg the internal control SW talks to leostick.
At least once this happened (on 023 in Oman)
The leostick was then no longer able to communicate, making the web GUI stuck forever - unable to perform any actions. And obviously, this failure mode of the micro means the whole system stops capturing still images and moving data to magnetic drives.
The only way to fix this is to remotely login with ssh and cold reset the system, which resets the leostick as well.
Proposed Fix:

  1. The web GUI code needs to be changed to either exclude the GPS check (and other communications with the micro) on login or
  2. (better) put there some timeout so that the user could
    a) see a message what is wrong (leostick communication timeout/failure)
    b) execute corrective action - reset the system from the Web GUI
    Note: some users are unable to use commandline.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.