Skip to content

Commit

Permalink
Merge pull request #5612 from Countly/SER-1635-alert-testing-edit-col…
Browse files Browse the repository at this point in the history
…umns-icon-is-missing-on-alert-home-page

[SER-1635] alert testing edit columns icon is missing on alert home page
  • Loading branch information
ArtursKadikis authored Oct 2, 2024
2 parents 8129806 + 0e8ffdd commit 5b18ae0
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 12 deletions.
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

0 comments on commit 5b18ae0

Please sign in to comment.