Uploaded image for project: 'Falcon'
  1. Falcon
  2. FALCON-469 Enhance REST API to drive interactive user dashboard
  3. FALCON-166

Instance status start and end dates are rigid and inconvenient

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.3
    • 0.6
    • webapp
    • None

    Description

      There are 2 annoying issues that was brought up by srimanth.gunturi while working on FALCON-164. The use case is to get the status for a given entity for the past 1 or 2 or 3 or 7 days.

      1. Instance status with out an end date fetches for a very small window
      Instance status take end date as optional but assumes one second from the start date which is too small a window.

          private Date getEndDate(Date start, String endStr) throws FalconException {
              Date end;
              if (StringUtils.isEmpty(endStr)) {
                  end = new Date(start.getTime() + 1000); // next sec
              } else {
                  end = EntityUtil.parseDateUTC(endStr);
              }
              return end;
          }
      

      May be assuming the current time might be appropriate instead.

      2. The start date has to be on or after the start of the entity.
      If the user has created the entity 2 days back but specified the start date for looking at the instances in the past 7 days, it should fetch what is valid rather than complain that the start date is before the entity's start.

      This is quite unwieldy to work with in a dashboard use case. I'm not sure what the performance impact is for this API to be changed.

      Thoughts?

      Attachments

        1. Falcon-Jira-166.patch
          20 kB
          Balu Vellanki
        2. Falcon-Jira-166-v1.patch
          19 kB
          Balu Vellanki
        3. Falcon-Jira-166-v2.patch
          20 kB
          Balu Vellanki
        4. Falcon-Jira-166-v3.patch
          21 kB
          Balu Vellanki
        5. Falcon-Jira-166-v4.patch
          62 kB
          Balu Vellanki

        Issue Links

          Activity

            People

              bvellanki Balu Vellanki
              svenkat Venkatesh Seetharam
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: