MCPcopy Create free account
hub / github.com/bytebase/bytebase / extractInstanceResourceName

Function extractInstanceResourceName

frontend/src/utils/v1/instance.ts:33–37  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

31}
32
33export const extractInstanceResourceName = (name: string) => {
34 const pattern = /(?:^|\/)instances\/([^/]+)(?:$|\/)/;
35 const matches = name.match(pattern);
36 return matches?.[1] ?? "";
37};
38
39export const readableDataSourceType = (type: DataSourceType): string => {
40 if (type === DataSourceType.ADMIN) {

Callers 15

InstanceAssignmentSheetFunction · 0.90
DatabaseResourceSelectorFunction · 0.90
InstanceSelectFunction · 0.90
MonacoEditorFunction · 0.90
syncURLFunction · 0.90
useSchemaPaneContextMenuFunction · 0.90
useConnectionMenuFunction · 0.90
InstanceFormBodyFunction · 0.90
createInstanceSliceFunction · 0.90
ProjectDatabasesPageFunction · 0.90
DatabaseDetailHeaderFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected