Skip to content

Commit

Permalink
Fix station with space in name
Browse files Browse the repository at this point in the history
  • Loading branch information
flob82 committed Feb 10, 2020
1 parent 7bbab33 commit a46a8c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions freebox_
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ def print_config():
print('graph_args --lower-limit 0')
stations = get_switch_stations(switch_index)
for station in stations:
print('{}.label {}'.format(station, stations[station]['hostname']))
print('{}.draw AREASTACK'.format(station))
print('{}.label {}'.format(station.replace(' ', '_'), stations[station]['hostname']))
print('{}.draw AREASTACK'.format(station.replace(' ', '_')))
elif mode.startswith('switch'):
switch_index = mode[-1]
print('graph_title Switch port #{} traffic'.format(switch_index))
Expand Down Expand Up @@ -531,7 +531,7 @@ def query_switch_stations(interface):
value = 1
else:
value = 0
print('{}.value {}'.format(station, value))
print('{}.value {}'.format(station.replace(' ', '_'), value))


def query_rrd_data():
Expand Down

0 comments on commit a46a8c7

Please sign in to comment.