• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

teableio / teable / 13519268829

25 Feb 2025 10:39AM UTC coverage: 81.337% (+0.007%) from 81.33%
13519268829

push

github

web-flow
feat: table plugin (#1340)

* chore: sonner component import

* chore: publish 1.6.1-beta.0 release

* chore: publish 1.6.1-beta.1 release

* feat: add plugin status ui and fix some plugin ui

* feat: add panel plugin and record menu plugin

* feat: chart plugin support table panel

* fix: line and area chart label decimal

* fix: init plugin context order when install

* fix: update plugin logo

* chore: revert versions

6821 of 7251 branches covered (94.07%)

768 of 909 new or added lines in 12 files covered. (84.49%)

24 existing lines in 2 files now uncovered.

32038 of 39389 relevant lines covered (81.34%)

1805.14 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

91.3
/apps/nestjs-backend/src/features/plugin-context-menu/plugin-context-menu.controller.ts
1
/* eslint-disable sonarjs/no-duplicate-string */
2✔
2
import { Body, Controller, Delete, Get, Param, Patch, Post, Put } from '@nestjs/common';
3
import type {
4
  IPluginContextMenuGetItem,
5
  IPluginContextMenuGetStorageVo,
6
  IPluginContextMenuGetVo,
7
  IPluginContextMenuInstallVo,
8
  IPluginContextMenuRenameVo,
9
  IPluginContextMenuUpdateStorageVo,
10
} from '@teable/openapi';
11
import {
12
  IPluginContextMenuInstallRo,
13
  pluginContextMenuInstallRoSchema,
14
  pluginContextMenuRenameRoSchema,
15
  IPluginContextMenuRenameRo,
16
  pluginContextMenuUpdateStorageRoSchema,
17
  pluginContextMenuMoveRoSchema,
18
  IPluginContextMenuMoveRo,
19
  IPluginContextMenuUpdateStorageRo,
20
} from '@teable/openapi';
21
import { ZodValidationPipe } from '../../zod.validation.pipe';
22
import { Permissions } from '../auth/decorators/permissions.decorator';
23
import { PluginContextMenuService } from './plugin-context-menu.service';
24

25
@Controller('api/table/:tableId/plugin-context-menu')
26
export class PluginContextMenuController {
2✔
27
  constructor(private readonly pluginContextMenuService: PluginContextMenuService) {}
105✔
28

29
  @Post('install')
105✔
30
  @Permissions('table|update')
31
  async installPluginContextMenu(
18✔
32
    @Param('tableId') tableId: string,
18✔
33
    @Body(new ZodValidationPipe(pluginContextMenuInstallRoSchema))
18✔
34
    body: IPluginContextMenuInstallRo
18✔
35
  ): Promise<IPluginContextMenuInstallVo> {
18✔
36
    return this.pluginContextMenuService.installPluginContextMenu(tableId, body);
18✔
37
  }
18✔
38

39
  @Get()
105✔
40
  @Permissions('table|read')
41
  async getPluginContextMenuList(
6✔
42
    @Param('tableId') tableId: string
6✔
43
  ): Promise<IPluginContextMenuGetItem[]> {
6✔
44
    return this.pluginContextMenuService.getPluginContextMenuList(tableId);
6✔
45
  }
6✔
46

47
  @Get(':pluginInstallId')
105✔
48
  @Permissions('table|read')
49
  async getPluginContextMenu(
2✔
50
    @Param('tableId') tableId: string,
2✔
51
    @Param('pluginInstallId') pluginInstallId: string
2✔
52
  ): Promise<IPluginContextMenuGetVo> {
2✔
53
    return this.pluginContextMenuService.getPluginContextMenu(tableId, pluginInstallId);
2✔
54
  }
2✔
55

56
  @Get(':pluginInstallId/storage')
105✔
57
  @Permissions('table|read')
NEW
58
  async getPluginContextMenuStorage(
×
NEW
59
    @Param('tableId') tableId: string,
×
NEW
60
    @Param('pluginInstallId') pluginInstallId: string
×
NEW
61
  ): Promise<IPluginContextMenuGetStorageVo> {
×
NEW
62
    return this.pluginContextMenuService.getPluginContextMenuStorage(tableId, pluginInstallId);
×
NEW
63
  }
×
64

65
  @Patch(':pluginInstallId/rename')
105✔
66
  @Permissions('table|update')
67
  async renamePluginContextMenu(
2✔
68
    @Param('tableId') tableId: string,
2✔
69
    @Param('pluginInstallId') pluginInstallId: string,
2✔
70
    @Body(new ZodValidationPipe(pluginContextMenuRenameRoSchema))
2✔
71
    body: IPluginContextMenuRenameRo
2✔
72
  ): Promise<IPluginContextMenuRenameVo> {
2✔
73
    return this.pluginContextMenuService.renamePluginContextMenu(tableId, pluginInstallId, body);
2✔
74
  }
2✔
75

76
  @Put(':pluginInstallId/update-storage')
105✔
77
  @Permissions('table|update')
78
  async updatePluginContextMenuStorage(
2✔
79
    @Param('tableId') tableId: string,
2✔
80
    @Param('pluginInstallId') pluginInstallId: string,
2✔
81
    @Body(new ZodValidationPipe(pluginContextMenuUpdateStorageRoSchema))
2✔
82
    body: IPluginContextMenuUpdateStorageRo
2✔
83
  ): Promise<IPluginContextMenuUpdateStorageVo> {
2✔
84
    return this.pluginContextMenuService.updatePluginContextMenuStorage(
2✔
85
      tableId,
2✔
86
      pluginInstallId,
2✔
87
      body
2✔
88
    );
89
  }
2✔
90

91
  @Delete(':pluginInstallId')
105✔
92
  @Permissions('table|update')
93
  async removePluginContextMenu(
2✔
94
    @Param('tableId') tableId: string,
2✔
95
    @Param('pluginInstallId') pluginInstallId: string
2✔
96
  ): Promise<void> {
2✔
97
    return this.pluginContextMenuService.deletePluginContextMenu(tableId, pluginInstallId);
2✔
98
  }
2✔
99

100
  @Put(':pluginInstallId/move')
105✔
101
  @Permissions('table|update')
102
  async movePluginContextMenu(
2✔
103
    @Param('tableId') tableId: string,
2✔
104
    @Param('pluginInstallId') pluginInstallId: string,
2✔
105
    @Body(new ZodValidationPipe(pluginContextMenuMoveRoSchema))
2✔
106
    body: IPluginContextMenuMoveRo
2✔
107
  ): Promise<void> {
2✔
108
    return this.pluginContextMenuService.movePluginContextMenu(tableId, pluginInstallId, body);
2✔
109
  }
2✔
110
}
105✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc