You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.
For VMs that have internet connectivity, I was able to solve it with the following code:
def index(request):
"""Generate a list of FlashArray objects ordered by hostname for the base page."""
# pylint: disable=no-member
def get_address():
try:
address = socket.gethostbyname(socket.gethostname())
# On my system, this always gives me 127.0.0.1. Hence...
except:
address = ''
if not address or address.startswith('127.'):
# ...the hard way.
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(('4.2.2.1', 0))
address = s.getsockname()[0]
return address
ip_addr = get_address()
context = {
'arrays': models.FlashArray.objects.distinct(),
'remote_assist': models.RemoteAssist.objects.distinct(),
'array_status': models.ArrayStatus.objects.distinct(),
'url': 'http://{}'.format(ip_addr),
'grafana': 'http://{}:3000'.format(ip_addr),
}
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When clicking the link for a dashboard, it forwards to localhost, which is not correct if you've set up everything on a remote VM.
The text was updated successfully, but these errors were encountered: