Skip to content

Commit

Permalink
simplification - export method
Browse files Browse the repository at this point in the history
  • Loading branch information
pnrgenc committed Jan 10, 2023
1 parent bb024d2 commit d42ad7f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions plugins/hooks/frontend/public/javascripts/countly.models.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@
success: function(data) {
if (data.hooksList && data.hooksList.length === 1) {
var record = data.hooksList[0];
record.triggerEfectDomForExport = hooksPlugin.generateTriggerActionsTreeForExport(record);
record.triggerEffectDom = hooksPlugin.generateTriggerActionsTreeDom(record);
record._canUpdate = countlyAuth.validateUpdate(FEATURE_NAME, countlyGlobal.member, record.apps[0]),
record._canDelete = countlyAuth.validateDelete(FEATURE_NAME, countlyGlobal.member, record.apps[0]),
Expand Down Expand Up @@ -388,7 +387,6 @@


var triggerEffectDom = hooksPlugin.generateTriggerActionsTreeDom(row);
var triggerEffectDomForExport = hooksPlugin.generateTriggerActionsTreeForExport(row);

tableData.push({
_id: hookList[i]._id,
Expand All @@ -406,7 +404,6 @@
created_at: hookList[i].created_at || 0,
created_at_string: moment(hookList[i].created_at).fromNow(),
triggerEffectColumn: triggerEffectDom || "",
triggerEffectForExport: triggerEffectDomForExport || "",
_canUpdate: countlyAuth.validateUpdate(FEATURE_NAME, countlyGlobal.member, hookList[i].apps[0]),
_canDelete: countlyAuth.validateDelete(FEATURE_NAME, countlyGlobal.member, hookList[i].apps[0]),
});
Expand Down
2 changes: 1 addition & 1 deletion plugins/hooks/frontend/public/javascripts/countly.views.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
var item = {};
item[CV.i18n('hooks.hook-name').toUpperCase()] = tableData[i].name;
item[CV.i18n('hooks.description').toUpperCase()] = tableData[i].description;
item[CV.i18n('hooks.trigger-and-actions').toUpperCase()] = tableData[i].triggerEffectForExport;
item[CV.i18n('hooks.trigger-and-actions').toUpperCase()] = hooksPlugin.generateTriggerActionsTreeForExport(tableData[i]);
item[CV.i18n('hooks.trigger-count').toUpperCase()] = tableData[i].triggerCount;
item[CV.i18n('hooks.trigger-last-time').toUpperCase()] = tableData[i].lastTriggerTimestampString === "-" ? "" : tableData[i].lastTriggerTimestampString;
item[CV.i18n('hooks.create-by').toUpperCase()] = tableData[i].createdByUser;
Expand Down

0 comments on commit d42ad7f

Please sign in to comment.