@@ -54,7 +54,7 @@ export type Database = {
5454 collectionsStatus : DatabaseOrCollectionStatus ;
5555 collectionsLength : number ;
5656 collections : Collection [ ] ;
57- ns_source : 'provisioned' | 'privileges' | 'roles' ;
57+ isNonExistant : boolean ;
5858} ;
5959
6060type PlaceholderTreeItem = VirtualPlaceholderItem & {
@@ -68,7 +68,7 @@ export type Collection = {
6868 type : 'view' | 'collection' | 'timeseries' ;
6969 sourceName : string | null ;
7070 pipeline : unknown [ ] ;
71- ns_source : 'provisioned' | 'privileges' ;
71+ isNonExistant : boolean ;
7272} ;
7373
7474export type NotConnectedConnectionTreeItem = VirtualTreeItem & {
@@ -102,7 +102,7 @@ export type DatabaseTreeItem = VirtualTreeItem & {
102102 connectionId : string ;
103103 dbName : string ;
104104 hasWriteActionsDisabled : boolean ;
105- ns_source : Database [ 'ns_source' ] ;
105+ isNonExistant : boolean ;
106106} ;
107107
108108export type CollectionTreeItem = VirtualTreeItem & {
@@ -113,7 +113,7 @@ export type CollectionTreeItem = VirtualTreeItem & {
113113 connectionId : string ;
114114 namespace : string ;
115115 hasWriteActionsDisabled : boolean ;
116- ns_source : Collection [ 'ns_source' ] ;
116+ isNonExistant : boolean ;
117117} ;
118118
119119export type SidebarActionableItem =
@@ -249,7 +249,7 @@ const databaseToItems = ({
249249 collections,
250250 collectionsLength,
251251 collectionsStatus,
252- ns_source ,
252+ isNonExistant ,
253253 } ,
254254 connectionId,
255255 expandedItems = { } ,
@@ -282,7 +282,7 @@ const databaseToItems = ({
282282 dbName : id ,
283283 isExpandable : true ,
284284 hasWriteActionsDisabled,
285- ns_source ,
285+ isNonExistant ,
286286 } ;
287287
288288 const sidebarData : SidebarTreeItem [ ] = [ databaseTI ] ;
@@ -310,20 +310,22 @@ const databaseToItems = ({
310310 }
311311
312312 return sidebarData . concat (
313- collections . map ( ( { _id : id , name, type, ns_source } , collectionIndex ) => ( {
314- id : `${ connectionId } .${ id } ` , // id is the namespace of the collection, so includes db as well
315- level : level + 1 ,
316- name,
317- type,
318- setSize : collectionsLength ,
319- posInSet : collectionIndex + 1 ,
320- colorCode,
321- connectionId,
322- namespace : id ,
323- hasWriteActionsDisabled,
324- isExpandable : false ,
325- ns_source,
326- } ) )
313+ collections . map (
314+ ( { _id : id , name, type, isNonExistant } , collectionIndex ) => ( {
315+ id : `${ connectionId } .${ id } ` , // id is the namespace of the collection, so includes db as well
316+ level : level + 1 ,
317+ name,
318+ type,
319+ setSize : collectionsLength ,
320+ posInSet : collectionIndex + 1 ,
321+ colorCode,
322+ connectionId,
323+ namespace : id ,
324+ hasWriteActionsDisabled,
325+ isExpandable : false ,
326+ isNonExistant,
327+ } )
328+ )
327329 ) ;
328330} ;
329331
0 commit comments