Improving Nitter instances view.
This commit is contained in:
parent
abc2752292
commit
ac5061e40d
@ -1,3 +1,3 @@
|
|||||||
accessing
|
accessing
|
||||||
instances
|
instances
|
||||||
^ self instancesCache
|
^ self instanceRows
|
@ -1,16 +1,21 @@
|
|||||||
accessing
|
accessing
|
||||||
viewInstancesFor: aView
|
viewInstancesFor: aView
|
||||||
<gtView>
|
<gtView>
|
||||||
| columnedList columnNames |
|
| columnedList columnNamesMap |
|
||||||
self instances isEmptyOrNil ifTrue: [ ^ aView empty].
|
self instances isEmptyOrNil ifTrue: [ ^ aView empty].
|
||||||
columnedList := aView columnedList
|
columnedList := aView columnedList
|
||||||
title: 'Instances';
|
title: 'Instances';
|
||||||
items: [ self instanceRows ];
|
items: [ self instanceRows ];
|
||||||
priority: 1.
|
priority: 1.
|
||||||
columnNames := #('Instance' 'Healthy' 'Uptime %' 'RSS' 'Nitter Version').
|
columnNamesMap := {
|
||||||
columnNames doWithIndex: [:aName :index |
|
'Instance' -> 'url'.
|
||||||
|
'Healthy' -> 'healthy'.
|
||||||
|
'Uptime %' -> 'uptime'.
|
||||||
|
'RSS' -> 'rss'.
|
||||||
|
'Nitter Version' -> 'version'} asOrderedDictionary.
|
||||||
|
columnNamesMap keysAndValuesDo: [:aName :value |
|
||||||
columnedList
|
columnedList
|
||||||
column: aName
|
column: aName
|
||||||
text: [:instanceRow | (instanceRow slots at: index) ifNil: [''] ]
|
text: [:instanceRow | (instanceRow readSlotNamed: value) ifNil: [''] ]
|
||||||
].
|
].
|
||||||
^ columnedList
|
^ 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",
|
"super" : "Object",
|
||||||
"category" : "Socialmetrica",
|
"category" : "Socialmetrica",
|
||||||
"classinstvars" : [ ],
|
"classinstvars" : [ ],
|
||||||
|
Loading…
Reference in New Issue
Block a user