2016-11-16 10:12:14 +00:00
|
|
|
# coding:utf-8
|
2022-08-30 09:29:54 +00:00
|
|
|
from django.urls import path
|
2017-01-06 12:34:24 +00:00
|
|
|
from rest_framework_bulk.routes import BulkRouter
|
2016-11-16 10:12:14 +00:00
|
|
|
|
2024-01-15 09:53:56 +00:00
|
|
|
from labels.api import LabelViewSet
|
2018-10-10 07:37:20 +00:00
|
|
|
from .. import api
|
|
|
|
|
2016-11-16 10:12:14 +00:00
|
|
|
app_name = 'assets'
|
|
|
|
|
2017-01-06 12:34:24 +00:00
|
|
|
router = BulkRouter()
|
2022-09-20 09:47:40 +00:00
|
|
|
router.register(r'categories', api.CategoryViewSet, 'category')
|
2018-07-13 16:47:21 +00:00
|
|
|
router.register(r'assets', api.AssetViewSet, 'asset')
|
2022-04-29 10:28:12 +00:00
|
|
|
router.register(r'hosts', api.HostViewSet, 'host')
|
2022-09-15 13:20:56 +00:00
|
|
|
router.register(r'devices', api.DeviceViewSet, 'device')
|
2022-04-29 10:28:12 +00:00
|
|
|
router.register(r'databases', api.DatabaseViewSet, 'database')
|
2022-09-15 13:20:56 +00:00
|
|
|
router.register(r'webs', api.WebViewSet, 'web')
|
2022-08-30 09:29:54 +00:00
|
|
|
router.register(r'clouds', api.CloudViewSet, 'cloud')
|
2023-06-30 09:35:49 +00:00
|
|
|
router.register(r'gpts', api.GPTViewSet, 'gpt')
|
2023-04-10 02:57:44 +00:00
|
|
|
router.register(r'customs', api.CustomViewSet, 'custom')
|
2019-12-16 08:53:29 +00:00
|
|
|
router.register(r'platforms', api.AssetPlatformViewSet, 'platform')
|
2018-07-13 16:47:21 +00:00
|
|
|
router.register(r'nodes', api.NodeViewSet, 'node')
|
2019-08-21 12:27:21 +00:00
|
|
|
router.register(r'domains', api.DomainViewSet, 'domain')
|
|
|
|
router.register(r'gateways', api.GatewayViewSet, 'gateway')
|
2019-10-18 07:05:45 +00:00
|
|
|
router.register(r'favorite-assets', api.FavoriteAssetViewSet, 'favorite-asset')
|
2023-06-30 07:54:06 +00:00
|
|
|
router.register(r'protocol-settings', api.PlatformProtocolViewSet, 'protocol-setting')
|
2024-01-15 09:53:56 +00:00
|
|
|
router.register(r'labels', LabelViewSet, 'label')
|
2022-11-08 09:54:51 +00:00
|
|
|
|
2016-11-16 10:12:14 +00:00
|
|
|
urlpatterns = [
|
2022-04-06 02:15:06 +00:00
|
|
|
# path('assets/<uuid:pk>/gateways/', api.AssetGatewayListApi.as_view(), name='asset-gateway-list'),
|
2023-10-27 09:19:13 +00:00
|
|
|
path('protocols/', api.ProtocolListApi.as_view(), name='asset-protocol'),
|
2020-03-12 08:24:38 +00:00
|
|
|
path('assets/<uuid:pk>/tasks/', api.AssetTaskCreateApi.as_view(), name='asset-task-create'),
|
2021-01-06 03:08:35 +00:00
|
|
|
path('assets/tasks/', api.AssetsTaskCreateApi.as_view(), name='assets-task-create'),
|
2021-10-15 06:02:32 +00:00
|
|
|
path('assets/<uuid:pk>/perm-users/', api.AssetPermUserListApi.as_view(), name='asset-perm-user-list'),
|
2022-11-08 09:54:51 +00:00
|
|
|
path('assets/<uuid:pk>/perm-users/<uuid:perm_user_id>/permissions/', api.AssetPermUserPermissionsListApi.as_view(),
|
|
|
|
name='asset-perm-user-permission-list'),
|
|
|
|
path('assets/<uuid:pk>/perm-user-groups/', api.AssetPermUserGroupListApi.as_view(),
|
|
|
|
name='asset-perm-user-group-list'),
|
|
|
|
path('assets/<uuid:pk>/perm-user-groups/<uuid:perm_user_group_id>/permissions/',
|
|
|
|
api.AssetPermUserGroupPermissionsListApi.as_view(), name='asset-perm-user-group-permission-list'),
|
2020-03-12 08:24:38 +00:00
|
|
|
|
2022-08-08 02:41:37 +00:00
|
|
|
path('nodes/category/tree/', api.CategoryTreeApi.as_view(), name='asset-category-tree'),
|
2018-12-17 10:20:44 +00:00
|
|
|
path('nodes/children/tree/', api.NodeChildrenAsTreeApi.as_view(), name='node-children-tree'),
|
2020-03-12 08:24:38 +00:00
|
|
|
path('nodes/<uuid:pk>/children/', api.NodeChildrenApi.as_view(), name='node-children'),
|
2018-07-27 10:56:40 +00:00
|
|
|
path('nodes/children/', api.NodeChildrenApi.as_view(), name='node-children-2'),
|
2020-03-12 08:24:38 +00:00
|
|
|
path('nodes/<uuid:pk>/children/add/', api.NodeAddChildrenApi.as_view(), name='node-add-children'),
|
|
|
|
path('nodes/<uuid:pk>/assets/', api.NodeAssetsApi.as_view(), name='node-assets'),
|
2021-02-05 05:29:29 +00:00
|
|
|
path('nodes/<uuid:pk>/assets/add/', api.NodeAddAssetsApi.as_view(), name='node-add-assets'),
|
|
|
|
path('nodes/<uuid:pk>/assets/replace/', api.MoveAssetsToNodeApi.as_view(), name='node-replace-assets'),
|
|
|
|
path('nodes/<uuid:pk>/assets/remove/', api.NodeRemoveAssetsApi.as_view(), name='node-remove-assets'),
|
2020-03-12 08:24:38 +00:00
|
|
|
path('nodes/<uuid:pk>/tasks/', api.NodeTaskCreateApi.as_view(), name='node-task-create'),
|
|
|
|
|
|
|
|
path('gateways/<uuid:pk>/test-connective/', api.GatewayTestConnectionApi.as_view(), name='test-gateway-connective'),
|
2023-06-30 07:54:06 +00:00
|
|
|
path('platform-automation-methods/', api.PlatformAutomationMethodsApi.as_view(),
|
|
|
|
name='platform-automation-methods'),
|
2019-08-21 12:27:21 +00:00
|
|
|
]
|
|
|
|
|
2022-07-28 11:27:42 +00:00
|
|
|
urlpatterns += router.urls
|