mirror of https://github.com/nicolargo/glances.git
Browser do not working
This commit is contained in:
parent
825b9879c8
commit
5274339774
|
|
@ -112,7 +112,7 @@ Optional dependencies:
|
|||
- ``influxdb-client`` (for the InfluxDB version 2 export module)
|
||||
- ``jinja2`` (for templating, used under the hood by FastAPI)
|
||||
- ``kafka-python`` (for the Kafka export module)
|
||||
- ``netifaces-plus`` (for the IP plugin)
|
||||
- ``netifaces2`` (for the IP plugin)
|
||||
- ``nvidia-ml-py`` (for the GPU plugin)
|
||||
- ``pycouchdb`` (for the CouchDB export module)
|
||||
- ``pika`` (for the RabbitMQ/ActiveMQ export module)
|
||||
|
|
|
|||
|
|
@ -9,10 +9,7 @@
|
|||
# WARNING: the Alpine image version and Python version should be set.
|
||||
# Alpine 3.18 tag is a link to the latest 3.18.x version.
|
||||
# Be aware that if you change the Alpine version, you may have to change the Python version.
|
||||
|
||||
# Netifaces (and Netifaces-plus) are not compliant with GCC embeded in Alpine 3.21
|
||||
# See: https://github.com/tsukumijima/netifaces-plus/issues/9
|
||||
ARG IMAGE_VERSION=3.20
|
||||
ARG IMAGE_VERSION=3.21
|
||||
ARG PYTHON_VERSION=3.12
|
||||
|
||||
##############################################################################
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ class PluginModel(GlancesPluginModel):
|
|||
def get_private_ip(self, stats, stop=False):
|
||||
# Get the default gateway thanks to the netifaces lib
|
||||
try:
|
||||
default_gw = netifaces.gateways()['default'][netifaces.AF_INET]
|
||||
default_gw = netifaces.gateways()[netifaces.AF_INET][0]
|
||||
except (KeyError, AttributeError) as e:
|
||||
logger.debug(f"Cannot grab default gateway IP address ({e})")
|
||||
stop = True
|
||||
|
|
@ -99,7 +99,7 @@ class PluginModel(GlancesPluginModel):
|
|||
|
||||
def get_first_ip(self, stats, stop=False):
|
||||
try:
|
||||
default_gw = netifaces.gateways()['default'][netifaces.AF_INET]
|
||||
default_gw = netifaces.gateways()[netifaces.AF_INET][0]
|
||||
address = netifaces.ifaddresses(default_gw[1])[netifaces.AF_INET][0]['addr']
|
||||
mask = netifaces.ifaddresses(default_gw[1])[netifaces.AF_INET][0]['netmask']
|
||||
except (KeyError, AttributeError) as e:
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ class GlancesPortsList:
|
|||
if default_gateway.lower().startswith('true') and netifaces_tag:
|
||||
new_port = {}
|
||||
try:
|
||||
new_port['host'] = netifaces.gateways()['default'][netifaces.AF_INET][0]
|
||||
new_port['host'] = netifaces.gateways()[netifaces.AF_INET][0][0]
|
||||
except KeyError:
|
||||
new_port['host'] = None
|
||||
# ICMP
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ class GlancesAutoDiscoverClient:
|
|||
import netifaces
|
||||
|
||||
# Interface of the default gateway
|
||||
gateway_itf = netifaces.gateways()['default'][netifaces.AF_INET][1]
|
||||
gateway_itf = netifaces.gateways()[netifaces.AF_INET][0][1]
|
||||
# IP address for the interface
|
||||
return netifaces.ifaddresses(gateway_itf)[netifaces.AF_INET][0]['addr']
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ influxdb>=1.0.0 # For InfluxDB < 1.8
|
|||
influxdb-client # For InfluxDB >= 1.8
|
||||
jinja2
|
||||
kafka-python
|
||||
netifaces-plus
|
||||
netifaces2
|
||||
nvidia-ml-py
|
||||
orjson
|
||||
paho-mqtt
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ export = [
|
|||
]
|
||||
gpu = ["nvidia-ml-py"]
|
||||
graph = ["pygal"]
|
||||
ip = ["netifaces-plus"]
|
||||
ip = ["netifaces2"]
|
||||
raid = ["pymdstat"]
|
||||
sensors = ["batinfo; platform_system == 'Linux'"]
|
||||
smart = ["pySMART.smartx"]
|
||||
|
|
|
|||
Loading…
Reference in New Issue