From d441477962474bac1871d70c1d123a2186782013 Mon Sep 17 00:00:00 2001 From: zhangguoqing Date: Tue, 23 Aug 2016 12:34:29 +0800 Subject: [PATCH] Delete unused views and urls Change-Id: I6d400b110b56d514d00f66dd5ecf6b2f71f2667a --- .../templates/hashmap/threshold_details.html | 11 ------ .../dashboards/admin/hashmap/urls.py | 6 ---- .../dashboards/admin/hashmap/views.py | 34 ------------------- 3 files changed, 51 deletions(-) delete mode 100644 cloudkittydashboard/dashboards/admin/hashmap/templates/hashmap/threshold_details.html diff --git a/cloudkittydashboard/dashboards/admin/hashmap/templates/hashmap/threshold_details.html b/cloudkittydashboard/dashboards/admin/hashmap/templates/hashmap/threshold_details.html deleted file mode 100644 index ab6f409..0000000 --- a/cloudkittydashboard/dashboards/admin/hashmap/templates/hashmap/threshold_details.html +++ /dev/null @@ -1,11 +0,0 @@ -{% extends 'base.html' %} -{% load i18n %} -{% block title %}{% trans "Hashmap" %}{% endblock %} - -{% block main %} -
-
- {{ tab_group.render }} -
-
-{% endblock %} diff --git a/cloudkittydashboard/dashboards/admin/hashmap/urls.py b/cloudkittydashboard/dashboards/admin/hashmap/urls.py index baa57bb..2d46872 100644 --- a/cloudkittydashboard/dashboards/admin/hashmap/urls.py +++ b/cloudkittydashboard/dashboards/admin/hashmap/urls.py @@ -35,12 +35,6 @@ urlpatterns = patterns( url(r'^group/(?P[^/]+)/details/?$', views.GroupDetailsView.as_view(), name='group_details'), - url(r'^service_threshold/(?P[^/]+)/?$', - views.ServiceThresholdView.as_view(), - name='service_threshold'), - url(r'^field_threshold/(?P[^/]+)/?$', - views.FieldThresholdView.as_view(), - name='field_threshold'), url(r'^create_field/service/(?P[^/]+)/?$', views.FieldCreateView.as_view(), name='field_create'), diff --git a/cloudkittydashboard/dashboards/admin/hashmap/views.py b/cloudkittydashboard/dashboards/admin/hashmap/views.py index 27fff0d..87363f8 100644 --- a/cloudkittydashboard/dashboards/admin/hashmap/views.py +++ b/cloudkittydashboard/dashboards/admin/hashmap/views.py @@ -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'