VolkovLabs / business-satellite

The Business Satellite data source for Grafana allows retrieving data from local and remote Grafana instances via HTTP API.
https://docs.volkovlabs.io
Apache License 2.0
12 stars 2 forks source link

Add Organization Users #52

Closed asimonok closed 1 year ago

asimonok commented 1 year ago

Resolves #32

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 96.96% and project coverage change: -0.21% :warning:

Comparison is base (b35fc76) 97.35% compared to head (329a21d) 97.14%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #52 +/- ## ========================================== - Coverage 97.35% 97.14% -0.21% ========================================== Files 28 29 +1 Lines 302 350 +48 Branches 33 37 +4 ========================================== + Hits 294 340 +46 - Misses 7 9 +2 Partials 1 1 ``` | [Files Changed](https://app.codecov.io/gh/VolkovLabs/volkovlabs-grapi-datasource/pull/52?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VolkovLabs) | Coverage Δ | | |---|---|---| | [src/constants/messages.ts](https://app.codecov.io/gh/VolkovLabs/volkovlabs-grapi-datasource/pull/52?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VolkovLabs#diff-c3JjL2NvbnN0YW50cy9tZXNzYWdlcy50cw==) | `100.00% <ø> (ø)` | | | [src/constants/request.ts](https://app.codecov.io/gh/VolkovLabs/volkovlabs-grapi-datasource/pull/52?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VolkovLabs#diff-c3JjL2NvbnN0YW50cy9yZXF1ZXN0LnRz) | `100.00% <ø> (ø)` | | | [src/components/ConfigEditor/ConfigEditor.tsx](https://app.codecov.io/gh/VolkovLabs/volkovlabs-grapi-datasource/pull/52?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VolkovLabs#diff-c3JjL2NvbXBvbmVudHMvQ29uZmlnRWRpdG9yL0NvbmZpZ0VkaXRvci50c3g=) | `88.23% <33.33%> (-11.77%)` | :arrow_down: | | [src/api/datasources.ts](https://app.codecov.io/gh/VolkovLabs/volkovlabs-grapi-datasource/pull/52?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VolkovLabs#diff-c3JjL2FwaS9kYXRhc291cmNlcy50cw==) | `100.00% <100.00%> (ø)` | | | [src/api/health.ts](https://app.codecov.io/gh/VolkovLabs/volkovlabs-grapi-datasource/pull/52?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VolkovLabs#diff-c3JjL2FwaS9oZWFsdGgudHM=) | `100.00% <100.00%> (ø)` | | | [src/api/org.ts](https://app.codecov.io/gh/VolkovLabs/volkovlabs-grapi-datasource/pull/52?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VolkovLabs#diff-c3JjL2FwaS9vcmcudHM=) | `100.00% <100.00%> (ø)` | | | [src/api/provisioning.ts](https://app.codecov.io/gh/VolkovLabs/volkovlabs-grapi-datasource/pull/52?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VolkovLabs#diff-c3JjL2FwaS9wcm92aXNpb25pbmcudHM=) | `100.00% <100.00%> (ø)` | | | [src/datasource/datasource.ts](https://app.codecov.io/gh/VolkovLabs/volkovlabs-grapi-datasource/pull/52?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VolkovLabs#diff-c3JjL2RhdGFzb3VyY2UvZGF0YXNvdXJjZS50cw==) | `97.05% <100.00%> (+0.18%)` | :arrow_up: | | [src/utils/frame.ts](https://app.codecov.io/gh/VolkovLabs/volkovlabs-grapi-datasource/pull/52?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VolkovLabs#diff-c3JjL3V0aWxzL2ZyYW1lLnRz) | `100.00% <100.00%> (ø)` | | | [src/utils/index.ts](https://app.codecov.io/gh/VolkovLabs/volkovlabs-grapi-datasource/pull/52?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VolkovLabs#diff-c3JjL3V0aWxzL2luZGV4LnRz) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

asimonok commented 1 year ago

Added getFieldsForItem function to get frame fields by item object. Used only for getOrgUsers query yet.

getFieldsForItem({
  firstName: 'John',
  isAdmin: true,
}) => [
  {
    name: 'firstName',
    type: FieldType.string,
    getValue: (item) => item.firstName,
  },
  {
    name: 'isAdmin',
    type: FieldType.boolean,
    getValue: (item) => item.isAdmin,
  }
]