mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-23 20:45:59 +00:00
quick export from table result #892
This commit is contained in:
@@ -87,6 +87,7 @@ function processTags(items) {
|
|||||||
function extractMenuItems(menu, options = null) {
|
function extractMenuItems(menu, options = null) {
|
||||||
let res = [];
|
let res = [];
|
||||||
doExtractMenuItems(menu, res, options);
|
doExtractMenuItems(menu, res, options);
|
||||||
|
// console.log('BEFORE PROCESS TAGS', res);
|
||||||
res = processTags(res);
|
res = processTags(res);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@@ -142,7 +143,10 @@ export function getContextMenu(): any {
|
|||||||
|
|
||||||
export function prepareMenuItems(items, options, commandsCustomized) {
|
export function prepareMenuItems(items, options, commandsCustomized) {
|
||||||
const extracted = extractMenuItems(items, options);
|
const extracted = extractMenuItems(items, options);
|
||||||
|
// console.log('EXTRACTED', extracted);
|
||||||
const compacted = _.compact(extracted.map(x => mapItem(x, commandsCustomized)));
|
const compacted = _.compact(extracted.map(x => mapItem(x, commandsCustomized)));
|
||||||
|
// console.log('COMPACTED', compacted);
|
||||||
const filtered = filterMenuItems(compacted);
|
const filtered = filterMenuItems(compacted);
|
||||||
|
// console.log('FILTERED', filtered);
|
||||||
return filtered;
|
return filtered;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,6 +45,6 @@ export default function createQuickExportMenu(
|
|||||||
return {
|
return {
|
||||||
text: 'Export',
|
text: 'Export',
|
||||||
submenu: createQuickExportMenuItems(handler, advancedExportMenuItem),
|
submenu: createQuickExportMenuItems(handler, advancedExportMenuItem),
|
||||||
...advancedExportMenuItem,
|
...additionalFields,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user