MCPcopy Create free account
hub / github.com/chirpstack/chirpstack / getTenantOptions

Function getTenantOptions

ui/src/components/Menu.tsx:43–54  ·  view source on GitHub ↗
(search: string, fn: OptionsCallbackFunc)

Source from the content-addressed store, hash-verified

41 };
42
43 const getTenantOptions = (search: string, fn: OptionsCallbackFunc) => {
44 const req = new ListTenantsRequest();
45 req.setSearch(search);
46 req.setLimit(10);
47
48 TenantStore.list(req, (resp: ListTenantsResponse) => {
49 const options = resp.getResultList().map((o, i) => {
50 return { label: o.getName(), value: o.getId() };
51 });
52 fn(options);
53 });
54 };
55
56 const getTenantOption = (id: string, fn: OptionCallbackFunc) => {
57 TenantStore.get(id, (resp: GetTenantResponse) => {

Callers

nothing calls this directly

Calls 1

listMethod · 0.45

Tested by

no test coverage detected