Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ export const confirmDeleteItem = (
undefined // this event is connection scoped when triggered from the aggregation or query screen
);

if (item.type === 'query') {
await queryStorage?.delete(item.id);
} else {
if (item.type === 'aggregation') {
await pipelineStorage?.delete(item.id);
} else {
// query or updatemany
await queryStorage?.delete(item.id);
}

dispatch({ type: ActionTypes.DeleteItemConfirm, id: item.id });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,14 @@ export const updateItem =
return;
}

if (item.type === 'query') {
if (item.type === 'aggregation') {
await pipelineStorage?.updateAttributes(id, attributes);
} else {
// query or updatemany
await queryStorage?.updateAttributes(id, {
_name: attributes.name,
_dateModified: new Date(),
});
} else {
await pipelineStorage?.updateAttributes(id, attributes);
}

dispatch({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,8 @@ export const openSelectedItem =
await pipelineStorage?.updateAttributes(id, {
namespace: newNamespace,
});
} else if (selectedItem.type === 'query') {
} else {
// query or updatemany
await queryStorage?.updateAttributes(id, { _ns: newNamespace });
}
}
Expand Down
Loading