Merge "Delete unused views and urls"
This commit is contained in:
commit
fa450723f9
|
@ -1,11 +0,0 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Hashmap" %}{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
{{ tab_group.render }}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -35,12 +35,6 @@ urlpatterns = patterns(
|
|||
url(r'^group/(?P<group_id>[^/]+)/details/?$',
|
||||
views.GroupDetailsView.as_view(),
|
||||
name='group_details'),
|
||||
url(r'^service_threshold/(?P<threshold_id>[^/]+)/?$',
|
||||
views.ServiceThresholdView.as_view(),
|
||||
name='service_threshold'),
|
||||
url(r'^field_threshold/(?P<threshold_id>[^/]+)/?$',
|
||||
views.FieldThresholdView.as_view(),
|
||||
name='field_threshold'),
|
||||
url(r'^create_field/service/(?P<service_id>[^/]+)/?$',
|
||||
views.FieldCreateView.as_view(),
|
||||
name='field_create'),
|
||||
|
|
|
@ -296,23 +296,6 @@ class ServiceThresholdEditView(ServiceThresholdCreateView):
|
|||
args=(self.initial['service_id'], ))
|
||||
|
||||
|
||||
class ServiceThresholdView(tabs.TabbedTableView):
|
||||
tab_group_class = hashmap_tables.ServiceThresholdsTab
|
||||
|
||||
def get(self, *args, **kwargs):
|
||||
threshold = api.cloudkittyclient(self.request).hashmap.thresholds.get(
|
||||
threshold_id=kwargs['threshold_id']
|
||||
)
|
||||
self.request.threshold_id = threshold.threshold_id
|
||||
self.page_title = "Hashmap Threshold : %s" % threshold.threshold_id
|
||||
return super(ServiceThresholdView, self).get(*args, **kwargs)
|
||||
|
||||
def get_data(self):
|
||||
out = api.cloudkittyclient(self.request).hashmaps.thresholds.list(
|
||||
threshold_id=self.kwargs['threshold_id'])
|
||||
return api.identify(out)
|
||||
|
||||
|
||||
class FieldThresholdCreateView(forms.ModalFormView):
|
||||
form_class = hashmap_forms.CreateFieldThresholdForm
|
||||
form_id = "create_field_threshold"
|
||||
|
@ -367,23 +350,6 @@ class FieldThresholdEditView(FieldThresholdCreateView):
|
|||
args=(self.initial['field_id'], ))
|
||||
|
||||
|
||||
class FieldThresholdView(tabs.TabbedTableView):
|
||||
tab_group_class = hashmap_tables.FieldThresholdsTab
|
||||
|
||||
def get(self, *args, **kwargs):
|
||||
threshold = api.cloudkittyclient(self.request).hashmap.thresholds.get(
|
||||
threshold_id=kwargs['threshold_id']
|
||||
)
|
||||
self.request.threshold_id = threshold.threshold_id
|
||||
self.page_title = "Hashmap Threshold : %s" % threshold.threshold_id
|
||||
return super(FieldThresholdView, self).get(*args, **kwargs)
|
||||
|
||||
def get_data(self):
|
||||
out = api.cloudkittyclient(self.request).hashmaps.thresholds.list(
|
||||
threshold_id=self.kwargs['threshold_id'])
|
||||
return api.identify(out)
|
||||
|
||||
|
||||
class GroupView(tabs.TabbedTableView):
|
||||
tab_group_class = hashmap_tables.GroupsTab
|
||||
template_name = 'admin/hashmap/group_details.html'
|
||||
|
|
Loading…
Reference in New Issue