From 45b059ed14f0fceae930b9f1e87e9465d690b19e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96man?= Date: Wed, 21 Nov 2007 12:44:49 +0000 Subject: [PATCH] add list to active transports --- htmlui.c | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 85 insertions(+), 6 deletions(-) diff --git a/htmlui.c b/htmlui.c index ad7e6922..375e4725 100644 --- a/htmlui.c +++ b/htmlui.c @@ -788,6 +788,7 @@ page_status(http_connection_t *hc, const char *remain, void *opaque) th_subscription_t *s; th_transport_t *t; th_dvb_mux_instance_t *tdmi; + th_stream_t *st; const char *txt; tcp_init_queue(&tq, -1); @@ -811,7 +812,8 @@ page_status(http_connection_t *hc, const char *remain, void *opaque) tcp_qprintf(&tq, "No DVB adapters configured
"); } else { LIST_FOREACH(tda, &dvb_adapters_running, tda_link) { - tcp_qprintf(&tq, "
%s
%s
", tda->tda_path, tda->tda_info); + tcp_qprintf(&tq, "
%s
%s
", + tda->tda_path, tda->tda_info); LIST_FOREACH(tdmi, &tda->tda_muxes_active, tdmi_adapter_link) { tcp_qprintf(&tq, @@ -889,24 +891,98 @@ page_status(http_connection_t *hc, const char *remain, void *opaque) tcp_qprintf(&tq, ""); + /* Active transports */ tcp_qprintf(&tq, "
"); box_top(&tq, "box"); tcp_qprintf(&tq, "
"); - tcp_qprintf(&tq, "Active transports"); + tcp_qprintf(&tq, "
Active transports
"); tcp_qprintf(&tq, "
"); box_bottom(&tq); + tcp_qprintf(&tq, "
"); + + LIST_FOREACH(t, &all_transports, tht_global_link) { + if(t->tht_status != TRANSPORT_RUNNING) + continue; + + box_top(&tq, "box"); + tcp_qprintf(&tq, "
"); + + tcp_qprintf(&tq, + "" + "%s" + "" + "" + "%s" + "
", + t->tht_name, + t->tht_channel->ch_name); + + tcp_qprintf(&tq, + "" + "%s" + "" + "" + "%s" + "

", + t->tht_dvb_mux->tdm_name, + t->tht_dvb_adapter->tda_path); + + + LIST_FOREACH(st, &t->tht_streams, st_link) { + + tcp_qprintf(&tq, + "" + "%s" + "", + htstvstreamtype2txt(st->st_type)); + + tcp_qprintf(&tq, + "" + "%d kb/s" + "", + avgstat_read_and_expire(&st->st_rate, dispatch_clock) + / 1000); + + + tcp_qprintf(&tq, + "" + "%d errors/s" + "
", + avgstat_read_and_expire(&st->st_cc_errors, dispatch_clock)); + } + + tcp_qprintf(&tq, "
"); + box_bottom(&tq); + tcp_qprintf(&tq, "
"); + } tcp_qprintf(&tq, "
"); + /* Subscribers */ + tcp_qprintf(&tq, "
"); box_top(&tq, "box"); tcp_qprintf(&tq, "
"); - tcp_qprintf(&tq, "Subscriptions
"); + tcp_qprintf(&tq, "
Subscriptions
"); + tcp_qprintf(&tq, "
"); + box_bottom(&tq); + tcp_qprintf(&tq, "
"); LIST_FOREACH(s, &subscriptions, ths_global_link) { + + box_top(&tq, "box"); + tcp_qprintf(&tq, "
"); + tcp_qprintf(&tq, - "
" "%s" "", @@ -927,11 +1003,14 @@ page_status(http_connection_t *hc, const char *remain, void *opaque) "Using transport \"%s\"
", t->tht_name); } + + tcp_qprintf(&tq, "
"); + box_bottom(&tq); + tcp_qprintf(&tq, "
"); + } - tcp_qprintf(&tq, "
"); - box_bottom(&tq); tcp_qprintf(&tq, ""); tcp_qprintf(&tq, "");