Default view of instances for the Nitter class.
This commit is contained in:
parent
d6824d0c97
commit
8843a31d5d
3
Socialmetrica.package/Nitter.class/class/columnKeys.st
Normal file
3
Socialmetrica.package/Nitter.class/class/columnKeys.st
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
accessing
|
||||||
|
columnKeys
|
||||||
|
^ #('url' 'healthy' 'healthy_percentage_overall' 'rss' 'version')
|
@ -2,5 +2,6 @@ accessing
|
|||||||
instanceRows
|
instanceRows
|
||||||
^ (self instances at: 'hosts') collect: [:rawRow | | newRow |
|
^ (self instances at: 'hosts') collect: [:rawRow | | newRow |
|
||||||
newRow := OrderedCollection new.
|
newRow := OrderedCollection new.
|
||||||
newRow add: (rawRow at: 'url')
|
self columnKeys do: [:key | newRow add: (rawRow at: key) ].
|
||||||
|
newRow
|
||||||
].
|
].
|
@ -1,10 +1,16 @@
|
|||||||
accessing
|
accessing
|
||||||
viewInstancesFor: aView
|
viewInstancesFor: aView
|
||||||
<gtView>
|
<gtView>
|
||||||
| columnedList |
|
| columnedList columnNames |
|
||||||
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: 80.
|
priority: 1.
|
||||||
|
columnNames := #('Instance' 'Healthy' 'Uptime %' 'RSS' 'Nitter Version').
|
||||||
|
columnNames doWithIndex: [:aName :index |
|
||||||
|
columnedList
|
||||||
|
column: aName
|
||||||
|
text: [:instanceRow | (instanceRow at: index) ifNil: [''] ]
|
||||||
|
].
|
||||||
^ columnedList
|
^ columnedList
|
Loading…
Reference in New Issue
Block a user