web dashboard in single container
This commit is contained in:
@ -21,6 +21,7 @@ import base64, hashlib
|
||||
from typing import Dict, Any, List
|
||||
# Import Cosmos Settings
|
||||
from Cosmos_Settings import *
|
||||
from Helpers import *
|
||||
|
||||
#################################################################
|
||||
### Cosmostat Server Class
|
||||
@ -197,16 +198,3 @@ class CosmostatClient:
|
||||
|
||||
def get_redis(self):
|
||||
return self.redis_data
|
||||
|
||||
# subnet helper app
|
||||
def is_ip_in_subnets(ip, subnet):
|
||||
try:
|
||||
ip_obj = ipaddress.IPv4Address(ip)
|
||||
subnet_obj = ipaddress.IPv4Network(subnet)
|
||||
if ip_obj in subnet_obj:
|
||||
return True
|
||||
return False
|
||||
except ValueError as e:
|
||||
# If the IP address is not valid, raise an error
|
||||
return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user