Giter Club home page Giter Club logo

activemq-artemis-self-provisioning-plugin's People

Contributors

ajayjagan avatar ajaypratap003 avatar gaohoward avatar howardgao avatar lavocatt avatar msarawan avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

activemq-artemis-self-provisioning-plugin's Issues

Storybook build fails

While trying to do yarn build-storybook or yarn storybook it fails with the following error

ERR! Module not found: Error: Can't resolve '@console/dynamic-plugin-sdk/src/perspective/useActivePerspective' in '/Users/ajay/Work/KIE/activemq-artemis-self-provisioning-plugin/node_modules/@openshift-console/dynamic-plugin-sdk/lib/api'
63% building 14/14 entries 3311/3393 dependencies 732/848 modulesinfo => Manager built (9.16 s)
ERR! ModuleNotFoundError: Module not found: Error: Can't resolve '@console/dynamic-plugin-sdk/src/perspective/useActivePerspective' in '/Users/ajay/Work/KIE/activemq-artemis-self-provisioning-plugin/node_modules/@openshift-console/dynamic-plugin-sdk/lib/api'
ERR!     at /Users/ajay/Work/KIE/activemq-artemis-self-provisioning-plugin/node_modules/webpack/lib/Compilation.js:2016:28
ERR!     at /Users/ajay/Work/KIE/activemq-artemis-self-provisioning-plugin/node_modules/webpack/lib/NormalModuleFactory.js:798:13
ERR!     at eval (eval at create (/Users/ajay/Work/KIE/activemq-artemis-self-provisioning-plugin/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:10:1)
ERR!     at /Users/ajay/Work/KIE/activemq-artemis-self-provisioning-plugin/node_modules/webpack/lib/NormalModuleFactory.js:270:22
ERR!     at eval (eval at create (/Users/ajay/Work/KIE/activemq-artemis-self-provisioning-plugin/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
ERR!     at /Users/ajay/Work/KIE/activemq-artemis-self-provisioning-plugin/node_modules/webpack/lib/NormalModuleFactory.js:434:22
ERR!     at /Users/ajay/Work/KIE/activemq-artemis-self-provisioning-plugin/node_modules/webpack/lib/NormalModuleFactory.js:116:11
ERR!     at /Users/ajay/Work/KIE/activemq-artemis-self-provisioning-plugin/node_modules/webpack/lib/NormalModuleFactory.js:670:25
ERR!     at /Users/ajay/Work/KIE/activemq-artemis-self-provisioning-plugin/node_modules/webpack/lib/NormalModuleFactory.js:855:8
ERR!     at /Users/ajay/Work/KIE/activemq-artemis-self-provisioning-plugin/node_modules/webpack/lib/NormalModuleFactory.js:975:5
ERR!     at /Users/ajay/Work/KIE/activemq-artemis-self-provisioning-plugin/node_modules/neo-async/async.js:6883:13
ERR!     at /Users/ajay/Work/KIE/activemq-artemis-self-provisioning-plugin/node_modules/webpack/lib/NormalModuleFactory.js:958:45```

Improve Codebase Quality by Addressing Linting and CSS Errors

Running yarn lint on the entire project produces various errors and warning messages related to ESLint and CSS. Addressing these issues is crucial for enhancing the code quality and ensuring a smoother development process.

[msarawan@fedora activemq-artemis-self-provisioning-plugin]$ yarn lint
yarn run v1.22.19
$ eslint ./src --fix && stylelint "src/**/*.css" --allow-empty-input --fix

/home/msarawan/activemq-artemis-self-provisioning/activemq-artemis-self-provisioning-plugin/src/brokers/add-broker/components/AddBrokerForm/YamlEditorView.tsx
  13:29  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/msarawan/activemq-artemis-self-provisioning/activemq-artemis-self-provisioning-plugin/src/brokers/broker-details/BrokerDetails.container.tsx
  77:6  warning  React Hook useEffect has a missing dependency: 'k8sGetBroker'. Either include it or remove the dependency array  react-hooks/exhaustive-deps

/home/msarawan/activemq-artemis-self-provisioning/activemq-artemis-self-provisioning-plugin/src/brokers/broker-pods/PodsList.container.tsx
  51:6  warning  React Hook useEffect has a missing dependency: 'k8sGetBroker'. Either include it or remove the dependency array  react-hooks/exhaustive-deps

/home/msarawan/activemq-artemis-self-provisioning/activemq-artemis-self-provisioning-plugin/src/brokers/broker-pods/components/PodList.tsx
  18:14  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  75:14  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/msarawan/activemq-artemis-self-provisioning/activemq-artemis-self-provisioning-plugin/src/brokers/broker-pods/components/PodRow.tsx

✖ 29 problems (0 errors, 29 warnings)


src/stories/button.css
 12:10  ✖  Unexpected named color "white"  color-named             
 13:21  ✖  Unexpected hex color "#1ea7fd"  color-no-hex            
 17:10  ✖  Unexpected hex color "#333"     color-no-hex            
 19:15  ✖  Unexpected function "rgb"       function-disallowed-list

src/stories/header.css
  3:28  ✖  Unexpected function "rgb"                   function-disallowed-list
 10:1   ✖  Expected "svg" to have no more than 0 type  selector-max-type       
           selectors                                                           
 15:1   ✖  Expected "h1" to have no more than 0 type   selector-max-type       
           selectors                                                           
 24:1   ✖  Expected "button + button" to have no more  selector-max-type       
           than 0 type selectors                                               
 29:10  ✖  Unexpected hex color "#333"                 color-no-hex            

src/stories/page.css
  1:1   ✖  Expected "section" to have no more than 0 type     selector-max-type
           selectors                                                           
  8:10  ✖  Unexpected hex color "#333"                        color-no-hex     
 11:1   ✖  Expected "section h2" to have no more than 0 type  selector-max-type
           selectors                                                           
 20:1   ✖  Expected "section p" to have no more than 0 type   selector-max-type
           selectors                                                           
 24:1   ✖  Expected "section a" to have no more than 0 type   selector-max-type
           selectors                                                           
 26:10  ✖  Unexpected hex color "#1ea7fd"                     color-no-hex     
 29:1   ✖  Expected "section ul" to have no more than 0 type  selector-max-type
           selectors                                                           
 34:1   ✖  Expected "section li" to have no more than 0 type  selector-max-type
           selectors                                                           
 38:1   ✖  Expected "section .tip" to have no more than 0     selector-max-type
           type selectors                                                      
 44:15  ✖  Unexpected hex color "#e7fdd8"                     color-no-hex     
 45:10  ✖  Unexpected hex color "#66bf3c"                     color-no-hex     
 51:1   ✖  Expected "section .tip-wrapper" to have no more    selector-max-type
           than 0 type selectors                                               
 58:1   ✖  Expected "section .tip-wrapper svg" to have no     selector-max-type
           more than 0 type selectors                                          
 67:1   ✖  Expected "section .tip-wrapper svg path" to have   selector-max-type
           no more than 0 type selectors                                       
 68:9   ✖  Unexpected hex color "#1ea7fd"                     color-no-hex

24 problems (24 errors, 0 warnings)

error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Build pre-confirm dialog/modal for delete broker instance

Acceptance criteria:

  • Pre-confirm dialog/modal should open when user click on delete option on kebab option
  • User should able to see cancel and confirm button
  • Dialog/modal close on click close button or press keyboard esc button
  • Broker instance should delete on click confirm button and close dialog/modal

Below screenshot is for reference:
image

Title: Delete instance ?
Body: The 'instance name' instance will be deleted. Applications will no longer have access in this instance.
Buttons: Delete and Cancel

dev: enable hot reloading for `yarn start`

When developing it's possible to ask to yarn to enter a mode where it will recompile the bundle on the fly and make the web browser refresh whenever the contributor saves the files on their computer.

It's more of a quality of life improvement.

Unit tests for view brokers

Acceptance criteria:
Write unit test for below components and cover all the edge cases.

  • BrokersList.tsx
  • BrokerRow.tsx
  • PreConfirmDeleteModal.tsx
  • BrokersList.container.tsx

Unit tests for Add broker

Acceptance criteria:
Write unit test for below components and cover all the edge cases.

  • FormView.tsx
  • YamlEditorView.tsx
  • AddBroker.component.tsx
  • AddBroker.container.tsx

Imporve api response schema

Currently the api definitions for most apis uses BrokerRespons as the response type.
It is too general. It should use a more specific type schema for each api.

App folder restructuring

Move some folder out side of broker folder at src and use them as a modules.

  • Metrics
  • Clients
  • Queues
  • Topics
  • Configuration

Make sure everything should work as expected after this structural change.

Improve the requests made to the `api-server`

The requests made to the api server are hand written. Hand writting queries isn't necesserarily an issue, but often we tend to have to mix in several aspects together. Data fetching, error handling, state updating and data caching. The main drawback of having to write the logic of the queries manually is that this logic is error prone and hard to test.

There's a React library specialized in queries that we could use in our frontend: https://redux-toolkit.js.org

This library will help us to:

  • automate the code for sending requests to the api-server.
  • handle the errors more easily
  • getting mocks of the api-server to be able to run the future unit tests in isolation

I will work on a proposal PR for this so you can have a look at what it brings to the table;

Update dockerfile

  • Add remote source
  • Make sure container image should run on specific port 8001

[Clients page]: Integrate API for clients data

Acceptance criteria:

  • Integrate API for clients data
  • Data should be display on clients page successfully
  • Implement error handling
  • Loader/Spinner should be display while fetching data from backend api

Replace docker buildx with buildah for bulding multi-arch container images

Acceptance criteria

  • Replace docker buildx with buildah for CI and release workflow
  • Make sure don't login quay.io on PR as we don't need to push images
  • Make sure on PR only AMD64 image should be build and don't push
  • Build and push AMD64 and ARM64 images on main branch on push event.
  • Test open PR on your fork branch before merging PR to make sure build and push images workflows are working fine

Fix Table alignment issue

The table alignment for clients, queues and topics page is crashing after changing the value from dropdown.

Screenshot from 2023-09-22 14-38-27

Unit tests for broker details

Acceptance criteria:
Write unit test for below components and cover all the edge cases.

  • BrokerDetails.container.tsx

[Queues page]: Integrate API for queues data

Acceptance criteria:

  • Integrate API for queues data
  • Data should be display on queues page successfully
  • Implement error handling
  • Loader/Spinner should be display while fetching data from backend api

[Topics page]: Integrate API for topics data

Acceptance criteria:

  • Integrate API for topics data
  • Data should be display on topics page successfully
  • Implement error handling
  • Loader/Spinner should be display while fetching data from backend api

Create generic/shared component for Metrics

  • Build new generic component QueryBrowser for Metrics
    Move existing component ChartMemoryUsage.tsx code in new component QueryBrowser and full fill all the requirement to cover all kind of charts data. Move out the logic from generic component which is not common and pass as a props so that it will work for all kind of charts.

  • Build new card component CardQueryBrowser
    Move existing component CardBrokerMemoryUsageMetrics.tsx code in new component CardQueryBrowser and full fill all the requirement to cover all kind of charts data

  • Fix skeleton issue on change span value from dropdown
    Skeleton should be display while fetching data from server.

  • Fix unresponsive page issue on span select from dropdown.
    Check state and function and make sure not re-rendering infinite times. Add useCallback on function to avoid re-rendering.

Implementing Broker Creation form

Currently we provide a form view and 'yaml view` when creating a broker via the plugin.

The From view need to be implemented to help user

  • doing configuration via a visual page rather than editing raw yamls
  • focus on broker configuration components like acceptors without worrying use deprecated CR fields
  • assist user on SSL/TLS setup

Leaving yaml editing for advanced users (like use resourceTemplate to path the resources)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.