Opened 13 years ago
Closed 13 years ago
#1783 closed enhancement (fixed)
Show number of hops (0 or 1) for CCCam readers on status page
Reported by: | ProgMaq | Owned by: | ProgMaq |
---|---|---|---|
Priority: | critical | Component: | Webinterface |
Severity: | low | Keywords: | CCcam, hop, http, local, web |
Cc: | admin@… | Sensitive: | no |
Description
Reason for enhancement
Permite mostrar en la página de estado el número de tarjetas físicas que tiene el reader
Possible impacts on other features
Nothing
What changes should I make the source code?
Open "oscam-http.c" and searh this:
int32_t cnt = ll_count(cards);
After this, delete the following two lines and add the following code
int32_t locals = 0; LL_ITER *it = ll_iter_create(cards); struct cc_card *card; while ((card = ll_iter_next(it))) if (card->hop <= 1) locals++; ll_iter_release(it); if(cnt == 1) tpl_printf(vars, TPLAPPEND, "CLIENTCON", " <A HREF=\"entitlements.html?label=%s\" title=\"Show cards\">(%d of 1 card)</A>", urlencode(vars, cl->reader->label), locals); else if(cnt > 1) tpl_printf(vars, TPLAPPEND, "CLIENTCON", " <A HREF=\"entitlements.html?label=%s\" title=\"Show cards\">(%d of %d cards)</A>", urlencode(vars, cl->reader->label), locals, cnt);
Compile and enjoy: p
Attachments (1)
Change History (5)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Thanks, it's working.
If you can add a tab in main page to read cccam global list from configuration -> cccam -> show global list.
comment:3 by , 13 years ago
Is this meant as a new version for [1744] or how should we understand that? Both don't work at the same time...
comment:4 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Reason for enhancement
Allows to show in the status page the number of physical cards that have the reader