22 lines
568 B
JavaScript
22 lines
568 B
JavaScript
|
|
module.exports = (function () {
|
|
|
|
return function FormatCsvPlugin() {
|
|
|
|
this.configPlugin = function (ctx) {
|
|
ctx.key = 'formatCSV';
|
|
ctx.description = 'Export tentity list/read api in csv format.';
|
|
ctx.localDir = __dirname;
|
|
ctx.localConfigTemplate = 'format-csv.json';
|
|
};
|
|
|
|
this.configApiTListExport = function (ctx) {
|
|
return ctx.renderTemplateDataList(ctx.tview.tmeta.tplugin.formatCSV.tmime);
|
|
};
|
|
|
|
this.configApiTReadExport = function (ctx) {
|
|
return ctx.renderTemplateDataRead(ctx.tview.tmeta.tplugin.formatCSV.tmime);
|
|
};
|
|
};
|
|
})();
|