|
38 | 38 | /> |
39 | 39 | <cly-section v-else> |
40 | 40 | <cly-datatable-n |
| 41 | + :available-dynamic-cols="tableDynamicCols" |
41 | 42 | :force-loading="!initialized" |
42 | 43 | test-id="alerts-table" |
43 | 44 | class="cly-vue-alerts-table" |
|
66 | 67 | </template> |
67 | 68 | </el-table-column> |
68 | 69 |
|
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"> |
70 | 71 | <template slot-scope="scope"> |
71 | 72 | <div style="text-overflow: ellipsis; overflow: hidden;" :data-test-id="'datatable-alert-name-' + scope.$index" v-html="scope.row.alertName"></div> |
72 | 73 | </template> |
73 | 74 | </el-table-column> |
74 | 75 |
|
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> |
86 | 92 |
|
87 | 93 | <el-table-column min-width="130" sortable="true" prop="createdByUser" :label="i18n('alert.CreateBy')"> |
88 | 94 | <template slot-scope="scope"> |
|
0 commit comments