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
11 changes: 11 additions & 0 deletions plugins/alerts/frontend/public/javascripts/countly.views.js
Original file line number Diff line number Diff line change
Expand Up @@ -1106,6 +1106,17 @@
appsSelectorOption: appsSelectorOption,
filterStatus: "all",
filteredApps: [],
tableDynamicCols: [
{
value: "appNameList",
label: "Application",
default: true
},
{
value: "conditionText",
label: "Condition",
default: true
}],
localTableTrackedFields: ["enabled"],
isAdmin: countlyGlobal.member.global_admin,
deleteElement: null,
Expand Down
30 changes: 18 additions & 12 deletions plugins/alerts/frontend/public/templates/vue-main.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
/>
<cly-section v-else>
<cly-datatable-n
:available-dynamic-cols="tableDynamicCols"
:force-loading="!initialized"
test-id="alerts-table"
class="cly-vue-alerts-table"
Expand Down Expand Up @@ -66,23 +67,28 @@
</template>
</el-table-column>

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

<el-table-column min-width="175" sortable="true" prop="appNameList" :label="i18n('alert.Application')">
<template slot-scope="scope">
<div :data-test-id="'datatable-application-' + scope.$index">{{scope.row.appNameList}}</div>
</template>
</el-table-column>

<el-table-column min-width="415" prop="condtionText" sortable="true" :label="i18n('alert.Condition')">
<template slot-scope="scope" sortable="true">
<span :data-test-id="'datatable-condition-' + scope.$index">{{unescapeHtml(scope.row.condtionText)}}</span>
</template>
</el-table-column>
<template v-for="(col, idx) in scope.dynamicCols">
<el-table-column min-width="175" v-if="col.value === 'appNameList'" prop="appNameList" sortable="true" :label="i18n('alert.Application')">
<template slot-scope="scope">
<div :data-test-id="'datatable-application-' + scope.$index">
{{scope.row.appNameList}}
</div>
</template>
</el-table-column>
<el-table-column min-width="415" v-if="col.value === 'conditionText'" prop="conditionText" sortable="true" :label="i18n('alert.Condition')">
<template slot-scope="scope" sortable="true">
<span :data-test-id="'datatable-condition-' + scope.$index">
{{unescapeHtml(scope.row.condtionText)}}
</span>
</template>
</el-table-column>
</template>

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