document.querySelectorAll('.main-grid-row-action-button').forEach(function(el) {
el.onclick = function() {
const actions = el.dataset.actions;
if (actions) {
const toParse = actions.slice(2,-2); //удаляем странные скобки
const newText = toParse.replace (/'/g, '"');
const parsed = JSON.parse(newText);
const startIndex = parsed.onclick.indexOf('\"id\":\"');
const endIndex = parsed.onclick.indexOf('",\"type\"');
const id = parsed.onclick.substring(startIndex + '\"id\":\"'.length, endIndex);
console.log(id);
}
}
});
etc/supervisor/conf.d/dev-project-worker.conf
supervisorctl status all