Merge "Adding support to use grafana templating"
This commit is contained in:
commit
d5616a578d
@ -194,3 +194,9 @@ def metrics_measurement_list(request, **kwargs):
|
||||
def metrics_stat_list(request, **kwargs):
|
||||
result = client.monascaclient(request).metrics.list_statistics(**kwargs)
|
||||
return result['elements'] if type(result) is dict else result
|
||||
|
||||
|
||||
@profiler.trace
|
||||
def metrics_dimension_value_list(request, **kwargs):
|
||||
result = client.monascaclient(request).metrics.list_dimension_values(**kwargs)
|
||||
return result['elements'] if type(result) is dict else result
|
||||
|
@ -316,6 +316,10 @@ class MonascaProxyView(TemplateView):
|
||||
results = {'elements': api.monitor.
|
||||
metrics_measurement_list(request,
|
||||
**req_kwargs)}
|
||||
elif "dimensions" == parts[1]:
|
||||
results = {'elements': api.monitor.
|
||||
metrics_dimension_value_list(request,
|
||||
**req_kwargs)}
|
||||
if not results:
|
||||
LOG.warning("There was a request made for the path %s that"
|
||||
" is not supported." % restpath)
|
||||
|
Loading…
Reference in New Issue
Block a user