mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2024-11-22 15:20:09 +01:00
Merge pull request #254 from Upellift99/main
Enabling use of underscores in configuration name
This commit is contained in:
commit
4aed647865
@ -568,7 +568,8 @@ Bug Fixed:
|
|||||||
- [jQuery](https://jquery.com) `v3.5.1`
|
- [jQuery](https://jquery.com) `v3.5.1`
|
||||||
- Python
|
- Python
|
||||||
- [Flask](https://pypi.org/project/Flask/) `v2.0.1`
|
- [Flask](https://pypi.org/project/Flask/) `v2.0.1`
|
||||||
- [ifcfg](https://pypi.org/project/ifcfg/) `v0.21`
|
- [ifcfg](https://pypi.org/project/ifcfg/) `v0.24`
|
||||||
|
- [psutil](https://pypi.org/project/psutil/) `v5.9.8`
|
||||||
- [icmplib](https://pypi.org/project/icmplib/) `v2.1.1`
|
- [icmplib](https://pypi.org/project/icmplib/) `v2.1.1`
|
||||||
- [flask-qrcode](https://pypi.org/project/Flask-QRcode/) `v3.0.0`
|
- [flask-qrcode](https://pypi.org/project/Flask-QRcode/) `v3.0.0`
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ from datetime import datetime, timedelta
|
|||||||
from operator import itemgetter
|
from operator import itemgetter
|
||||||
# PIP installed library
|
# PIP installed library
|
||||||
import ifcfg
|
import ifcfg
|
||||||
|
import psutil
|
||||||
from flask import Flask, request, render_template, redirect, url_for, session, jsonify, g
|
from flask import Flask, request, render_template, redirect, url_for, session, jsonify, g
|
||||||
from flask_qrcode import QRcode
|
from flask_qrcode import QRcode
|
||||||
from icmplib import ping, traceroute
|
from icmplib import ping, traceroute
|
||||||
@ -472,8 +473,8 @@ def get_conf_status(config_name):
|
|||||||
@param config_name:
|
@param config_name:
|
||||||
@return: Return a string indicate the running status
|
@return: Return a string indicate the running status
|
||||||
"""
|
"""
|
||||||
ifconfig = dict(ifcfg.interfaces().items())
|
addrs = psutil.net_if_addrs()
|
||||||
return "running" if config_name in ifconfig.keys() else "stopped"
|
return "running" if config_name in addrs else "stopped"
|
||||||
|
|
||||||
|
|
||||||
def get_conf_list():
|
def get_conf_list():
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
Flask
|
Flask
|
||||||
ifcfg
|
ifcfg
|
||||||
|
psutil
|
||||||
icmplib
|
icmplib
|
||||||
flask-qrcode
|
flask-qrcode
|
||||||
gunicorn
|
gunicorn
|
||||||
|
Loading…
Reference in New Issue
Block a user