File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 3939DASHBOARD_CONF = ''
4040GRAPHTEMPLATES_CONF = ''
4141STORAGE_DIR = ''
42- WHITELIST_FILE = ''
42+ METRIC_FILTERS_FILE = ''
4343INDEX_FILE = ''
4444LOG_DIR = ''
4545CERES_DIR = ''
162162
163163if not STORAGE_DIR :
164164 STORAGE_DIR = os .environ .get ('GRAPHITE_STORAGE_DIR' , join (GRAPHITE_ROOT , 'storage' ))
165- if not WHITELIST_FILE :
166- WHITELIST_FILE = join (STORAGE_DIR , 'lists' , 'whitelist ' )
165+ if not METRIC_FILTERS_FILE :
166+ METRIC_FILTERS_FILE = join (STORAGE_DIR , 'lists' , 'allowed_metrics ' )
167167if not INDEX_FILE :
168168 INDEX_FILE = join (STORAGE_DIR , 'index' )
169169if not LOG_DIR :
Original file line number Diff line number Diff line change @@ -41,21 +41,21 @@ def show(request):
4141 return HttpResponse (content_type = "text/plain" , content = members )
4242
4343def load_whitelist ():
44- fh = open (settings .WHITELIST_FILE , 'rb' )
44+ fh = open (settings .METRIC_FILTERS_FILE , 'rb' )
4545 whitelist = unpickle .load (fh )
4646 fh .close ()
4747 return whitelist
4848
4949def save_whitelist (whitelist ):
5050 serialized = pickle .dumps (whitelist , protocol = - 1 ) #do this instead of dump() to raise potential exceptions before open()
51- tmpfile = '%s-%d' % (settings .WHITELIST_FILE , randint (0 , 100000 ))
51+ tmpfile = '%s-%d' % (settings .METRIC_FILTERS_FILE , randint (0 , 100000 ))
5252 try :
5353 fh = open (tmpfile , 'wb' )
5454 fh .write (serialized )
5555 fh .close ()
56- if os .path .exists (settings .WHITELIST_FILE ):
57- os .unlink (settings .WHITELIST_FILE )
58- os .rename (tmpfile , settings .WHITELIST_FILE )
56+ if os .path .exists (settings .METRIC_FILTERS_FILE ):
57+ os .unlink (settings .METRIC_FILTERS_FILE )
58+ os .rename (tmpfile , settings .METRIC_FILTERS_FILE )
5959 finally :
6060 if os .path .exists (tmpfile ):
6161 os .unlink (tmpfile )
You can’t perform that action at this time.
0 commit comments