Commit e7672078 by Oláh István Gergely

dashboard: get status changing text from model

parent 21af5532
...@@ -1257,7 +1257,10 @@ class NodeStatus(LoginRequiredMixin, SuperuserRequiredMixin, DetailView): ...@@ -1257,7 +1257,10 @@ class NodeStatus(LoginRequiredMixin, SuperuserRequiredMixin, DetailView):
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
context = super(NodeStatus, self).get_context_data(**kwargs) context = super(NodeStatus, self).get_context_data(**kwargs)
context['status'] = self.request.GET.get('status') if self.object.enabled:
context['status'] = "disable"
else:
context['status'] = "enable"
return context return context
def post(self, request, *args, **kwargs): def post(self, request, *args, **kwargs):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment