GOCDB / gocdb

Grid Operations Configuration Management Database. A Repository, Portal and REST style API for managing Grid and Cloud topology objects including; projects, administrative domains, sites, services, service-endpoints, service-groups, downtimes, users, roles and business rules.
Apache License 2.0
12 stars 27 forks source link

[GT-183] Add service types page for non-admins #461

Closed Sae126V closed 1 year ago

Sae126V commented 1 year ago

"Resolves #126 "

Note: Sometimes GIT interface will not show the EOL. If the file is NOT having EOL GIT may shows no_newline_at_end explicitly.

Sae126V commented 1 year ago

Ready for the review of Functionality. @gregcorbett

gregcorbett commented 1 year ago

Looks mostly good - a couple of things I spotted were:

Sae126V commented 1 year ago

Looks mostly good - a couple of things I spotted were:

  • Page_Type=Service_Types doesn't display for non-registered users, so there will be an bug somewhere.
  • Move "ServiceTypes" to the browse section for admins, and position it between "Scopes" and "Role Action Map" for both admins and non admins.
  • Under GOCDB Admins, have an "Add Service Type" link leading to Page_Type=Admin_Add_Service_Type, and position it after "Add Project"

I have added a single page intentionally to avoid showing the same content in both, Greg. But with your suggestion the problem is not valid anymore. Updated the code to achieve the desired functionality.

Sae126V commented 1 year ago

Ready to be viewed for functionality.

gregcorbett commented 1 year ago
  • Page_Type=Service_Types doesn't display for non-registered users, so there will be an bug somewhere.

ah the same thing happens with Page_Type=Service_Type, there's probably a similar bug.

Move "ServiceTypes" to the browse section for admins, and position it between "Scopes" and "Role Action Map" for both admins and non admins.

Ah sorry, I meant between "Services" and "Scopes".

Sae126V commented 1 year ago
  • Page_Type=Service_Types doesn't display for non-registered users, so there will be an bug somewhere.

ah the same thing happens with Page_Type=Service_Type, there's probably a similar bug.

Move "ServiceTypes" to the browse section for admins, and position it between "Scopes" and "Role Action Map" for both admins and non admins.

Ah sorry, I meant between "Services" and "Scopes".

Cool. Updated the flow, Greg. It should now work as expected.

gregcorbett commented 1 year ago

A previous version I looked at had the "Add Service Type" functionality on Page_Type=Service_Types for admins, please add this back in.

Sae126V commented 1 year ago

A previous version I looked at had the "Add Service Type" functionality on Page_Type=Service_Types for admins, please add this back in.

The functionality got changed from previous version, Greg.

I have added the below one. Under GOCDB Admins, have an "Add Service Type" link leading to Page_Type=Admin_Add_Service_Type, and position it after "Add Project"

Since, we are providing an admin option to directly goto the Admin_Add_Service_Type page Just like Add Projects, Add NGI. I have implemented the same for Add service Type.

And "Add Service Type" functionality on Page_Type=Service_Types is no longer needed for normal users or admin. Since admin has the page separately for adding service types. As it only admin rights. They can add service type from admin section. Does that make sense?

gregcorbett commented 1 year ago

A previous version I looked at had the "Add Service Type" functionality on Page_Type=Service_Types for admins, please add this back in.

The functionality got changed from previous version, Greg.

I have added the below one. Under GOCDB Admins, have an "Add Service Type" link leading to Page_Type=Admin_Add_Service_Type, and position it after "Add Project"

Since, we are providing an admin option to directly goto the Admin_Add_Service_Type page Just like Add Projects, Add NGI. I have implemented the same for Add service Type.

Fair enough, that does give conistency with the Site, NGI etc pages.

Functionality looks good to me 😄

gregcorbett commented 1 year ago

Looks good to me, cna you squash the 4 commits into the first one please?

Sae126V commented 1 year ago

I squashed into one @gregcorbett . Their is styles PR for this one so can we park it for a while so that I can raise a styles PR ?

gregcorbett commented 1 year ago

Let's get this merged as it's ready :)

gregcorbett commented 1 year ago

rebasing on latest dev