Skip to content

Commit

Permalink
removed interlock sync button
Browse files Browse the repository at this point in the history
  • Loading branch information
jabelone committed Jun 4, 2024
1 parent 6334753 commit 35f0c2e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 19 deletions.
5 changes: 0 additions & 5 deletions memberportal/api_access/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@
views.RebootDoor.as_view(),
name="RebootDoor",
),
path(
"api/access/interlocks/<int:interlock_id>/sync/",
views.SyncInterlock.as_view(),
name="SyncInterlock",
),
path(
"api/access/doors/<int:door_id>/sync/",
views.SyncDoor.as_view(),
Expand Down
14 changes: 0 additions & 14 deletions memberportal/api_access/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,20 +201,6 @@ def put(self, request, interlock_id, user_id):
return Response()


class SyncInterlock(APIView):
"""
post: This method will force sync the specified interlock.
"""

permission_classes = (permissions.IsAdminUser,)

def post(self, request, interlock_id):
interlock = Interlock.objects.get(pk=interlock_id)
interlock.log_force_sync()

return Response({"success": interlock.sync()})


class RebootInterlock(APIView):
"""
post: This method will reboot the specified interlock.
Expand Down
1 change: 1 addition & 0 deletions src-frontend/src/components/AdminTools/DeviceDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ export default {
(item) => String(item.id) === this.deviceId
);
} else if (this.deviceType === 'interlocks') {
this.disabled.sync = true;
this.deviceIndex = this.interlocks.findIndex(
(item) => String(item.id) === this.deviceId
);
Expand Down

0 comments on commit 35f0c2e

Please sign in to comment.