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

teableio / teable / 10915455790

18 Sep 2024 04:15AM CUT coverage: 85.046% (-0.02%) from 85.067%
10915455790

push

github

web-flow
feat: dashboard (#860)

* feat: plugins

* feat: dashboard panel and plugin publish procedure

* chore: rename dashboard db name

* feat: base query add cell format params

* feat: dashboard and plugin render

* feat: dashboard permission controll

* chore: remove chart page

* feat: add isExpand status

* feat: auth plugin render

* feat: chart plugin

* chore: add plugin chart scripts

* chore: remove dist

* feat: plugin docker build and chart plugin init

* chore: plugin chart build

* chore: plugin chart lint

* fix: base query e2e

* fix: markdown preview theme

* fix: plugin e2e

* fix: first admin user

* fix: insert env in nextjs-app/.env

* fix: e2e error

* fix: plugin rows

* fix: plugin and dashboard service spec

* fix: init official plugin lock attachments database table

* fix: test error

* fix: init plugin conflict on e2e

* fix: init plugin conflict on e2e

* fix: init plugin conflict on e2e

* fix: init plugin conflict on e2e

* chore: better message

* fix: init plugin conflict on e2e

* chore: remove lock

5525 of 5802 branches covered (95.23%)

1348 of 1618 new or added lines in 30 files covered. (83.31%)

36058 of 42398 relevant lines covered (85.05%)

1174.04 hits per line

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

0.0
/apps/nestjs-backend/src/features/calculation/utils/name-console.ts
1
// eslint-disable-next-line @typescript-eslint/no-explicit-any, sonarjs/cognitive-complexity
×
2
function replaceFieldIdsWithNames(obj: any, fieldMap: { [fieldId: string]: { name: string } }) {
×
3
  if (typeof obj === 'object' && obj !== null) {
×
4
    for (const key in obj) {
×
5
      // eslint-disable-next-line no-prototype-builtins
×
6
      if (obj.hasOwnProperty(key)) {
×
7
        let newKey = key;
×
8
        if (key.startsWith('fld') && fieldMap[key]) {
×
9
          newKey = fieldMap[key].name;
×
10
        }
×
11
        obj[newKey] = replaceFieldIdsWithNames(obj[key], fieldMap);
×
12
        if (newKey !== key) delete obj[key];
×
13
      }
×
14
    }
×
15
  } else if (typeof obj === 'string' && obj.startsWith('fld') && fieldMap[obj]) {
×
16
    obj = fieldMap[obj].name;
×
17
  }
×
18
  return obj;
×
19
}
×
20

×
21
export function nameConsole(
×
22
  key: string,
×
23
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
×
24
  obj: any,
×
25
  fieldMap: { [fieldId: string]: { name: string } }
×
26
) {
×
27
  obj = JSON.parse(JSON.stringify(obj));
×
28
  console.log(key, JSON.stringify(replaceFieldIdsWithNames(obj, fieldMap), null, 2));
×
29
}
×
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

© 2025 Coveralls, Inc