remove column size classes
All checks were successful
Build and Push Docker Image / build (push) Successful in 16s
All checks were successful
Build and Push Docker Image / build (push) Successful in 16s
This commit is contained in:
parent
ded11af42b
commit
cfd7af3087
@ -12,13 +12,13 @@ function initSubscriptionsModule() {
|
|||||||
{
|
{
|
||||||
title: "Name",
|
title: "Name",
|
||||||
data: "name",
|
data: "name",
|
||||||
className: "text-truncate col-3",
|
className: "text-truncate",
|
||||||
render: renderEditColumn
|
render: renderEditColumn
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "URL",
|
title: "URL",
|
||||||
data: "url",
|
data: "url",
|
||||||
className: "text-truncate col-4",
|
className: "text-truncate",
|
||||||
render: function(data, type) {
|
render: function(data, type) {
|
||||||
const url = sanitise(data);
|
const url = sanitise(data);
|
||||||
return `<a href="${url}" class="btn btn-link text-start text-decoration-none" target="_blank">${url}</a>`;
|
return `<a href="${url}" class="btn btn-link text-start text-decoration-none" target="_blank">${url}</a>`;
|
||||||
@ -32,23 +32,13 @@ function initSubscriptionsModule() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Rules",
|
title: "Rules",
|
||||||
data: "unique_rules",
|
data: "unique_rules_detail",
|
||||||
className: "text-center text-nowrap col-1",
|
className: "text-center text-nowrap",
|
||||||
render: function(data, type) {
|
render: data => renderArrayBadgesColumn(data.map(item => item.name))
|
||||||
let badges = $("<div>");
|
|
||||||
data.forEach(function(rule, idx) {
|
|
||||||
let badge = $(`<span class="badge text-bg-secondary">${rule}</span>`) // TODO: translate to rule.name
|
|
||||||
if (idx > 0) { badge.addClass("ms-2") }
|
|
||||||
badges.append(badge);
|
|
||||||
});
|
|
||||||
|
|
||||||
return badges.html();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Created At",
|
title: "Created At",
|
||||||
data: "created_at",
|
data: "created_at",
|
||||||
className: "col-3",
|
|
||||||
render: function(data, type) {
|
render: function(data, type) {
|
||||||
let dateTime = new Date(data);
|
let dateTime = new Date(data);
|
||||||
return $(`
|
return $(`
|
||||||
@ -66,7 +56,7 @@ function initSubscriptionsModule() {
|
|||||||
title: "Enabled",
|
title: "Enabled",
|
||||||
data: "active",
|
data: "active",
|
||||||
orderable: false,
|
orderable: false,
|
||||||
className: "text-center form-switch col-1",
|
className: "text-center form-switch",
|
||||||
render: function(data, type) {
|
render: function(data, type) {
|
||||||
return `<input type="checkbox" class="sub-toggle-active form-check-input ms-0" ${data ? "checked" : ""} />`
|
return `<input type="checkbox" class="sub-toggle-active form-check-input ms-0" ${data ? "checked" : ""} />`
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user