1
0
Fork 0

Compare commits

..

4 Commits

Author SHA1 Message Date
Noxcis 46da2c3537
Merge a4151800f1 into 4aed647865 2024-02-02 15:01:56 +02:00
Donald Zou 4aed647865
Merge pull request #254 from Upellift99/main
Enabling use of underscores in configuration name
2024-02-01 18:39:05 -05:00
John 74ab7aaa3d Enabling use of underscores in configuration name. 2024-02-01 09:53:04 +01:00
John dcf2055851 Enabling use of underscores in configuration name. 2024-02-01 09:47:52 +01:00
3 changed files with 6 additions and 3 deletions

View File

@ -568,7 +568,8 @@ Bug Fixed:
- [jQuery](https://jquery.com) `v3.5.1`
- Python
- [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`
- [flask-qrcode](https://pypi.org/project/Flask-QRcode/) `v3.0.0`

View File

@ -21,6 +21,7 @@ from datetime import datetime, timedelta
from operator import itemgetter
# PIP installed library
import ifcfg
import psutil
from flask import Flask, request, render_template, redirect, url_for, session, jsonify, g
from flask_qrcode import QRcode
from icmplib import ping, traceroute
@ -472,8 +473,8 @@ def get_conf_status(config_name):
@param config_name:
@return: Return a string indicate the running status
"""
ifconfig = dict(ifcfg.interfaces().items())
return "running" if config_name in ifconfig.keys() else "stopped"
addrs = psutil.net_if_addrs()
return "running" if config_name in addrs else "stopped"
def get_conf_list():

View File

@ -1,5 +1,6 @@
Flask
ifcfg
psutil
icmplib
bcrypt
flask-qrcode