Skip to content

Conversation

pd-redis
Copy link
Collaborator

@pd-redis pd-redis commented May 5, 2025

Add data to: CONFIG_DATABASES_OPEN_DATABASE

Data fields added:

  • redis_version
  • uptime_in_days
  • used_memory
  • connected_clients
  • maxmemory_policy
  • instantaneous_ops_per_sec
  • instantaneous_input_kbps:
  • instantaneous_output_kbps
  • totalKeys
  • numberOfKeysRange

@pd-redis pd-redis changed the base branch from main to release/2.70.0 May 22, 2025 14:19
$isActive={isActive}
$isDisabled={isDisabled}
$color={color}
onClick={onClick}
Copy link
Collaborator

Choose a reason for hiding this comment

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

why this is deleted?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

because if it is left, it registers twice

Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't the itemContent have onclick only in the if statement? What else is triggering the same onclick?

Copy link
Collaborator

Choose a reason for hiding this comment

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

From what I saw, there are 2 inner components based on the props:

  • if disabled = true and there is an onClick handler, it renders a button
  • else - renders a span

Probably this is the reason that there were 2 invocations on the handler. The tricky part is the if (isDisabled || onClick) { condition, but if it's disabled, we probably don't want to invoke the handler, so we're safe. I'd guard it with a test, tho.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If there is on click handler provided, the button that handles it is rendered, if no onClick is provided, nothing needs to handle it

Copy link
Collaborator

@ArtemHoruzhenko ArtemHoruzhenko left a comment

Choose a reason for hiding this comment

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

I can see changes on server side but there is no aprropriate tests modified/added
Approve to not block but please address this after merging please

description: 'Various Redis stats',
type: Object,
})
stats?: any;
Copy link
Collaborator

Choose a reason for hiding this comment

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

why any? does it make sense to have proper class for it and mapping will be done by class-transformer?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Because server is using the same!?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

stats is not used for anything else besides sending it for 1 telemetry event, and server is, so if we're to type it explicitly, we should type server explicitly as well

Copy link
Contributor

Choose a reason for hiding this comment

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

we have 400+ anys in our code base. It might be worthwile to type them all at some point

pawelangelow
pawelangelow previously approved these changes May 23, 2025
@pd-redis pd-redis dismissed stale reviews from pawelangelow and ArtemHoruzhenko via 17298ba May 23, 2025 08:54
@KIvanow KIvanow merged commit 75e59ac into release/2.70.0 May 23, 2025
13 checks passed
@KIvanow KIvanow deleted the fe/feature/RI-7106-additiona-data-in-CONFIG_DATABASES_OPEN_DATABASE branch May 23, 2025 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants