Skip to content

[Auto refresh] Should auto refresh transform unit? #5571

Closed

Description

@katrin-freihofner

As a user, I would expect the refresh interval to stick to the unit I have set it. For example: if I set it to 62 seconds, I would expect when I reopen the popover, that it shows 62 seconds again.

eui

Activity

  1. thompsongl commented on Jan 27, 2022

    @thompsongl
    Contributor

    I think this is related to #4026, and that the underlying issue is the transformation process into and out of rounded formatting. Definitely worth some investigation.

  2. github-actions commented on Jul 27, 2022

    @github-actions

    👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

  3. added
    stale-issue
    on Jul 27, 2022
  4. removed
    stale-issue
    on Jul 27, 2022
  5. daveyholler commented on Dec 12, 2022

    @daveyholler
    Contributor

    @constancecchen You mentioned you may have an update here.

  6. cee-chen commented on Dec 12, 2022

    @cee-chen
    Contributor

    I swear I remember trying to solve this but I don't think I ever did, or that intention was too difficult to figure out. For what it's worth, the relevant code is here:

    function fromMilliseconds(milliseconds: Milliseconds): EuiRefreshIntervalState {
    const round = (value: number) => parseFloat(value.toFixed(2));
    if (milliseconds > MILLISECONDS_IN_HOUR) {
    return {
    units: 'h',
    value: round(milliseconds / MILLISECONDS_IN_HOUR),
    };
    }
    if (milliseconds > MILLISECONDS_IN_MINUTE) {
    return {
    units: 'm',
    value: round(milliseconds / MILLISECONDS_IN_MINUTE),
    };
    }
    return {
    units: 's',
    value: round(milliseconds / MILLISECONDS_IN_SECOND),
    };
    }

  7. daveyholler commented on Jan 9, 2023

    @daveyholler
    Contributor

    We're going to close this issue for the time being. In the mean time, feel free to provide guidelines and specifications on how you see this working in all instances.

  8. cee-chen commented on Feb 6, 2024

    @cee-chen
    Contributor

    Hey! Just to update on this, we've added the ability for consumers/Kibana devs to address this in their individual use-cases with a new refreshIntervalUnits prop. See #7501 for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions