Dashboard update + fix GlobalSignal connection

This commit is contained in:
Paulchen Panther 2021-05-05 21:59:24 +02:00
parent d2197d75d0
commit 6df509f876
6 changed files with 47 additions and 29 deletions

View File

@ -37,7 +37,7 @@
<div class="panel-body"> <div class="panel-body">
<div id="btn_wiz_holder"></div> <div id="btn_wiz_holder"></div>
<div id='editor_container_leddevice'></div> <div id='editor_container_leddevice'></div>
<div class="bs-callout bs-callout-info" style="margin-top:0px"><h4 data-i18n="dashboard_infobox_label_title">Information</h4><span data-i18n="conf_leds_device_info_log"> In case your LEDs do not work, check here for errors: </span> <a onclick="SwitchToMenuItem('MenuItemLogging')" href="#" data-i18n="main_menu_logging_token"></a></div> <div class="bs-callout bs-callout-info" style="margin-top:0px"><h4 data-i18n="dashboard_infobox_label_title">Information</h4><span data-i18n="conf_leds_device_info_log"> In case your LEDs do not work, check here for errors: </span> <a onclick="SwitchToMenuItem('MenuItemLogging')" data-i18n="main_menu_logging_token" style="cursor:pointer"></a></div>
</div> </div>
<div class="panel-footer" style="text-align:right"> <div class="panel-footer" style="text-align:right">
<button id='btn_test_controller' class="btn btn-primary hidden" disabled data-toggle="tooltip" data-placement="top" title="Identify configured device by lighting it up"> <button id='btn_test_controller' class="btn btn-primary hidden" disabled data-toggle="tooltip" data-placement="top" title="Identify configured device by lighting it up">

View File

@ -29,12 +29,18 @@
<tr> <tr>
<td></td> <td></td>
<td data-i18n="edt_conf_fg_heading_title">Screen-Grabber</td> <td data-i18n="edt_conf_fg_heading_title">Screen-Grabber</td>
<td id="dash_screen_grabber" style="text-align:right">disabled</td> <td style="text-align: right; padding-right: 0">
<span id="dash_screen_grabber">disabled</span>
<a class="fa fa-cog fa-fw" onclick="SwitchToMenuItem('MenuItemGrabber', 'editor_container_screengrabber')" style="text-decoration: none; cursor: pointer"></a>
</td>
</tr> </tr>
<tr> <tr>
<td></td> <td></td>
<td data-i18n="edt_conf_v4l2_heading_title">Video-Grabber</td> <td data-i18n="edt_conf_v4l2_heading_title">Video-Grabber</td>
<td id="dash_video_grabber" style="text-align:right">disabled</td> <td style="text-align: right; padding-right: 0">
<span id="dash_video_grabber">disabled</span>
<a class="fa fa-cog fa-fw" onclick="SwitchToMenuItem('MenuItemGrabber', 'editor_container_videograbber')" style="text-decoration: none; cursor: pointer"></a>
</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -50,23 +56,35 @@
<tbody> <tbody>
<tr> <tr>
<td></td> <td></td>
<td><a onclick="SwitchToMenuItem('MenuItemNetwork', 'editor_container_protoserver')" href="#" data-i18n="dashboard_infobox_label_port_proto" style="text-decoration: none">proto</a></td> <td data-i18n="dashboard_infobox_label_port_proto">proto</td>
<td id="dash_pbPort" style="text-align:right">unknown</td> <td style="text-align: right; padding-right: 0">
<span id="dash_pbPort">unknown</span>
<a class="fa fa-cog fa-fw" onclick="SwitchToMenuItem('MenuItemNetwork', 'editor_container_protoserver')" style="text-decoration: none; cursor: pointer"></a>
</td>
</tr> </tr>
<tr> <tr>
<td></td> <td></td>
<td><a onclick="SwitchToMenuItem('MenuItemNetwork', 'editor_container_fbserver')" href="#" data-i18n="dashboard_infobox_label_port_flat" style="text-decoration: none">flat</a></td> <td data-i18n="dashboard_infobox_label_port_flat">flat</td>
<td id="dash_fbPort" style="text-align:right">unknown</td> <td style="text-align: right; padding-right: 0">
<span id="dash_fbPort">unknown</span>
<a class="fa fa-cog fa-fw" onclick="SwitchToMenuItem('MenuItemNetwork', 'editor_container_fbserver')" style="text-decoration: none; cursor: pointer"></a>
</td>
</tr> </tr>
<tr> <tr>
<td></td> <td></td>
<td><a onclick="SwitchToMenuItem('MenuItemNetwork', 'editor_container_jsonserver')" href="#" data-i18n="dashboard_infobox_label_port_json" style="text-decoration: none">json</a></td> <td data-i18n="dashboard_infobox_label_port_json">json</td>
<td id="dash_jsonPort" style="text-align:right">unknown</td> <td style="text-align: right; padding-right: 0">
<span id="dash_jsonPort">unknown</span>
<a class="fa fa-cog fa-fw" onclick="SwitchToMenuItem('MenuItemNetwork', 'editor_container_jsonserver')" style="text-decoration: none; cursor: pointer"></a>
</td>
</tr> </tr>
<tr> <tr>
<td></td> <td></td>
<td><a onclick="SwitchToMenuItem('MenuItemWeb')" href="#" data-i18n="dashboard_infobox_label_ports_websocket" style="text-decoration: none">websocket</a></td> <td data-i18n="dashboard_infobox_label_ports_websocket">websocket</td>
<td id="dash_wsPorts" style="text-align:right">unknown</td> <td style="text-align: right; padding-right: 0">
<span id="dash_wsPorts">unknown</span>
<a class="fa fa-cog fa-fw" onclick="SwitchToMenuItem('MenuItemWeb')" style="text-decoration: none; cursor: pointer"></a>
</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -83,17 +101,17 @@
<tr> <tr>
<td></td> <td></td>
<td data-i18n="dashboard_infobox_label_currenthyp">Hyperion version:</td> <td data-i18n="dashboard_infobox_label_currenthyp">Hyperion version:</td>
<td id="dash_currv" style="text-align:right">unknown</td> <td id="dash_currv" style="text-align: right">unknown</td>
</tr> </tr>
<tr> <tr>
<td></td> <td></td>
<td data-i18n="dashboard_infobox_label_watchedversionbranch">Watched version branch:</td> <td data-i18n="dashboard_infobox_label_watchedversionbranch">Watched version branch:</td>
<td id="dash_watchedversionbranch" style="text-align:right">unknown</td> <td id="dash_watchedversionbranch" style="text-align: right">unknown</td>
</tr> </tr>
<tr> <tr>
<td></td> <td></td>
<td data-i18n="dashboard_infobox_label_latesthyp">Latest version:</td> <td data-i18n="dashboard_infobox_label_latesthyp">Latest version:</td>
<td id="dash_latev" style="text-align:right">unknown</td> <td id="dash_latev" style="text-align: right">unknown</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View File

@ -39,9 +39,11 @@ $(document).ready(function () {
instances_html += '<span>' + $.i18n('dashboard_infobox_label_title') + '</span>'; instances_html += '<span>' + $.i18n('dashboard_infobox_label_title') + '</span>';
instances_html += '</th></tr></thead>'; instances_html += '</th></tr></thead>';
instances_html += '<tbody><tr><td></td>'; instances_html += '<tbody><tr><td></td>';
instances_html += '<td><a onclick="SwitchToMenuItem(\'MenuItemLeds\')" href="#" style="text-decoration:none">' + $.i18n('conf_leds_contr_label_contrtype') + '</a></td>'; instances_html += '<td>' + $.i18n('conf_leds_contr_label_contrtype') + '</td>';
instances_html += '<td style="text-align:right">' + window.serverConfig.device.type + '</td>'; instances_html += '<td style="text-align:right; padding-right:0">';
instances_html += '</tr><tr></tbody></table>'; instances_html += '<span>' + window.serverConfig.device.type + ' </span>';
instances_html += '<a class="fa fa-cog fa-fw" onclick="SwitchToMenuItem(\'MenuItemLeds\')" style="text-decoration:none;cursor:pointer"></a>';
instances_html += '</td></tr><tr></tbody></table>';
instances_html += '<table class="table first_cell_borderless">'; instances_html += '<table class="table first_cell_borderless">';
instances_html += '<thead><tr><th colspan="3">'; instances_html += '<thead><tr><th colspan="3">';
@ -53,14 +55,11 @@ $(document).ready(function () {
var instance_components = ""; var instance_components = "";
for (var idx = 0; idx < components.length; idx++) { for (var idx = 0; idx < components.length; idx++) {
if (components[idx].name != "ALL") { if (components[idx].name != "ALL") {
if (components[idx].name === "FORWARDER" && window.currentHyperionInstance != 0) if ((components[idx].name === "FORWARDER" && window.currentHyperionInstance != 0) ||
(components[idx].name === "GRABBER" && !window.serverConfig.instCapture.systemEnable) ||
(components[idx].name === "V4L" && !window.serverConfig.instCapture.v4lEnable))
continue; continue;
if ((components[idx].name === "GRABBER" && !window.serverConfig.instCapture.systemEnable) || (components[idx].name === "V4L" && !window.serverConfig.instCapture.v4lEnable))
{
componentBtn = '<a class="fa fa-cog fa-fw" onclick="SwitchToMenuItem(\'MenuItemGrabber\')" href="#" style="text-decoration: none"></a>';
} else {
var comp_enabled = components[idx].enabled ? "checked" : ""; var comp_enabled = components[idx].enabled ? "checked" : "";
const general_comp = "general_comp_" + components[idx].name; const general_comp = "general_comp_" + components[idx].name;
componentBtn = '<input ' + componentBtn = '<input ' +
@ -71,7 +70,6 @@ $(document).ready(function () {
'data-onstyle="success" ' + 'data-onstyle="success" ' +
'data-on="' + $.i18n('general_btn_on') + '" ' + 'data-on="' + $.i18n('general_btn_on') + '" ' +
'data-off="' + $.i18n('general_btn_off') + '">'; 'data-off="' + $.i18n('general_btn_off') + '">';
}
instance_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>';
} }

View File

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

View File

@ -77,7 +77,7 @@ void CaptureCont::setSystemCaptureEnable(bool enable)
} }
else else
{ {
disconnect(GlobalSignals::getInstance(), &GlobalSignals::setSystemImage, 0, 0); disconnect(GlobalSignals::getInstance(), &GlobalSignals::setSystemImage, this, 0);
_hyperion->clear(_systemCaptPrio); _hyperion->clear(_systemCaptPrio);
_systemInactiveTimer->stop(); _systemInactiveTimer->stop();
_systemCaptName = ""; _systemCaptName = "";
@ -100,7 +100,7 @@ void CaptureCont::setV4LCaptureEnable(bool enable)
} }
else else
{ {
disconnect(GlobalSignals::getInstance(), &GlobalSignals::setV4lImage, 0, 0); disconnect(GlobalSignals::getInstance(), &GlobalSignals::setV4lImage, this, 0);
_hyperion->clear(_v4lCaptPrio); _hyperion->clear(_v4lCaptPrio);
_v4lInactiveTimer->stop(); _v4lInactiveTimer->stop();
_v4lCaptName = ""; _v4lCaptName = "";