Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

New environments view #34

Merged

Conversation

arbulu89
Copy link
Contributor

Implementation of the new Environments entry point. This adds a new element in the sidebar that gives the option to move along the environments/landscapes/sap systems in hierarchy mode. Each of the elements summarizes the status of the whole entity.
Besides that, the individual elements show the group they belong too.

The usage of the KV storage is explained in the README file

Some pics:
image
image
image
image
image

FYI: @lee-martin

@arbulu89 arbulu89 force-pushed the feature/environments-view branch from 6a0a6c1 to a45bab5 Compare April 26, 2021 09:00
@stefanotorresi
Copy link
Member

I'm not quite sure about this. Shouldn't we go in steps? Why are we directly pointing them to environments, if we yet have to present them two smaller groupings?

@arbulu89
Copy link
Contributor Author

I'm not quite sure about this. Shouldn't we go in steps? Why are we directly pointing them to environments, if we yet have to present them two smaller groupings?

I don't understand your question. The user story I was working on says:

As a User, one can view the cluster (incl. its resources and check results) in the context of how it fits into the overall SAP systems, landscapes and environments, so that the user can see and drill down to his systems from an SAP perspective.

So this implementation gives the option to find all the environments, and all the landscapes that belong to them, all the SAP systems that belong to each specific landscape.

Once you click in environments, this shows all the environments. If you click in some of the listed environments, this will lead you to the landscape list of this environment, and when you click in a specific SAP system, the SAP systems belonging to this landscape.
So, essentially this is a tree view (but you need to move along the pages back and forth).

@stefanotorresi
Copy link
Member

Sorry, I realise wasn't very clear: shouldn't we have a sidebar navigation item for each level of the various groupings? We have Hosts, Clusters and Environments now, but we're skipping direct access to Systems and Landscapes; why is that?

@arbulu89
Copy link
Contributor Author

Sorry, I realise wasn't very clear: shouldn't we have a sidebar navigation item for each level of the various groupings? We have Hosts, Clusters and Environments now, but we're skipping direct access to Systems and Landscapes; why is that?

Yes... This is this way because right now we cannot move to a Landscape without specifying an environment. At the end, the task was to create a tree kind of hierarchy, and all landscape belong to an environment. So I cannot create a page of all the landscapes.

I could of course show all the landscapes and sap systems. But this would break the strict tree hierarchy, because we would show multiple landscapes/sap systems that are not filtered.

I see 2 potential solutions:

  1. I just show all the landscapes (and the same for SAP systems), and we still continue having the landscape must belong to a environment. This way, if I click in the landscapes sidebar option it would show all the landscapes, without filtering with the environment (but the relation would still exist)
  2. We completely remove this hard dependency. This requires major changes

Do we want to change this? @lee-martin @stefanotorresi
After Stefano's comment, I like the 1st option.

@stefanotorresi
Copy link
Member

Yes, option 1 is exactly what I was hinting at: showing only one level of the tree hierarchy doesn't break the hierarchy itself, it's just a different view.
Drilling down from the Environments will still be possible, but sometimes users could have only one environment, or one landscape, and having dedicated pages for each level would allow them to skip directly to the level they are most interested in.

This is also for consistency with the bottom layers, Hosts and Clusters, which can be browsed independently already.

Comment on lines +99 to +109
### Grouping and filtering the nodes in the wep app

The web app provides the option to filter the systems using the previously commented reserved tags. To achieve this, the tags must be stored in the KV storage.
The app provides the option to see the environment composed by the nodes and filter the systems using the previously commented reserved tags. To achieve this, the tags must be stored in the KV storage.
Use the next path:
- `trento/filters/sap-environments`
- `trento/filters/sap-landscapes`
- `trento/filters/sap-systems`
- `trento/environments/$yourenv/`
- `trento/environments/$yourenv/landscapes/$yourland/`
- `trento/environments/$yourenv/landscapes/$yourland/sapsystems/$yoursapsy`

Each of them must have a json list format. As example: `["land1", "land2"]`.
These entries will be available in the filters on the `/environments` page.
Keep in mind that the created environments, landscapes and sap systems are directories themselves, and there can be multiple of them.
The possibility to have multiple landscapes with the same name in different environments (and the same for SAP systems) is possible.
Be aware that the nodes meta-data tags are not strictly linked to these names, they are soft relations (this means that only the string matches, there is no any real relationship between them).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this whole section should in some internal documentation in docs/ not in the README imho. README is end-user information, this is more contribure/architecture/design documentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, this goes here to make things easy and allow the user to use the groupings, without setting these options manually the filters don't exist, so it is an end user option to create them or not. Eventually, when this is done by the console this will disappear from the README file.

I don't think it is that important right now where to put the information. I just wanted to show you guys how you can use them.

@dirkmueller
Copy link
Contributor

I'm feeling an inconsistency between "landscapes" and "sapsystems" - either all should have a sap prefix or none (I suggest to remove it everywhere).

Other than that I'm also confused about why environments are implemented the way they are, I suggest to go with Option 1, or just stop at landscapes for now and worry about environments later.

@arbulu89
Copy link
Contributor Author

I'm feeling an inconsistency between "landscapes" and "sapsystems" - either all should have a sap prefix or none (I suggest to remove it everywhere).

Ok, I can remove the sap prefix from them.

Other than that I'm also confused about why environments are implemented the way they are, I suggest to go with Option 1, or just stop at landscapes for now and worry about environments later.

Why are you confused? Could you elaborate more? I have implemented them this way because I found it the best, but If you have other proposals I'm open to discuss them

@stefanotorresi
Copy link
Member

I'm feeling an inconsistency between "landscapes" and "sapsystems" - either all should have a sap prefix or none (I suggest to remove it everywhere).

I agree that we need some consistency, but I would add the SAP prefix in all these three categories, so that we clarify that it's specific terminology (e.g. "Systems" might also have generic connotations)

@arbulu89
Copy link
Contributor Author

Disclaimer: I will do the needed renaming in a next PR. This is already big enough to change all the elements.

@stefanotorresi @dirkmueller @lee-martin New changes on baf0133

Now, we have 3 new sidebar elements: Environments, Landscapes and SAP Systems. Each of them work individually, but you can move along them going in Environment->Landscape->SAP system direction.

Besides that, I have implemented minimal detail pages for each of them. By now they don't have almost any information, but I find it needed to make a reasonable tree view

Here the pictures:
image
image
image

Detail pages (they filter the subsequente elements and show the name by now):
image
image
image

Copy link
Member

@stefanotorresi stefanotorresi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking very good from here!

@stefanotorresi
Copy link
Member

stefanotorresi commented Apr 29, 2021

does this have mitigations for #38 ? I only see some c.Error calls but I'm not clear whether we're handling 404s correctly or not.

(you can handle this in a follow-up PR, btw)

@arbulu89
Copy link
Contributor Author

does this have mitigations for #38 ? I only see some c.Error calls but I'm not clear whether we're handling 404s correctly or not.

(you can handle this in a follow-up PR, btw)

No, I didn't implement any error handling by now (neither for the hosts/clusters/envs, etc).
But yes, this is something we need to take care of

@stefanotorresi stefanotorresi merged commit 389ca17 into trento-project:main Apr 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants