Improving Nitter instances view.
This commit is contained in:
parent
abc2752292
commit
ac5061e40d
@ -1,3 +1,3 @@
|
||||
accessing
|
||||
instances
|
||||
^ self instancesCache
|
||||
^ self instanceRows
|
@ -1,16 +1,21 @@
|
||||
accessing
|
||||
viewInstancesFor: aView
|
||||
<gtView>
|
||||
| columnedList columnNames |
|
||||
| columnedList columnNamesMap |
|
||||
self instances isEmptyOrNil ifTrue: [ ^ aView empty].
|
||||
columnedList := aView columnedList
|
||||
title: 'Instances';
|
||||
items: [ self instanceRows ];
|
||||
priority: 1.
|
||||
columnNames := #('Instance' 'Healthy' 'Uptime %' 'RSS' 'Nitter Version').
|
||||
columnNames doWithIndex: [:aName :index |
|
||||
columnNamesMap := {
|
||||
'Instance' -> 'url'.
|
||||
'Healthy' -> 'healthy'.
|
||||
'Uptime %' -> 'uptime'.
|
||||
'RSS' -> 'rss'.
|
||||
'Nitter Version' -> 'version'} asOrderedDictionary.
|
||||
columnNamesMap keysAndValuesDo: [:aName :value |
|
||||
columnedList
|
||||
column: aName
|
||||
text: [:instanceRow | (instanceRow slots at: index) ifNil: [''] ]
|
||||
text: [:instanceRow | (instanceRow readSlotNamed: value) ifNil: [''] ]
|
||||
].
|
||||
^ columnedList
|
@ -0,0 +1,7 @@
|
||||
I model a Nitter instance uptime & health tracker as described in https://status.d420.de/about.
|
||||
|
||||
Taken from the official documentation, in the previous linkm the fields we are modelling are:
|
||||
|
||||
- healthy: stands for hosts which are reachable and pass a content check.
|
||||
- rss: whether the host has RSS feeds enabled.
|
||||
- version: which nitter version the host reports.
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
hasRSS
|
||||
^ self rss
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
healthy
|
||||
^ healthy
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
isHealthy
|
||||
^ self healthy
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
rss
|
||||
^ rss
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"commentStamp" : "",
|
||||
"commentStamp" : "<historical>",
|
||||
"super" : "Object",
|
||||
"category" : "Socialmetrica",
|
||||
"classinstvars" : [ ],
|
||||
|
Loading…
Reference in New Issue
Block a user