I have an idea to implement this function after I found someone's solution from forum. May be a little bit stupid.
I creat a template node link to a group.See below code.,
<style>
#my-refresh-button {
background-color: #353f48;
color: #f6f6f6;
border: none;
font-size: 35px;
}
</style>
<script>
var theScope = scope;
var myButton = document.getElementById("my-refresh-button");
if(!myButton) {
var button = document.createElement('BUTTON');
button.addEventListener('click', sendPayload);
button.innerHTML ='≡'
button.id = 'my-refresh-button'
button.style.position = 'absolute'
button.style.right = '5px'
button.style.top = '-2px'
var titleBar = document.getElementById("nr-dashboard-toolbar");
titleBar.append(button);
}
function sendPayload(){
theScope.send("1");
}
</script>