Projet

Général

Profil

Révision 897de1bb

ID897de1bbbac8bee0bb098c9b0f73185ad09e2d93
Parent e254623b
Enfant 92483a04

Ajouté par Olivier Mehani il y a environ 5 ans

squash! [plugins/transmission] Fixups for consistency

Only show host in title when not localhost

Voir les différences:

plugins/network/transmission
84 84
port = os.getenv('port',9091)
85 85
user = os.getenv('user')
86 86
passwd = os.getenv('pass')
87
title_host = '' if host in ['localhost', '127.0.0.1', '::1'] else ' on ' + host
87 88

  
88 89

  
89 90
def config():
90 91
    conf = Template("""multigraph ${plugin_name}_throughput
91
graph_title Transmission throughput
92
graph_title Transmission throughput${title_host}
92 93
graph_vlabel bytes/${graph_period} in (-) / out (+)
93 94
graph_args --base 1000
94 95
graph_category network
......
105 106
up.min 0
106 107

  
107 108
multigraph ${plugin_name}_activity
108
graph_title Transmission activity
109
graph_title Transmission activity${title_host}
109 110
graph_vlabel torrents
110 111
graph_args --base 1000
111 112
graph_category network
......
119 120
paused.min 0
120 121
paused.colour COLOUR8
121 122
""")
122
    print conf.safe_substitute(plugin_name=plugin_name, host=host)
123
    print conf.safe_substitute(plugin_name=plugin_name, host=host, title_host=title_host)
123 124
    sys.exit(0)
124 125

  
125 126

  

Formats disponibles : Unified diff