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
|
|
|
|
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')
|
2021-07-08 06:23:18 +00:00
|
|
|
router.register(r'accounts', api.AccountViewSet, 'account')
|
2022-08-19 10:49:00 +00:00
|
|
|
router.register(r'account-templates', api.AccountTemplateViewSet, 'account-template')
|
2022-11-28 07:54:16 +00:00
|
|
|
router.register(r'account-template-secrets', api.AccountTemplateSecretsViewSet, 'account-template-secret')
|
2021-07-08 06:23:18 +00:00
|
|
|
router.register(r'account-secrets', api.AccountSecretsViewSet, 'account-secret')
|
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'labels', api.LabelViewSet, 'label')
|
|
|
|
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-09-18 14:06:46 +00:00
|
|
|
router.register(r'gathered-users', api.GatheredUserViewSet, 'gathered-user')
|
2019-10-18 07:05:45 +00:00
|
|
|
router.register(r'favorite-assets', api.FavoriteAssetViewSet, 'favorite-asset')
|
2022-03-07 11:49:45 +00:00
|
|
|
router.register(r'account-backup-plans', api.AccountBackupPlanViewSet, 'account-backup')
|
|
|
|
router.register(r'account-backup-plan-executions', api.AccountBackupPlanExecutionViewSet, 'account-backup-execution')
|
2018-10-10 07:37:20 +00:00
|
|
|
|
2022-11-08 12:33:55 +00:00
|
|
|
router.register(r'change-secret-automations', api.ChangeSecretAutomationViewSet, 'change-secret-automation')
|
2022-12-22 12:09:20 +00:00
|
|
|
router.register(r'change-secret-executions', api.ChangSecretExecutionViewSet, 'change-secret-execution')
|
|
|
|
router.register(r'gather-account-executions', api.GatherAccountsExecutionViewSet, 'gather-account-execution')
|
2022-11-08 12:33:55 +00:00
|
|
|
router.register(r'change-secret-records', api.ChangeSecretRecordViewSet, 'change-secret-record')
|
|
|
|
router.register(r'gather-account-automations', api.GatherAccountsAutomationViewSet, 'gather-account-automation')
|
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'),
|
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
|
|
|
|
2021-07-13 04:18:19 +00:00
|
|
|
path('accounts/tasks/', api.AccountTaskCreateAPI.as_view(), name='account-task-create'),
|
2022-11-08 09:54:51 +00:00
|
|
|
path('account-secrets/<uuid:pk>/histories/', api.AccountHistoriesSecretAPI.as_view(),
|
|
|
|
name='account-secret-history'),
|
2021-07-13 04:18:19 +00:00
|
|
|
|
2022-08-08 02:41:37 +00:00
|
|
|
path('nodes/category/tree/', api.CategoryTreeApi.as_view(), name='asset-category-tree'),
|
2022-12-22 03:34:18 +00:00
|
|
|
# path('nodes/tree/', api.NodeListAsTreeApi.as_view(), name='node-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'),
|
2022-11-08 09:54:51 +00:00
|
|
|
|
|
|
|
path('automation/<uuid:pk>/asset/remove/', api.AutomationRemoveAssetApi.as_view(), name='automation-remove-asset'),
|
|
|
|
path('automation/<uuid:pk>/asset/add/', api.AutomationAddAssetApi.as_view(), name='automation-add-asset'),
|
|
|
|
path('automation/<uuid:pk>/nodes/', api.AutomationNodeAddRemoveApi.as_view(), name='automation-add-or-remove-node'),
|
|
|
|
path('automation/<uuid:pk>/assets/', api.AutomationAssetsListApi.as_view(), name='automation-assets'),
|
2019-08-21 12:27:21 +00:00
|
|
|
]
|
|
|
|
|
2022-07-28 11:27:42 +00:00
|
|
|
urlpatterns += router.urls
|