Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POC: btp manager ui with improvements to busola #893

Closed
wants to merge 70 commits into from

Conversation

dbadura
Copy link

@dbadura dbadura commented Oct 30, 2024

Description

Changes proposed in this pull request:

  • add btp-manager ui
  • adjust ui to display it in busola

Related issue(s)
kyma-project/busola#3122

szwedm and others added 30 commits August 22, 2024 07:47
* Add interface for cluster object provider

* Interface segregation

* Add context param to interfaces

* Add NamespaceProvider

* Add SecretProvider

* Add ServiceInstanceProvider

* tweaks - use pointers, name changes

* Include ServiceInstanceProvider in SecretProvider

* Get secrets from secret ref in SI

* Fix provider interface

* Fix constructor

* Add NamespaceProvider unit tests

* Fix ServiceInstanceProvider constructor

* Fix secret reference filter

* Add unit tests for service instance provider

* Fix secrets fetching

* Log warning when SecretProvider does not find btp operator secrets

* Add SecretProvider unit tests

* Apply suggestions from code review
* Run components in separate goroutines

* Separate components

* Pass pointers of parsed config values to setupManager

* Add if to print secrets name and namspace when SecretList is not empty

* Check SI CRD existance before fetching secrets

* Add logs for debug
* Add SM client

* Get secret for SM http client

* Build HTTP client for Service Manager

* Add method to fetch service offerings

* Add method to fetch service offerings

* Add Common struct with fields common to all SM objects

* Add ServiceOffering struct

* Add method to extract ServiceOffering metadata fields values

* Adjustments for running in main

* nil checks and log improvements

* Add method for setting client for given secret

* Fix not found error return

* Fix tests after adding ServiceInstance CRD existence check

* go mod tidy and goimports

* Handle k8s not found error when default secret does not exist
Add unit test for Service Manager client and ServiceOfferings endpoint
…ect#714)

Fix not responding api after remove gorilla mux by go http
…-project#717)

* Add ServicePlan struct

* wip

* Service Offering with plans request

* Add struct tags for plans in Service Offering details

* Add fake service plans

* Add unit test for service offering details and plans for given service offering ID

* Fix typos

* Refactor URL query for Service Plans
add service offerings support
* Serve frontend from go

* Build UI static files

* Change metrics server port

* Add API config fields in deployment

* Fix serving API on 8080 port

* Add makefile rule to build ui

* Change the order of makefile rules

* eslint

* eslint

* Fix dockerfile copy

* Add doc describing how to deploy BTP Manager with UI

* Fix docs

* Add cleanup info, prerequisites info and fix formatting

* Typos

* Apply suggestions from doc review

Co-authored-by: Iwona Langer <[email protected]>

* Rename ui.md to 09-10-ui.md

---------

Co-authored-by: Iwona Langer <[email protected]>
* sm ui service offerings and plans
* rm internal/ from gitignore

* Add Operation struct

* Add ServiceInstance struct

* ServiceInstances path const

* Change the field name in collections of SM objects to Items

* GET Service Instances

* GET Service Instance by ID

* Add SI, Error structs for SM responses

* POST Service Instance

* Refactor http response body reading

* DELETE Service Instance

* PATCH Service Instance

* GET Service Instance params

* Add fake SI JSONs for tests

* GET Service Instances test

* GET Service Instance by ID test

* POST Service Instance test

* Refactor SM client unit test to use typed structs instead of generic maps

* PATCH Service Instance test

* DELETE Service Instance by ID test
…kyma-project#735)

* wip

* wip

* wip

* Rebase and sort imports

* wip

* Fix fetching structs fields

* Fix ServiceBinding struct

* GET Service Instances in API

* CRUD Service Bindings

* GET Service Plan by ID in SM client

* GET Service Instance by ID in API

* Revert temp changes

---------

Co-authored-by: Marcin Szwed <[email protected]>
Co-authored-by: Ksawery Zietara <[email protected]>
…ct#746)

* Simple Instances Loading Based on Offerings

* Linter

* Testing Corrections

* Interfaces, Mocks, AttachRoutes Extraction

* ListInstances Test

* Add Missing Dependency

* Linter

* Code Duplication Removal

Removed code duplication pointed out in kyma-project#746 (comment).

* Corrected Want to Expected

Corrected want to expected as pointed out in kyma-project#746 (comment)

* Corrected Want to Expected

Corrected want to expected as pointed out in kyma-project#746 (comment)

* Missing Test

Added test suggested in kyma-project#746 (comment)

* Added Missing Interface Methods and Theirs Rename

* Removed Setting Client By Namespace and Name from the Path

* Linter & Compilation Corrections

* Duplicated Path

* Corrected Test Expectation

* Removed Unnecessary Mock Method

* Removed Unnecessary Import

* Code Review - Test Addition

Added a tests as requested in kyma-project#746 (comment)

* code Review - Added Const with testdata Path

Addressed kyma-project#746 (comment) discussion

* Code Review - Unnecessary IF

The remove if may result in false positives if someone invoked test with empty expected by accident and tested method returned expected as well - addresses kyma-project#746 (comment)
* Service Bindings API

* Extend Client interface
* Switching Between Test Data and API Call

* Extracted Test Data to Separate File
* Add CreateServiceInstance struct

* Refactor API calls for Service Instance with plan name

* POST Service Instance in API

* Remove unnecessary mocks and interfaces

* imports

* Add UpdateServiceInstance request struct

* PATCH Service Instance in API

* Delete Service Instance in API

* Add ClusterID field to CreateServiceInstanceRequest struct

* Comment API tests for refactor in next PR

* Reorganize packages and structs

* Add interface for cluster and namespace scoped provider

* Add before all setup in API tests

* GET Service Instances API test

* Add func to set appropriate dir for fake Service Manager data and remove redundant JSON files

* Extend assertions for GET Service Instances API test

* Add GET Service Instance by ID API test

* Add POST Service Instance API test

* Add DELETE Service Instance API test

* rm not used func from ui

* Add missing labels in create service instance test
…jects (kyma-project#769)

Rename fields and tags in API structs according to SM objects
* UI Unification

* UI Corrections

* API Fields Corrections
* UI Unification

* UI Corrections

* Initial Bindings List

* Correted Query Constrocution

* Temporarly Ignore Not Used Variables

* Temporarly Ignore Not Used Variables

* Added Missing Dependency

* Default Method for Listing Bindings without Filters

* Default Method for Listing Bindings without Filters

* Linter
…ct#772)

* Add interfaces for k8s obj create, delete

* Extend Provider and Deleter interfaces

* Rename providers methods

* mv labels from SI to common

* Add values extract from SB context

* Refactor converter to SB

* Add secrets operations related to SBs in API

* Separate interfaces

* Enhance SecretProvider to implement Manager interface

* Add GetAllByLabels method in NamespaceProvider

* Add GetAllByLabels method in ServiceInstanceProvider

* Add labels to logs

* Implement Manager interface in FakeSecretManager

* Fix expected namespaces number in assertion

* Fix SecretManager obj occurrences and provide more unit tests

* Fix references to SecretManager

* Add GET Service Bindings API test

* Add GET Service Binding by ID API test

* Add POST Service Binding API test

* Add DELETE Service Binding by ID API test

* Restore defaults in fake Service Manager after tests which change the data
* React Router

* Renamed Layout File

* Router Dependencies & Webcomponents Update
* Create Binding Form

* Missing Imports

* Status Message Component

* Test Data Update
…kyma-project#782)

* Create Instance Form - Labels and Parameters

* Busy Indicators
MarekMichali and others added 14 commits August 22, 2024 14:43
* Add hint to press Enter when adding labels to SI

* Bump image

* Add quotes

* Change hint

* Change hint
* PR Update

* Removed Unnecessary Error

* PR Update
* Add PUT Service Binding for secret restoring

* Add unit tests

* Restore timeouts values in API tests

* Change app image in docs
…-project#845)

* Passing `secret_name` and `secret_namespace` headers to UI

* Unnecessary Addition

* Update 09-10-ui.md

---------

Co-authored-by: Marek Michali <[email protected]>
* Remove states from api

* Redo tests

* Refactor tests

* Add path

* Adjust put

* Adjust frontend

* Fix name

* Fix bindings

* chore: Update BTP Manager image to europe-docker.pkg.dev/kyma-project/dev/btp-manager:PR-844

* Limit methods scope

* Revert error message

* Add error to service instance to not render them when changing secret

* Review remarks

* Revert back to id in path
…t#850)

* Flexible Column Layout for Offerings and Instances

* Updated PR Number

* Unnecessary DialogRef and OpenPortal

* Corrected Border Radius and Error Message Margin

Main object page was displaied with rounder bottom corners, which is not compliant with how Busola displays it. Additionally, error message was rendered just at the top of its component withouth any margins.

* Removed Unused Imports

* UnableToLoad Page Corrections

Copied the same mechanics from offerings view for displaying error message when secret data is not able to load hiding main view. Previously, the view for service instances was rendered without any data. Not it is hidden behind error banner.

Added additional error message to UnableToLoad banner to show more detailed message of what has gone wrong.

* Unused Import

* Unused Import

* Closing Panel on Selected Secret Change
* Added Service Instance Id

Added service instance id to instance details view, error message after successful instance removal and to instances table for reference.

* Added Service Instance Id to Error Message

* Introduce Separate UnableToLoad Error

New error for loading instances so that other error do not hide entire service instances view.

* Introduce Separate UnableToLoad Error

* Hide Details on Successful Instance Removal

* Update 09-10-ui.md
* Add button for secret restoration

* Display restore secret button only when secret's data is empty

* Handle Secret restore button press

* Share states of button and binding

* Display data from existing binding when restoring a secret

* Refresh Service Bindings list after restoring a secret

* Update image version in docs

* Fix Service Bindings list refresh after secret restore

* Apply suggestions from code review

* Change PR number in error msg in docs
…ect#856)

* Auto generate suffix for binding name

* Revert auto name suffix

* Suggest binding name

* Fix state when input blocked

* Bump

* Fix disabled input field when applying the restore

* Generate suffix when creating another binding

* Fix spacing
* Closing Message Strip

* Update 09-10-ui.md
@dbadura dbadura requested review from a team as code owners October 30, 2024 11:28
@kyma-bot kyma-bot added the area/documentation Issues or PRs related to documentation label Oct 30, 2024
@kyma-gopher-bot kyma-gopher-bot enabled auto-merge (squash) October 30, 2024 11:29
Copy link

Add one of following labels

- kind/feature -> Use it when you want to submit a new feature

- kind/enhancement -> Use it when you modify or improve an existing feature

- kind/bug -> Use it when you fix a bug

@kyma-bot kyma-bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Oct 30, 2024
auto-merge was automatically disabled October 30, 2024 11:34

Head branch was pushed to by a user without write access

@CLAassistant
Copy link

CLAassistant commented Oct 30, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
5 out of 6 committers have signed the CLA.

✅ szwedm
✅ ukff
✅ ralikio
✅ MarekMichali
✅ KsaweryZietara
❌ dbadura
You have signed the CLA already but the status is still pending? Let us recheck it.

@kyma-gopher-bot kyma-gopher-bot enabled auto-merge (squash) October 30, 2024 11:34
@dbadura dbadura mentioned this pull request Oct 31, 2024
4 tasks
@dbadura dbadura changed the title POC: ui improvements POC: btp manager ui with improvements to busola Oct 31, 2024
@dbadura
Copy link
Author

dbadura commented Nov 28, 2024

PoC is finished

@dbadura dbadura closed this Nov 28, 2024
auto-merge was automatically disabled November 28, 2024 17:11

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Issues or PRs related to documentation size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants