Skip to content

Commit

Permalink
update plugins to fit new template logic
Browse files Browse the repository at this point in the history
  • Loading branch information
syrk4web committed Mar 14, 2024
1 parent e0b5cfb commit aa3e30e
Show file tree
Hide file tree
Showing 14 changed files with 113 additions and 148 deletions.
4 changes: 4 additions & 0 deletions clamav/ui/actions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
def pre_render(**kwargs):
pass


def clamav(**kwargs):
ping = {"ping_status": "unknown"}

Expand Down
33 changes: 12 additions & 21 deletions clamav/ui/template.html

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions coraza/ui/actions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
def pre_render(**kwargs):
pass


def coraza(**kwargs):
ping = {"ping_status": "unknown"}

Expand Down
33 changes: 12 additions & 21 deletions coraza/ui/template.html

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions crowdsec/ui/actions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
def pre_render(**kwargs):
pass


def crowdsec(**kwargs):
ping = {"ping_status": "unknown"}

Expand Down
33 changes: 12 additions & 21 deletions crowdsec/ui/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h5 class="core-card-title">INFO</h5>
class="core-img-default"
src=" data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADgCAMAAADCMfHtAAABTVBMVEX///9NSpr4qxc+Onjzkhf4pwD4pQD/sABLSJn4qQDyiwBJRpjzjgDzkBc5NZJFQpc4NJJARJ4/PJQqJW86QaD9474/Q54+OpRERp349/pCP5Xx8fX/+/UnIW39/f79rgn+9uqvrs7V1OX+8d/4ryk3M3T2oRoxLHHf3uvBwNn83bFWTpr96Mv70ZXMy+D97+H7zYuFg7ZhXqR0cq2OjLv6w23816TupC6bmcL5yp71mxv85tJsaqm7utXc3Ol/fbP6yHy+iF75tkL5ulTJj1WgeHZrW5JWU59zYZD2r2dFQoS3tsn3tnaYlsGmpcn6v2HVlktwXI6xgGiBZY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XUUS+TyVfNfYnTNgrceQEmWL16EGGFdgFAx/yVH1yt4awKUFPalAMV1DLX8F0yfVsFbE5/E5UvxSVz+jpIIB+ixhh8p4dOyMS5CQZYflYtQ7PKVRMjqw9SjyHHvNRSRwOVLrQxGKKhjKJWDqelDa7rxKOILsRt8NkLU7JJx+b4AhVsXKg6f1g9kl/+aRNzIMHahoA5CXpbvDzCaFmxdqFRf6dFRSf/rpMPPcauX8sOEzrNTKZ0CwKjI5ftW0FknhB3+lycdjlhBtgLgc7J8mJb7GRlXtfgI/Rw+rzSJFP7nE5Kp4+NWCwuzFT4+DgTPpklqL39CDaAoqPm8JgXIUw/s8P8XEIaEkMsnel+oaWhUWMc4SkcnJALkjY4dz6P+IQR7+aoCjArrGL8GogNrfIyiwfEO9+M+IiT28pUFGBUGNbiX1wBHjuLJww6/nwhRo0xUeZhY4+qQiAQu320VNgAFKR0b6ftMH7UUu/zdibWoFj7R1oXX723ApugaIuefYvIcfp8Qopa8b9N68KKiOsZ6Cjw04P5PPlLIc/h9IVTY/5T2Y4Mlbh3jNuX/IkMh4PB7T+i0wm0XCLnnMboYCIc0P/uJEB3fW+9i6rkuvwtlwCHNf/sIMDI51SVCnst/2wVCFNI8cWiyTY88ekzQI5oEv+yMg0d9jFx+Nwh5dYxrH4QDaYdSBNkhzfB/f/78++8vX77a9BeimZlGo/Gq8WrKpqpHwzQRv0OPoncajZkZPAYa7MuXv//++RN1HQbf6XLhYwS5Lv+Gkg8JJx29ufl1ffT586fV29vbZ+uzs7N1xa5aPaKRuv2d68/sb1/99Pnz0fWvG9wOlwANuefVMaIEJBvRr6O3n1cRmvXZ34tFh0Zm19eHbNCf3x796iDGOHhbF9FrDAkheriQ5DSCEN+u2oCvvaDm/wESdYPcv7BfagAAAABJRU5ErkJggg=="
/>
<p data-info class="core-card-text">{{ plugin['description'] or ''}}</p>
<p data-info class="core-card-text">{{ plugin.get('description') }}</p>
</div>
</div>
<!-- end info -->
Expand Down Expand Up @@ -44,27 +44,18 @@ <h5 class="core-card-title">TEST</h5>

<!-- end test -->
<script nonce="{{script_nonce}}">
// Use SetupPlugin class that is on static/js/plugins/setup.js
const setPlugin = new SetupPlugin({
info: {
el: document.querySelector("[data-info]"),
value: "{{ plugin['description'] or ''}}",
type: "text",
},
// value : active / inactive / unknown
ping_status: {
el: document.querySelector("[data-status-svg]"),
value: "unknown",
type: "status",
textEl: document.querySelector("[data-status-text]"),
},
});

// When click to ping button
window.addEventListener("click", (e) => {
if (e.target.hasAttribute("data-ping")) {
window.location.href = `${location.origin}${location.pathname}?ping=true`;
}
const pingBtn = document.querySelector("[data-ping]");
const statusSvg = document.querySelector("[data-status-svg]");
const statusText = document.querySelector("[data-status-text]");

pingBtn.addEventListener("click", (e) => {
new Ping(
`${location.origin}${location.pathname}?ping=true`,
statusText,
statusSvg,
"ping_status",
);
});
</script>
{% else %}
Expand Down
4 changes: 4 additions & 0 deletions discord/ui/actions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
def pre_render(**kwargs):
pass


def discord(**kwargs):
ping = {"ping_status": "unknown"}

Expand Down
33 changes: 12 additions & 21 deletions discord/ui/template.html

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions slack/ui/actions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
def pre_render(**kwargs):
pass


def slack(**kwargs):
ping = {"ping_status": "unknown"}

Expand Down
33 changes: 12 additions & 21 deletions slack/ui/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h5 class="core-card-title">INFO</h5>
class="core-img-default"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAA1VBMVEX///82xfAutn3ssi7gHlorw/DrsCIitHjfC1OP2vXzz4yM0bDrhp/fAFHrrx2q3MSs4/jwprf226rrrADeAEgAsHHeAEzw+v4VwO/87/L9+O/v+fTS8PvR7N/3z9j669HuvFRZzPI6uYO/6fm95NFLvYvk9Oz88+Tzusf44r3xsL/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0xRD8VVCXpOVHaEeVnfTkyDl8EpCCvzaB2rkQqCIlVaMqkIjdRb0BVkn15Qe1egZQQao2nSgjRCi3FUpMjrHPGUENoa1yDqyHU6aaKMtkd6gdIlypCfQNREaGtb9JXRahvRlRFqC+Yfn3C5HVPQjUz3PwReRKqkEZSxIUS2TWOw2cRQqReXahmRueyTaRiCinmFkoQ1jjjgzPgP7wUaSliwxGldxUSqCeqosl/9wLbJ0oqpRKBH43ACqaEBqLe8zb4gxoe1hJOqPUYAz7nx+5HwXO+zu1hKCihi+f5gwufbGK/6nQKmxKt+BU3/ZIUBdS3oJkJOGEQWoLc1NA5VXwKVAlOeEQJWNvl5OASkZHhPxdeLzXThI+o/fLpQ9xqG4uc6R9M+7yhSKubUC1OtY33Sm3JqbZgPmOpVEwrMl+/ZL58mRcLhrq0aAvUqnvKbHlGLbYwNB5AEfT+SjajN2W97RmqdUQ2o/OWgyiK6OAu9khr1TuP17vFNbyI2dFwRrky4EwH/6JPEFc99xX2jHAwM75FimbCtK/7PPJ96PJlWnVDVaebg3f+3y813DiynVDG0UZu8eba2+ONPZparbyNvUK50H8+jaVnWGS2IAAAAABJRU5ErkJggg=="
/>
<p data-info class="core-card-text">{{ plugin['description'] or ''}}</p>
<p data-info class="core-card-text">{{ plugin.get('description') }}</p>
</div>
</div>
<!-- end info -->
Expand Down Expand Up @@ -49,27 +49,18 @@ <h5 class="core-card-title">TEST</h5>

<!-- end test -->
<script nonce="{{script_nonce}}">
// Use SetupPlugin class that is on static/js/plugins/setup.js
const setPlugin = new SetupPlugin({
info: {
el: document.querySelector("[data-info]"),
value: "{{ plugin['description'] or ''}}",
type: "text",
},
// value : active / inactive / unknown
ping_status: {
el: document.querySelector("[data-status-svg]"),
value: "unknown",
type: "status",
textEl: document.querySelector("[data-status-text]"),
},
});

// When click to ping button
window.addEventListener("click", (e) => {
if (e.target.hasAttribute("data-ping")) {
window.location.href = `${location.origin}${location.pathname}?ping=true`;
}
const pingBtn = document.querySelector("[data-ping]");
const statusSvg = document.querySelector("[data-status-svg]");
const statusText = document.querySelector("[data-status-text]");

pingBtn.addEventListener("click", (e) => {
new Ping(
`${location.origin}${location.pathname}?ping=true`,
statusText,
statusSvg,
"ping_status",
);
});
</script>
{% else %}
Expand Down
4 changes: 4 additions & 0 deletions virustotal/ui/actions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
def pre_render(**kwargs):
pass


def virustotal(**kwargs):
ping = {"ping_status": "unknown"}

Expand Down
Loading

0 comments on commit aa3e30e

Please sign in to comment.