Add Node.flush
-
✅ model -
✅ tasks -
☑ view
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
-
-
Owner
👍 -
Owner
👍 +1 -
-
-
mentioned in issue #60 (closed)
| 57 | 57 | @celery.task |
| 58 | 58 | def migrate(instance, to_node, user): |
| 59 | 59 | instance.migrate(to_node, task_uuid=migrate.request.id, user=user) |
| 60 | ||
| 61 | ||
| 62 | @celery.task | |
| 63 | def flush(node, user): | |
| 64 | node.migrate(task_uuid=flush.request.id, user=user) | |
Please
register
or
sign in
to reply
|
||
| 91 | 91 | return 'OFFLINE' |
| 92 | 92 | |
| 93 | def disable(self, user=None): | |
| 93 | def disable(self, user=None, base_activity=None): | |
| 94 | 94 | ''' Disable the node.''' |
| 95 | 95 | if self.enabled: |
| 96 | with node_activity(code_suffix='disable', node=self, user=user): | |
| 96 | if base_activity: | |
| 97 | act_ctx = base_activity.sub_activity('disable') | |
| 98 | else: | |
| 99 | act_ctx = node_activity('disable', node=self, user=user) | |
| 100 | with act_ctx: | |
| 97 | 101 | self.enabled = False |
| 98 | 102 | self.save() |
| 99 | 103 | |
| 104 | def flush(self, user=None): | |
|
||
| 29 | 29 | <button type="button" class="btn {{ btn_size }} btn-warning nojs-dropdown-toogle dropdown-toggle" data-toggle="dropdown">Action <i class="icon-caret-down"></i></button> |
| 30 | 30 | <ul class="dropdown-menu nojs-dropdown-toogle" role="menu"> |
| 31 | 31 | <li><a href="#" class="node-details-rename-button"><i class="icon-pencil"></i> {% trans "Rename" %}</a></li> |
| 32 | <li><a href="#"><i class="icon-cloud-upload"></i> Flush</a></li> | |
| 32 | <li><a data-node-pk="{{ node.pk }}" class="real-link node-flush" href="{% url "dashboard.views.flush-node" pk=node.pk %}?next={{ request.path }}"><i class="icon-cloud-upload"></i> Flush</a> | |
|
||
| 529 | 531 | return redirect(reverse_lazy("dashboard.views.node-detail", |
| 530 | 532 | kwargs={'pk': self.object.pk})) |
| 531 | 533 | |
| 534 | def __flush(self, request): | |
|
||
mentioned in merge request !32 (merged)
mentioned in merge request !32 (merged)