mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	activity: Correct description of message-history figures.
This explains why the first number was usually the smallest!
This commit is contained in:
		@@ -265,11 +265,13 @@ def get_realm_day_counts() -> Dict[str, Dict[str, str]]:
 | 
				
			|||||||
    result = {}
 | 
					    result = {}
 | 
				
			||||||
    for string_id in counts:
 | 
					    for string_id in counts:
 | 
				
			||||||
        raw_cnts = [counts[string_id].get(age, 0) for age in range(8)]
 | 
					        raw_cnts = [counts[string_id].get(age, 0) for age in range(8)]
 | 
				
			||||||
        min_cnt = min(raw_cnts)
 | 
					        min_cnt = min(raw_cnts[1:])
 | 
				
			||||||
        max_cnt = max(raw_cnts)
 | 
					        max_cnt = max(raw_cnts[1:])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        def format_count(cnt: int) -> str:
 | 
					        def format_count(cnt: int, style: Optional[str]=None) -> str:
 | 
				
			||||||
            if cnt == min_cnt:
 | 
					            if style is not None:
 | 
				
			||||||
 | 
					                good_bad = style
 | 
				
			||||||
 | 
					            elif cnt == min_cnt:
 | 
				
			||||||
                good_bad = 'bad'
 | 
					                good_bad = 'bad'
 | 
				
			||||||
            elif cnt == max_cnt:
 | 
					            elif cnt == max_cnt:
 | 
				
			||||||
                good_bad = 'good'
 | 
					                good_bad = 'good'
 | 
				
			||||||
@@ -278,7 +280,8 @@ def get_realm_day_counts() -> Dict[str, Dict[str, str]]:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            return '<td class="number %s">%s</td>' % (good_bad, cnt)
 | 
					            return '<td class="number %s">%s</td>' % (good_bad, cnt)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        cnts = ''.join(map(format_count, raw_cnts))
 | 
					        cnts = (format_count(raw_cnts[0], 'neutral')
 | 
				
			||||||
 | 
					                + ''.join(map(format_count, raw_cnts[1:])))
 | 
				
			||||||
        result[string_id] = dict(cnts=cnts)
 | 
					        result[string_id] = dict(cnts=cnts)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return result
 | 
					    return result
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -24,7 +24,7 @@
 | 
				
			|||||||
            <th>DAT/DAU (hr)</th>
 | 
					            <th>DAT/DAU (hr)</th>
 | 
				
			||||||
            <th>DAT (hr)</th>
 | 
					            <th>DAT (hr)</th>
 | 
				
			||||||
            <th></th>
 | 
					            <th></th>
 | 
				
			||||||
            <th colspan=8>Human messages sent, last 8 x 24hr (latest first)</th>
 | 
					            <th colspan=8>Human messages sent, last 8 UTC days (today-so-far first)</th>
 | 
				
			||||||
        </tr>
 | 
					        </tr>
 | 
				
			||||||
    </thead>
 | 
					    </thead>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user