From 81399f60370c281602ad54b6577f61160aad13f0 Mon Sep 17 00:00:00 2001 From: chenos Date: Fri, 19 Mar 2021 21:27:42 +0800 Subject: [PATCH] fix: clean up code and fix tests --- .../src/collections/action_changes.ts | 9 -- .../src/collections/action_logs.ts | 15 ---- .../src/collections/automations.ts | 42 --------- .../src/collections/automations_jobs.ts | 36 -------- .../src/__tests__/models/collection.test.ts | 1 + .../src/collections/actions.ts | 30 ------- .../src/collections/collections.ts | 88 ------------------- .../src/collections/fields.ts | 30 ------- .../src/hooks/collections-after-create.ts | 43 --------- .../src/models/collection.ts | 15 +++- packages/plugin-collections/src/server.ts | 4 + .../src/collections/attachments.ts | 32 ------- .../src/__tests__/fields.test.ts | 2 +- .../plugin-pages/src/collections/pages.ts | 44 ---------- .../plugin-pages/src/collections/pages_v2.ts | 34 ------- .../plugin-pages/src/collections/roles.ts | 20 ----- .../src/collections/views_fields_v2.ts | 1 + .../plugin-pages/src/collections/views_v2.ts | 34 ------- .../src/__tests__/list.test.ts | 3 +- .../plugin-permissions/src/__tests__/seed.ts | 8 +- .../src/__tests__/tables/posts.ts | 2 + .../src/collections/collections.ts | 34 ------- .../src/collections/permissions.ts | 33 ------- .../src/collections/roles.ts | 79 ----------------- .../plugin-users/src/collections/users.ts | 49 ----------- 25 files changed, 26 insertions(+), 662 deletions(-) diff --git a/packages/plugin-action-logs/src/collections/action_changes.ts b/packages/plugin-action-logs/src/collections/action_changes.ts index 2c48d9d24..090c01690 100644 --- a/packages/plugin-action-logs/src/collections/action_changes.ts +++ b/packages/plugin-action-logs/src/collections/action_changes.ts @@ -53,13 +53,4 @@ export default { title: '查看' } ], - views: [ - { - type: 'table', - name: 'table', - title: '列表', - template: 'Table', - default: true, - }, - ], } as TableOptions; diff --git a/packages/plugin-action-logs/src/collections/action_logs.ts b/packages/plugin-action-logs/src/collections/action_logs.ts index 3581de2eb..4b355bf75 100644 --- a/packages/plugin-action-logs/src/collections/action_logs.ts +++ b/packages/plugin-action-logs/src/collections/action_logs.ts @@ -97,21 +97,6 @@ export default { // sort: '-created_at' }, ], - views: [ - { - type: 'table', - name: 'table', - title: '列表', - template: 'Table', - default: true - }, - { - type: 'details', - name: 'details', - title: '详情', - template: 'Details', - }, - ], views_v2: [ { developerMode: true, diff --git a/packages/plugin-automations/src/collections/automations.ts b/packages/plugin-automations/src/collections/automations.ts index dc956c2ac..b90fa0be8 100644 --- a/packages/plugin-automations/src/collections/automations.ts +++ b/packages/plugin-automations/src/collections/automations.ts @@ -465,48 +465,6 @@ export default { title: '任务', }, ], - views: [ - { - type: 'form', - name: 'form', - title: '表单', - template: 'DrawerForm', - developerMode: true, - }, - { - type: 'details', - name: 'details', - title: '详情', - template: 'Details', - actionNames: ['update'], - developerMode: true, - }, - { - type: 'table', - name: 'table', - title: '全部数据', - template: 'Table', - actionNames: ['destroy', 'create'], - default: true, - draggable: true, - }, - ], - tabs: [ - { - type: 'details', - name: 'details', - title: '详情', - viewName: 'details', - }, - { - type: 'association', - name: 'jobs', - title: '任务', - association: 'jobs', - viewName: 'table', - default: true, - }, - ], views_v2: [ { developerMode: true, diff --git a/packages/plugin-automations/src/collections/automations_jobs.ts b/packages/plugin-automations/src/collections/automations_jobs.ts index 77db7f1c4..227957ed5 100644 --- a/packages/plugin-automations/src/collections/automations_jobs.ts +++ b/packages/plugin-automations/src/collections/automations_jobs.ts @@ -124,42 +124,6 @@ export default { }, }, ], - views: [ - { - type: 'form', - name: 'form', - title: '表单', - template: 'DrawerForm', - developerMode: true, - }, - { - type: 'details', - name: 'details', - title: '详情', - template: 'Details', - actionNames: ['update'], - developerMode: true, - }, - { - type: 'table', - name: 'table', - title: '全部数据', - template: 'Table', - mode: 'simple', - actionNames: ['destroy', 'create'], - default: true, - draggable: true, - }, - ], - tabs: [ - { - type: 'details', - name: 'details', - title: '详情', - viewName: 'details', - default: true, - }, - ], views_v2: [ { developerMode: true, diff --git a/packages/plugin-collections/src/__tests__/models/collection.test.ts b/packages/plugin-collections/src/__tests__/models/collection.test.ts index 55a69a061..fb1b5f288 100644 --- a/packages/plugin-collections/src/__tests__/models/collection.test.ts +++ b/packages/plugin-collections/src/__tests__/models/collection.test.ts @@ -26,6 +26,7 @@ describe('models.collection', () => { title: '示例', name: 'examples', showInDataMenu: true, + statusable: false, fields: [ { interface: 'string', diff --git a/packages/plugin-collections/src/collections/actions.ts b/packages/plugin-collections/src/collections/actions.ts index e7ad804d1..1188b4189 100644 --- a/packages/plugin-collections/src/collections/actions.ts +++ b/packages/plugin-collections/src/collections/actions.ts @@ -114,34 +114,4 @@ export default { viewName: 'form', }, ], - views: [ - { - type: 'form', - name: 'form', - title: '表单', - template: 'DrawerForm', - developerMode: true, - }, - { - type: 'details', - name: 'details', - title: '详情', - template: 'Details', - actionNames: ['update'], - developerMode: true, - }, - { - type: 'table', - name: 'simple', - title: '简易模式', - template: 'Table', - mode: 'simple', - default: true, - actionNames: ['destroy', 'create'], - detailsViewName: 'details', - updateViewName: 'form', - paginated: false, - draggable: true, - }, - ], } as TableOptions; diff --git a/packages/plugin-collections/src/collections/collections.ts b/packages/plugin-collections/src/collections/collections.ts index 63ea98455..29279d4fe 100644 --- a/packages/plugin-collections/src/collections/collections.ts +++ b/packages/plugin-collections/src/collections/collections.ts @@ -378,94 +378,6 @@ export default { viewName: 'form', }, ], - views: [ - { - type: 'form', - name: 'form', - title: '表单', - template: 'DrawerForm', - developerMode: true, - }, - { - type: 'details', - name: 'details', - title: '详情', - template: 'Details', - actionNames: ['update'], - developerMode: true, - }, - { - type: 'table', - name: 'permissionTable', - title: '权限设置表格', - mode: 'simple', - template: 'SimpleTable', - // actionNames: ['create', 'destroy'], - detailsViewName: 'details', - updateViewName: 'permissionForm', - }, - { - type: 'form', - name: 'permissionForm', - title: '权限设置表单', - mode: 'simple', - template: 'DrawerForm', - }, - { - type: 'table', - name: 'table', - title: '全部数据', - template: 'Table', - actionNames: ['destroy', 'create'], - default: true, - draggable: true, - }, - ], - tabs: [ - { - type: 'details', - name: 'details', - title: '详情', - viewName: 'details', - default: true, - }, - { - type: 'association', - name: 'fields', - title: '字段', - association: 'fields', - viewName: 'simple', - }, - { - type: 'association', - name: 'views', - title: '视图', - association: 'views', - viewName: 'simple', - }, - { - type: 'association', - name: 'actions', - title: '动作', - association: 'actions', - viewName: 'simple', - developerMode: true, - }, - { - type: 'association', - name: 'tabs', - title: '标签页', - association: 'tabs', - viewName: 'simple', - }, - // { - // type: 'association', - // name: 'roles', - // title: '权限', - // association: 'roles', - // viewName: 'simple2', - // }, - ], views_v2: [ { developerMode: true, diff --git a/packages/plugin-collections/src/collections/fields.ts b/packages/plugin-collections/src/collections/fields.ts index e85548514..a2e07a909 100644 --- a/packages/plugin-collections/src/collections/fields.ts +++ b/packages/plugin-collections/src/collections/fields.ts @@ -614,36 +614,6 @@ export default { viewName: 'form', }, ], - views: [ - { - type: 'form', - name: 'form', - title: '表单', - template: 'DrawerForm', - developerMode: true, - }, - { - type: 'details', - name: 'details', - title: '详情', - template: 'Details', - actionNames: ['update'], - developerMode: true, - }, - { - type: 'table', - name: 'simple', - title: '简易模式', - template: 'Table', - mode: 'simple', - default: true, - actionNames: ['destroy', 'create'], - detailsViewName: 'details', - updateViewName: 'form', - paginated: false, - draggable: true, - }, - ], views_v2: [ { developerMode: true, diff --git a/packages/plugin-collections/src/hooks/collections-after-create.ts b/packages/plugin-collections/src/hooks/collections-after-create.ts index b6c2ac7d8..bcb69adbd 100644 --- a/packages/plugin-collections/src/hooks/collections-after-create.ts +++ b/packages/plugin-collections/src/hooks/collections-after-create.ts @@ -30,49 +30,6 @@ const defaultValues = { viewName: 'form', }, ], - views: [ - { - type: 'form', - name: 'form', - title: '表单', - template: 'DrawerForm', - developerMode: true, - }, - { - type: 'details', - name: 'details', - title: '详情', - template: 'Details', - actionNames: ['update'], - developerMode: true, - }, - // { - // type: 'table', - // name: 'simple', - // title: '简易模式', - // template: 'SimpleTable', - // actionNames: ['create', 'destroy'], - // detailsViewName: 'details', - // updateViewName: 'form', - // }, - { - type: 'table', - name: 'table', - title: '全部数据', - template: 'Table', - actionNames: ['filter', 'destroy', 'create'], - default: true, - }, - ], - tabs: [ - { - type: 'details', - name: 'details', - title: '详情', - viewName: 'details', - default: true, - }, - ], }; export default async function (model: CollectionModel, options: any = {}) { diff --git a/packages/plugin-collections/src/models/collection.ts b/packages/plugin-collections/src/models/collection.ts index e611b1a6f..37c7d2d9d 100644 --- a/packages/plugin-collections/src/models/collection.ts +++ b/packages/plugin-collections/src/models/collection.ts @@ -120,12 +120,18 @@ export class CollectionModel extends BaseModel { } async getOptions(): Promise { - return { + const options: any = { ...this.get(), actions: await this.getActions(), fields: await this.getFieldsOptions(), - views_v2: await this.getViews_v2(), - }; + } + // @ts-ignore + // console.log(this.constructor.associations); + // @ts-ignore + if (this.constructor.hasAlias('views_v2')) { + options.views_v2 = await this.getViews_v2(); + } + return options; } /** @@ -178,6 +184,9 @@ export class CollectionModel extends BaseModel { continue; } const Model = this.database.getModel(key); + if (!Model) { + continue; + } let ids = []; for (const index in data[key]) { if (key === 'fields') { diff --git a/packages/plugin-collections/src/server.ts b/packages/plugin-collections/src/server.ts index 15ebc6ea7..2fe69b8a0 100644 --- a/packages/plugin-collections/src/server.ts +++ b/packages/plugin-collections/src/server.ts @@ -40,6 +40,10 @@ export default async function (this: Application, options = {}) { return; } + if (model.get('statusable') === false) { + return; + } + console.log("model.get('developerMode')", model.get('name')); const { transaction = await model.sequelize.transaction() } = options; diff --git a/packages/plugin-file-manager/src/collections/attachments.ts b/packages/plugin-file-manager/src/collections/attachments.ts index 23919d85d..fb6259324 100644 --- a/packages/plugin-file-manager/src/collections/attachments.ts +++ b/packages/plugin-file-manager/src/collections/attachments.ts @@ -83,36 +83,4 @@ export default { title: '删除', }, ], - views: [ - { - type: 'form', - name: 'form', - title: '表单', - template: 'DrawerForm', - }, - { - type: 'details', - name: 'details', - title: '详情', - template: 'Details', - actionNames: ['update'], - }, - { - type: 'simple', - name: 'simple', - title: '简易模式', - template: 'SimpleTable', - actionNames: ['create', 'destroy'], - detailsViewName: 'details', - updateViewName: 'form', - default: true, - }, - { - type: 'table', - name: 'table', - title: '列表', - template: 'Table', - actionNames: ['create', 'destroy'], - }, - ], } as TableOptions; diff --git a/packages/plugin-full-collections/src/__tests__/fields.test.ts b/packages/plugin-full-collections/src/__tests__/fields.test.ts index 0766427b6..d0bc0815e 100644 --- a/packages/plugin-full-collections/src/__tests__/fields.test.ts +++ b/packages/plugin-full-collections/src/__tests__/fields.test.ts @@ -27,7 +27,7 @@ describe('fields', () => { afterEach(() => app.database.close()); - async function createField(options: Options) { + async function createField(options: any) { return await collection.createField(options); } diff --git a/packages/plugin-pages/src/collections/pages.ts b/packages/plugin-pages/src/collections/pages.ts index 9f9fc75dd..da2b9dfed 100644 --- a/packages/plugin-pages/src/collections/pages.ts +++ b/packages/plugin-pages/src/collections/pages.ts @@ -235,48 +235,4 @@ export default { title: '删除', }, ], - views: [ - { - type: 'form', - name: 'form', - title: '表单', - template: 'DrawerForm', - }, - { - type: 'details', - name: 'details', - title: '详情', - template: 'Details', - actionNames: ['update'], - }, - { - type: 'table', - name: 'simple', - title: '简易模式', - template: 'SimpleTable', - default: true, - mode: 'simple', - actionNames: ['create', 'destroy'], - detailsViewName: 'details', - updateViewName: 'form', - paginated: false, - }, - { - type: 'table', - name: 'table', - title: '列表', - template: 'Table', - actionNames: ['create', 'destroy'], - }, - { - type: 'table', - name: 'permissionTable', - title: '菜单权限', - template: 'Table', - mode: 'simple', - detailsViewName: 'details', - updateViewName: 'form', - paginated: false, - }, - ], } as TableOptions; diff --git a/packages/plugin-pages/src/collections/pages_v2.ts b/packages/plugin-pages/src/collections/pages_v2.ts index f1ce9bceb..f787233ca 100644 --- a/packages/plugin-pages/src/collections/pages_v2.ts +++ b/packages/plugin-pages/src/collections/pages_v2.ts @@ -160,40 +160,6 @@ export default { title: '删除', }, ], - views: [ - { - type: 'form', - name: 'form', - title: '表单', - template: 'DrawerForm', - }, - { - type: 'details', - name: 'details', - title: '详情', - template: 'Details', - actionNames: ['update'], - }, - { - type: 'table', - name: 'simple', - title: '简易模式', - template: 'SimpleTable', - default: true, - mode: 'simple', - actionNames: ['create', 'destroy'], - detailsViewName: 'details', - updateViewName: 'form', - paginated: false, - }, - { - type: 'table', - name: 'table', - title: '列表', - template: 'Table', - actionNames: ['create', 'destroy'], - }, - ], views_v2: [ { developerMode: true, diff --git a/packages/plugin-pages/src/collections/roles.ts b/packages/plugin-pages/src/collections/roles.ts index f0f525511..f96c022a6 100644 --- a/packages/plugin-pages/src/collections/roles.ts +++ b/packages/plugin-pages/src/collections/roles.ts @@ -20,24 +20,4 @@ export default extend({ constraints: false, // 多态关联建立外键约束会有问题 } ], - tabs: [ - { - type: 'association', - name: 'pages', - title: '系统菜单权限', - association: 'pages', - viewName: 'permissionTable', - }, - ] -}, { - customMerge(key) { - if (['tabs'].includes(key)) { - return (x = [], y = []) => { - const last = x.pop(); - const tabs = x.concat(y); - tabs.push(last); - return tabs; - }; - } - } }); diff --git a/packages/plugin-pages/src/collections/views_fields_v2.ts b/packages/plugin-pages/src/collections/views_fields_v2.ts index 51f2b5c0d..84fd5d84a 100644 --- a/packages/plugin-pages/src/collections/views_fields_v2.ts +++ b/packages/plugin-pages/src/collections/views_fields_v2.ts @@ -27,6 +27,7 @@ export default { labelField: 'title', valueField: 'id', multiple: false, + viewName: 'fields.form', component: { type: 'drawerSelect', 'x-component-props': { diff --git a/packages/plugin-pages/src/collections/views_v2.ts b/packages/plugin-pages/src/collections/views_v2.ts index 6beca45af..0f742ea2d 100644 --- a/packages/plugin-pages/src/collections/views_v2.ts +++ b/packages/plugin-pages/src/collections/views_v2.ts @@ -219,40 +219,6 @@ export default { title: '删除', }, ], - views: [ - { - type: 'form', - name: 'form', - title: '表单', - template: 'DrawerForm', - }, - { - type: 'details', - name: 'details', - title: '详情', - template: 'Details', - actionNames: ['update'], - }, - { - type: 'table', - name: 'simple', - title: '简易模式', - template: 'SimpleTable', - default: true, - mode: 'simple', - actionNames: ['create', 'destroy'], - detailsViewName: 'details', - updateViewName: 'form', - paginated: false, - }, - { - type: 'table', - name: 'table', - title: '列表', - template: 'Table', - actionNames: ['create', 'destroy'], - }, - ], views_v2: [ { developerMode: true, diff --git a/packages/plugin-permissions/src/__tests__/list.test.ts b/packages/plugin-permissions/src/__tests__/list.test.ts index e8c79be15..a2297e752 100644 --- a/packages/plugin-permissions/src/__tests__/list.test.ts +++ b/packages/plugin-permissions/src/__tests__/list.test.ts @@ -15,10 +15,9 @@ describe('list', () => { const User = db.getModel('users'); const users = await User.findAll({ order: [['id', 'ASC']] }); - userAgents = users.map(user => { const userAgent = getAgent(app); - userAgent.set('Authorization', `Bearer ${users[0].token}`); + userAgent.set('Authorization', `Bearer ${user.token}`); return userAgent; }); diff --git a/packages/plugin-permissions/src/__tests__/seed.ts b/packages/plugin-permissions/src/__tests__/seed.ts index cf14a04ac..bd6f93a85 100644 --- a/packages/plugin-permissions/src/__tests__/seed.ts +++ b/packages/plugin-permissions/src/__tests__/seed.ts @@ -144,9 +144,9 @@ export default async function(db) { const Post = db.getModel('posts'); await Post.bulkCreate([ - { title: 'title1', created_by_id: users[0].id }, - { title: 'title2', created_by_id: users[0].id }, - { title: 'title3', created_by_id: users[1].id }, - { title: 'title4', created_by_id: users[3].id }, + { title: 'title1', created_by_id: users[0].id, status: 'draft' }, + { title: 'title2', created_by_id: users[0].id, status: 'draft' }, + { title: 'title3', created_by_id: users[1].id, status: 'draft' }, + { title: 'title4', created_by_id: users[3].id, status: 'draft' }, ]); } diff --git a/packages/plugin-permissions/src/__tests__/tables/posts.ts b/packages/plugin-permissions/src/__tests__/tables/posts.ts index a4588ede1..7c6c1ddbd 100644 --- a/packages/plugin-permissions/src/__tests__/tables/posts.ts +++ b/packages/plugin-permissions/src/__tests__/tables/posts.ts @@ -4,6 +4,7 @@ export default { name: 'posts', // 目前默认就带了 // createdBy: true, + statusable: false, fields: [ { type: 'string', @@ -12,6 +13,7 @@ export default { { type: 'string', name: 'status', + // TODO(BUG): 默认值无效 defaultValue: 'draft', }, { diff --git a/packages/plugin-permissions/src/collections/collections.ts b/packages/plugin-permissions/src/collections/collections.ts index ee31e6f16..ce9a951ca 100644 --- a/packages/plugin-permissions/src/collections/collections.ts +++ b/packages/plugin-permissions/src/collections/collections.ts @@ -18,38 +18,4 @@ export default extend({ // foreignKey: 'collection_name' // } ], - views: [ - { - type: 'table', - name: 'permissionTable', - title: '权限设置表格', - mode: 'simple', - template: 'SimpleTable', - // actionNames: ['create', 'destroy'], - detailsViewName: 'details', - updateViewName: 'permissionForm', - }, - { - type: 'form', - name: 'permissionForm', - title: '权限设置表单', - mode: 'simple', - template: 'DrawerForm', - }, - ], - tabs: [ - { - type: 'association', - name: 'permissions', - title: '权限', - association: 'roles', - viewName: 'permissionTable', - }, - ], -}, { - customMerge(key) { - if (['views', 'tabs'].includes(key)) { - return (x = [], y = []) => x.concat(y); - } - } }); diff --git a/packages/plugin-permissions/src/collections/permissions.ts b/packages/plugin-permissions/src/collections/permissions.ts index f56e1d14f..71e9e8565 100644 --- a/packages/plugin-permissions/src/collections/permissions.ts +++ b/packages/plugin-permissions/src/collections/permissions.ts @@ -72,37 +72,4 @@ export default { name: 'tabs_permissions', }, ], - views: [ - { - type: 'form', - name: 'form', - title: '表单', - template: 'DrawerForm', - }, - { - type: 'details', - name: 'details', - title: '详情', - template: 'Details', - actionNames: ['update'], - }, - { - type: 'simple', - name: 'simple', - title: '简易模式', - mode: 'simple', - template: 'SimpleTable', - actionNames: ['create', 'destroy'], - detailsViewName: 'details', - updateViewName: 'form', - }, - { - type: 'table', - name: 'table', - title: '列表', - template: 'Table', - actionNames: ['create', 'destroy'], - default: true, - }, - ], } as TableOptions; diff --git a/packages/plugin-permissions/src/collections/roles.ts b/packages/plugin-permissions/src/collections/roles.ts index 331f38935..274a203a7 100644 --- a/packages/plugin-permissions/src/collections/roles.ts +++ b/packages/plugin-permissions/src/collections/roles.ts @@ -125,85 +125,6 @@ export default { } }, ], - views: [ - { - type: 'form', - name: 'form', - title: '表单', - template: 'DrawerForm', - }, - { - type: 'details', - name: 'details', - title: '详情', - template: 'Details', - actionNames: ['update'], - }, - { - type: 'table', - name: 'simple', - title: '简易模式', - mode: 'simple', - template: 'SimpleTable', - actionNames: ['create', 'destroy'], - detailsViewName: 'details', - updateViewName: 'form', - }, - { - type: 'table', - name: 'table', - title: '列表', - template: 'Table', - actionNames: ['create', 'destroy'], - default: true, - }, - { - type: 'table', - name: 'permissionTable', - title: '权限设置表格', - mode: 'simple', - template: 'SimpleTable', - // actionNames: ['create', 'destroy'], - detailsViewName: 'details', - updateViewName: 'permissionForm', - }, - { - type: 'form', - name: 'permissionForm', - title: '权限设置表单', - mode: 'simple', - template: 'DrawerForm', - }, - ], - tabs: [ - { - type: 'details', - name: 'details', - title: '详情', - viewName: 'details', - default: true, - }, - // { - // type: 'details', - // name: 'collections', - // title: '数据表权限', - // viewName: 'simple', - // }, - { - type: 'association', - name: 'collections', - title: '数据表权限', - association: 'collections', - viewName: 'permissionTable', - }, - { - type: 'association', - name: 'users', - title: '当前组用户', - association: 'users', - viewName: 'simple', - }, - ], views_v2: [ { developerMode: true, diff --git a/packages/plugin-users/src/collections/users.ts b/packages/plugin-users/src/collections/users.ts index 9a249fa93..8ef3ecd7c 100644 --- a/packages/plugin-users/src/collections/users.ts +++ b/packages/plugin-users/src/collections/users.ts @@ -110,55 +110,6 @@ export default { viewName: 'form', }, ], - views: [ - { - type: 'form', - name: 'form', - title: '表单', - template: 'DrawerForm', - developerMode: true, - }, - { - type: 'form', - name: 'login', - title: '登录', - template: 'Login', - developerMode: true, - }, - { - type: 'form', - name: 'register', - title: '注册', - template: 'Register', - developerMode: true, - }, - { - type: 'details', - name: 'details', - title: '详情', - template: 'Details', - actionNames: ['update'], - developerMode: true, - }, - { - type: 'table', - name: 'simple', - title: '简易模式', - mode: 'simple', - template: 'Table', - actionNames: ['create', 'destroy'], - detailsViewName: 'details', - updateViewName: 'form', - default: true, - }, - { - type: 'table', - name: 'table', - title: '列表', - template: 'Table', - actionNames: ['create', 'destroy'], - }, - ], views_v2: [ { developerMode: true,