Skip to content

Commit 5b18ae0

Browse files
Merge pull request #5612 from Countly/SER-1635-alert-testing-edit-columns-icon-is-missing-on-alert-home-page
[SER-1635] alert testing edit columns icon is missing on alert home page
2 parents 8129806 + 0e8ffdd commit 5b18ae0

File tree

2 files changed

+29
-12
lines changed

2 files changed

+29
-12
lines changed

plugins/alerts/frontend/public/javascripts/countly.views.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,6 +1106,17 @@
11061106
appsSelectorOption: appsSelectorOption,
11071107
filterStatus: "all",
11081108
filteredApps: [],
1109+
tableDynamicCols: [
1110+
{
1111+
value: "appNameList",
1112+
label: "Application",
1113+
default: true
1114+
},
1115+
{
1116+
value: "conditionText",
1117+
label: "Condition",
1118+
default: true
1119+
}],
11091120
localTableTrackedFields: ["enabled"],
11101121
isAdmin: countlyGlobal.member.global_admin,
11111122
deleteElement: null,

plugins/alerts/frontend/public/templates/vue-main.html

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
/>
3939
<cly-section v-else>
4040
<cly-datatable-n
41+
:available-dynamic-cols="tableDynamicCols"
4142
:force-loading="!initialized"
4243
test-id="alerts-table"
4344
class="cly-vue-alerts-table"
@@ -66,23 +67,28 @@
6667
</template>
6768
</el-table-column>
6869

69-
<el-table-column fixed min-width="240" prop="alertName" :label="i18n('alert.Alert_Name')" sortable="true">
70+
<el-table-column fixed min-width="240" prop="alertName" :label="i18n('alert.Alert_Name')" sortable="true">
7071
<template slot-scope="scope">
7172
<div style="text-overflow: ellipsis; overflow: hidden;" :data-test-id="'datatable-alert-name-' + scope.$index" v-html="scope.row.alertName"></div>
7273
</template>
7374
</el-table-column>
7475

75-
<el-table-column min-width="175" sortable="true" prop="appNameList" :label="i18n('alert.Application')">
76-
<template slot-scope="scope">
77-
<div :data-test-id="'datatable-application-' + scope.$index">{{scope.row.appNameList}}</div>
78-
</template>
79-
</el-table-column>
80-
81-
<el-table-column min-width="415" prop="condtionText" sortable="true" :label="i18n('alert.Condition')">
82-
<template slot-scope="scope" sortable="true">
83-
<span :data-test-id="'datatable-condition-' + scope.$index">{{unescapeHtml(scope.row.condtionText)}}</span>
84-
</template>
85-
</el-table-column>
76+
<template v-for="(col, idx) in scope.dynamicCols">
77+
<el-table-column min-width="175" v-if="col.value === 'appNameList'" prop="appNameList" sortable="true" :label="i18n('alert.Application')">
78+
<template slot-scope="scope">
79+
<div :data-test-id="'datatable-application-' + scope.$index">
80+
{{scope.row.appNameList}}
81+
</div>
82+
</template>
83+
</el-table-column>
84+
<el-table-column min-width="415" v-if="col.value === 'conditionText'" prop="conditionText" sortable="true" :label="i18n('alert.Condition')">
85+
<template slot-scope="scope" sortable="true">
86+
<span :data-test-id="'datatable-condition-' + scope.$index">
87+
{{unescapeHtml(scope.row.condtionText)}}
88+
</span>
89+
</template>
90+
</el-table-column>
91+
</template>
8692

8793
<el-table-column min-width="130" sortable="true" prop="createdByUser" :label="i18n('alert.CreateBy')">
8894
<template slot-scope="scope">

0 commit comments

Comments
 (0)