Geo - Provide generated list of Replicable Types to the Node Status Frontend
Split off from #225529 (closed)
Inspired by @vsizov issue #219938 (closed) and comments #225529 (comment 378290968)
What/Why
The current process to adding a new data type to the Geo Node Status Bars is not scalable. More can be read about the extensive process here: #225529 (closed)
We need a way to create a generic and scalable way to add new data types to the Geo Node Status Bars via Geo Self Service.
This proposal introduces the idea of re-working our the way the frontend generates the list of Status bars by receiving a generated list from the backend via the index.haml.html
file
Then looping through the list and extracting the counts from the API based on the keys provided from the index file.
Proposal
- Add method to
geo_helper.rb
to build an array of replicable types
1a. To do this we will first need to hard-code all the non-SSF types
1b. Then we will loop throughreplicator_classes
fromgeo.rb
to get all the SSF data types
1c. The end result should look like:
replicable_types = [
{
plural_name: 'package_files',
plural_title: 'Package files'
},
{
plural_name: 'attachments',
plural_title: 'Attachments'
},
...
],
This will then unblock #228722 (closed) and allow it to be worked