chore: initial import for test contour with k3s CI

This commit is contained in:
sova-bootstrap
2026-05-28 12:09:28 +03:00
commit d77d0a872f
423 changed files with 35401 additions and 0 deletions
@@ -0,0 +1,31 @@
import { Controller } from 'stimulus';
import Cookies from 'js-cookie';
/*
* This is an example Stimulus controller!
*
* Any element with a data-controller="default" attribute will cause
* this controller to be executed. The name "default" comes from the filename:
* default_controller.js -> "default"
*
* Delete this file or adapt it for your use!
*/
export default class extends Controller {
connect() {
var bannerWrap = this.element;
$.ajax({
dataType: "json",
method: 'GET',
url: '/api/banner/' + Cookies.get('region'),
success(response) {
if (response.active == true) {
var a = document.createElement('a');
a.href = response.href;
a.target = "_blank";
a.innerHTML = '<img src="/banners/' + response.src + '" alt="баннер">'
bannerWrap.append(a);
}
}
});
}
}