Commit e4137262 authored by David Byers's avatar David Byers
Browse files

Improved display of client statistics in kom-list-clients

Detailed changes:
> 2003-12-03  David Byers  <davby@ida-gw.sysinst.ida.liu.se>
>
> 	* commands1.el (lyskom-list-clients-collect): Client statistics
> 	now semi-ignore parentheses in the version field.
>
parent 7153ef52
2003-12-03 David Byers <davby@ida-gw.sysinst.ida.liu.se>
* commands1.el (lyskom-list-clients-collect): Client statistics
now semi-ignore parentheses in the version field.
2003-11-17 David Byers <byers@lysator.liu.se>
Fix bug 1142:
......
......@@ -3168,12 +3168,22 @@ prefix argument \(C-u -), list all sessions."
(defun lyskom-list-clients-collect (client version collect)
"Collect client statistics"
(let* ((name (concat client " " version))
(el (assoc name (collector->value collect))))
(if el
(setcdr el (1+ (cdr el)))
(set-collector->value collect (cons (cons name 1)
(collector->value collect))))))
(let* ((uversion
(cond ((null version) version)
((null client) version)
((string-match "(.*; CVS)" version)
(replace-in-string version "(.*; CVS)" "(from CVS)"))
((string-match "\\s-*(build [^)]*)" version)
(replace-in-string version "\\s-*(build [^)]*)" ""))
(t version)))
(name (concat client " " uversion))
(el (assoc name (collector->value collect))))
(if el
(progn (aset (cdr el) 0 (1+ (aref (cdr el) 0)))
(unless (lyskom-string-member version (aref (cdr el) 1))
(aset (cdr el) 1 (cons version (aref (cdr el) 1)))))
(set-collector->value collect (cons (cons name (vector 1 (list version)))
(collector->value collect))))))
(defun lyskom-list-clients-statistics-1 (time arg defer-info)
(initiate-get-time 'deferred
......@@ -3190,7 +3200,8 @@ prefix argument \(C-u -), list all sessions."
(if (equal (car el) " ")
(lyskom-get-string 'Unknown)
(car el))
(cdr el)))
(aref (cdr el) 0)
(length (aref (cdr el) 1))))
(nreverse
(sort (collector->value (defer-info->data defer-info))
(lambda (a b)
......
......@@ -524,7 +524,7 @@ Read all about it at http://www.lysator.liu.se/history/")
(total-visible-active-users
. " A total of %#1d visible%#1?d%[%]%[%] active user%#1?d%[%]%[s%] (%#2s).\n")
(client-statistics . " Distribution of clients:\n")
(client-statistics-line . " %4#2d %#1s")
(client-statistics-line . " %4#2d %#1s%#3?d%[%]%[ [%#3d variants]%]")
(who-to-add-q . "Add whom/what as a recipient? ")
(who-to-add-copy-q . "Add which conference/user as carbon copy recipient? ")
(who-to-add-bcc-q . "Add which conference/user as blind carbon copy recipient? ")
......
......@@ -538,7 +538,7 @@ i svensk datorhistoria. L
(total-visible-active-users
. " Sammanlagt %#1d synlig%#1?d%[%]%[a%] aktiv%#1?d%[%]%[a%] anvndare (%#2s).\n")
(client-statistics . " Klienternas frdelning:\n")
(client-statistics-line . " %4#2d %#1s")
(client-statistics-line . " %4#2d %#1s%#3?d%[%]%[ [%#3d varianter]%]")
(who-to-add-q . "Vilket mte/person vill du addera som mottagare? ")
(who-to-add-copy-q . "Vilket mte/person vill du addera som kopiemottagare? ")
(who-to-add-bcc-q . "Vilket mte/person vill du addera som mottagare av en dold kopia? ")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment