This commit is contained in:
Paulchen Panther 2021-05-02 19:04:58 +02:00
parent b06126ee28
commit 3fb0ece3a2
8 changed files with 42 additions and 54 deletions

View File

@ -20,16 +20,24 @@
<thead>
<tr>
<th colspan="3">
<i class="fa fa-eye fa-fw"></i>
<span data-i18n="dashboard_componentbox_label_title">Components</span>
<i class="mdi mdi-camera"></i>
<span data-i18n="main_menu_grabber_conf_token">Capturing Hardware</span>
</th>
</tr>
</thead>
<tbody class="glob_components"></tbody>
<tbody>
<tr>
<td></td>
<td data-i18n="edt_conf_fg_heading_title">Screen Capture</td>
<td id="dash_screen_capture" style="text-align:right">unknown</td>
</tr>
<tr>
<td></td>
<td data-i18n="edt_conf_v4l2_heading_title">USB Capture</td>
<td id="dash_usb_capture" style="text-align:right">unknown</td>
</tr>
</tbody>
</table>
<table class="table borderless">
<thead>
<tr>
@ -42,17 +50,17 @@
<tbody>
<tr>
<td></td>
<td><a onclick="SwitchToMenuItem('MenuItemNetwork', 'conf_cont_proto')" href="#" data-i18n="dashboard_infobox_label_port_proto">proto</a></td>
<td><a onclick="SwitchToMenuItem('MenuItemNetwork', 'editor_container_protoserver')" href="#" data-i18n="dashboard_infobox_label_port_proto">proto</a></td>
<td id="dash_pbPort" style="text-align:right">unknown</td>
</tr>
<tr>
<td></td>
<td><a onclick="SwitchToMenuItem('MenuItemNetwork', 'conf_cont_flatbuf')" href="#" data-i18n="dashboard_infobox_label_port_flat">flat</a></td>
<td><a onclick="SwitchToMenuItem('MenuItemNetwork', 'editor_container_fbserver')" href="#" data-i18n="dashboard_infobox_label_port_flat">flat</a></td>
<td id="dash_fbPort" style="text-align:right">unknown</td>
</tr>
<tr>
<td></td>
<td><a onclick="SwitchToMenuItem('MenuItemNetwork', 'conf_cont_json')" href="#" data-i18n="dashboard_infobox_label_port_json">json</a></td>
<td><a onclick="SwitchToMenuItem('MenuItemNetwork', 'editor_container_jsonserver')" href="#" data-i18n="dashboard_infobox_label_port_json">json</a></td>
<td id="dash_jsonPort" style="text-align:right">unknown</td>
</tr>
<tr>

View File

@ -76,9 +76,11 @@ table.input-group{width:100%}
/*table*/
table.borderless td,table.borderless th{border: none !important;}
table.borderless td:first-child{width: 25px !important;}
.borderless {margin-bottom:0px}
table label{margin:0}
table.first_cell_borderless td:first-child,table.first_cell_borderless th:first-child{border: none !important;}
table.first_cell_borderless td:first-child{width: 25px !important;}
/*Header*/
.navbar-brand{padding-top:4px;padding-bottom:0px;padding-left:2;}

View File

@ -214,7 +214,7 @@
<li> <a class="inactive mnava" href="#conf_colors"><i class="fa fa-photo fa-fw"></i><span data-i18n="main_menu_colors_conf_token">Image Processing</span></a> </li>
</ul>
</li>
<li> <a class="inactive mnava" href="#conf_grabber"><i class="fa fa-camera fa-fw"></i><span data-i18n="main_menu_grabber_conf_token">Capturing Hardware</span></a> </li>
<li> <a class="inactive mnava" id="MenuItemGrabber" href="#conf_grabber"><i class="fa fa-camera fa-fw"></i><span data-i18n="main_menu_grabber_conf_token">Capturing Hardware</span></a> </li>
<li> <a class="inactive mnava" id="MenuItemNetwork" href="#conf_network"><i class="fa fa-sitemap fa-fw"></i><span data-i18n="main_menu_network_conf_token">Network</span></a> </li>
<li> <a class="inactive mnava" href="#remote"><i class="fa fa-wifi fa-fw"></i><span data-i18n="main_menu_remotecontrol_token">Remote Control</span></a> </li>
<li> <a class="inactive mnava" href="#effects_configurator"><i class="fa fa-cogs fa-fw"></i><span data-i18n="main_menu_effectsconfigurator_token">Effects Configurator</span></a> </li>

View File

@ -51,36 +51,23 @@ $(document).ready(function () {
instances_html += '</th></tr></thead>';
var instance_components = "";
var global_components = "";
for (var idx = 0; idx < components.length; idx++) {
if (components[idx].name != "ALL") {
if (components[idx].name != "FORWARDER" && components[idx].name != "GRABBER" && components[idx].name != "V4L") {
var comp_enabled = components[idx].enabled ? "checked" : "";
const general_comp = "general_comp_" + components[idx].name;
var componentBtn = '<input ' +
'id="' + general_comp + '" ' + comp_enabled +
' type="checkbox" ' +
'data-toggle="toggle" ' +
'data-size="mini" ' +
'data-onstyle="success" ' +
'data-on="' + $.i18n('general_btn_on') + '" ' +
'data-off="' + $.i18n('general_btn_off') + '">';
if (components[idx].name === "FORWARDER" && window.currentHyperionInstance != 0)
continue;
instance_components += '<tr><td></td><td>' + $.i18n('general_comp_' + components[idx].name) + '</td><td style="text-align:right">' + componentBtn + '</td></tr>';
} else {
var comp_enabled = components[idx].enabled ? "checked" : "";
const general_comp = "general_comp_" + components[idx].name;
var componentBtn = '<input ' +
'id="' + general_comp + '" ' + comp_enabled +
' type="checkbox" ' +
'data-toggle="toggle" ' +
'data-size="mini" ' +
'data-onstyle="success" ' +
'data-on="' + $.i18n('general_btn_on') + '" ' +
'data-off="' + $.i18n('general_btn_off') + '">';
var comp_enabled = components[idx].enabled ? "checked" : "";
const general_comp = "general_comp_" + components[idx].name;
var componentBtn = '<input ' +
'id="' + general_comp + '" ' + comp_enabled +
' type="checkbox" ' +
'data-toggle="toggle" ' +
'data-size="mini" ' +
'data-onstyle="success" ' +
'data-on="' + $.i18n('general_btn_on') + '" ' +
'data-off="' + $.i18n('general_btn_off') + '">';
global_components += '<tr><td></td><td>' + $.i18n('general_comp_' + components[idx].name) + '</td><td style="text-align:right">' + componentBtn + '</td></tr>';
}
instance_components += '<tr><td></td><td>' + $.i18n('general_comp_' + components[idx].name) + '</td><td style="text-align:right">' + componentBtn + '</td></tr>';
}
}
@ -88,7 +75,6 @@ $(document).ready(function () {
instances_html += '</div></div></div>';
$('.instances').prepend(instances_html);
$('.glob_components').html(global_components);
updateUiOnInstance(window.currentHyperionInstance);
updateHyperionInstanceListing();
@ -113,6 +99,11 @@ $(document).ready(function () {
}
// add more info
var screenCapture = window.serverConfig.instCapture.systemEnable ? $.i18n('general_enabled') : $.i18n('general_disabled');
$('#dash_screen_capture').html(screenCapture);
var usbCapture = window.serverConfig.instCapture.v4lEnable ? $.i18n('general_enabled') : $.i18n('general_disabled');
$('#dash_usb_capture').html(usbCapture);
var fbPort = window.serverConfig.flatbufServer.enable ? window.serverConfig.flatbufServer.port : $.i18n('general_disabled');
$('#dash_fbPort').html(fbPort);
var pbPort = window.serverConfig.protoServer.enable ? window.serverConfig.protoServer.port : $.i18n('general_disabled');

View File

@ -312,7 +312,7 @@ $(document).ready(function () {
$("#navbar_brand_logo").css("display", "none");
else
$("#navbar_brand_logo").css("display", "");
});
});
$('#side-menu li a, #side-menu li ul li a').click(function() {
console.log('test');

View File

@ -201,7 +201,7 @@ $(document).ready(function () {
});
for (const comp of components) {
if (comp.name === "ALL")
if (comp.name === "ALL" || (comp.name === "FORWARDER" && window.currentHyperionInstance != 0))
continue;
const enable_style = (comp.enabled ? "checked" : "");

View File

@ -205,20 +205,8 @@ bool API::setComponentState(const QString &comp, bool &compState, QString &reply
if (component != COMP_INVALID)
{
if (component == COMP_FORWARDER ||
component == COMP_GRABBER ||
component == COMP_V4L ||
component == COMP_FLATBUFSERVER ||
component == COMP_PROTOSERVER)
{
QMetaObject::invokeMethod(_instanceManager, "compStateChangeRequest", Qt::QueuedConnection, Q_ARG(hyperion::Components, component), Q_ARG(bool, compState));
return true;
}
else
{
QMetaObject::invokeMethod(_hyperion, "compStateChangeRequest", Qt::QueuedConnection, Q_ARG(hyperion::Components, component), Q_ARG(bool, compState));
return true;
}
QMetaObject::invokeMethod(_hyperion, "compStateChangeRequest", Qt::QueuedConnection, Q_ARG(hyperion::Components, component), Q_ARG(bool, compState));
return true;
}
replyMsg = QString("Unknown component name: %1").arg(comp);
return false;

View File

@ -90,7 +90,6 @@ bool HyperionIManager::startInstance(quint8 inst, bool block, QObject* caller, i
connect(hyperion, &Hyperion::videoMode, this, &HyperionIManager::requestVideoMode);
// to Hyperion
connect(this, &HyperionIManager::newVideoMode, hyperion, &Hyperion::newVideoMode);
connect(this, &HyperionIManager::compStateChangeRequest, hyperion, &Hyperion::compStateChangeRequest);
// add to queue and start
_startQueue << inst;