mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/relayd: Usability improvements https://github.com/opnsense/plugins/issues/2232 (#2398)
minor visual improvements on the status page. o reset cursor pointer on status widgets o in host column add one button spacing for better alignment o add a space between buttons and text
This commit is contained in:
@@ -33,7 +33,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
* create status and start/stop buttons
|
||||
**/
|
||||
function getControlButtons(status, id, nodeType) {
|
||||
let status_btn = $('<button class="label label-opnsense label-opnsense-xs"/>');
|
||||
let status_btn = $('<button class="label label-opnsense label-opnsense-xs"/>').css('cursor', 'auto');
|
||||
let action_btn = $('<button class="btn btn-xs btn-default" data-toggle="tooltip"/>').attr('data-nodeid', id).attr('data-nodetype', nodeType);
|
||||
let action_btn_remove = action_btn.clone(true);
|
||||
let response = [];
|
||||
@@ -75,6 +75,14 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
if (nodeType === 'relay') {
|
||||
action_btn.removeClass('node_action').attr('disabled', 'disabled');
|
||||
}
|
||||
|
||||
if (nodeType == 'host' && response.length == 2) {
|
||||
response.push(
|
||||
$('<button class="label label-opnsense label-opnsense-xs"/>').css('cursor', 'auto').css('opacity', '0').append(
|
||||
$("<i class='fa fa-fw'/>")
|
||||
)
|
||||
);
|
||||
}
|
||||
return response;
|
||||
};
|
||||
|
||||
@@ -160,6 +168,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
$vs_td.append(
|
||||
$('<div class="object_container"/>').append(
|
||||
getControlButtons(virtualserver.status, virtualserver.id, virtualserver.type),
|
||||
' ',
|
||||
virtualserver.name,
|
||||
listen_str,
|
||||
' (' + virtualserver.type + '): ',
|
||||
@@ -174,6 +183,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
$tbl_td.append(
|
||||
$('<div class="object_container"/>').append(
|
||||
getControlButtons(table.status, tkey, 'table'),
|
||||
' ',
|
||||
table.name + ' ' + table.status
|
||||
).data('payload', table).data('type', 'table')
|
||||
);
|
||||
@@ -195,6 +205,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
$host_td.append(
|
||||
$('<div class="object_container"/>').append(
|
||||
getControlButtons(host.status, hkey, 'host'),
|
||||
' ',
|
||||
display_name,
|
||||
" ",
|
||||
host.status
|
||||
|
||||
Reference in New Issue
Block a user