Skip to content

Conversation

wasabibob
Copy link

Merging Tile Updates from branch v2.9.x to v3.x. Resolving issue: #82

Tony Wilmer added 5 commits October 24, 2017 15:54
update to version 2.9.2
* initial changes to support number of days on tile

* initial updates to support number of days on tile

* changes to support number of days on tile

* changes to use Joda-Time library

* changes to support TimeDate

* DateTime call and numberOfDays tool tip

* updated comments
* Changed Tile, set query begin date off end date if provided.

* Update synthetic.xml

changed numberOfDays to a hidden property.

* Update synthetic.xml

changed to hidden=true

* Changed Tile, default max_days 90, numberOfDays 30

* Changed Tile, default max_days 90, numberOfDays 30

* Changed Tile, default max_days 90, numberOfDays 30

* Changed Tile, maxDays property must have catagory

* removed debug
Copy link
Contributor

@jdewinne jdewinne left a comment

Choose a reason for hiding this comment

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

Some minor changes I would make.

description="Date in format yyyy-MM-dd. If not provided, latest deployed applications are shown."/>
<property name="maxDays" default="90" category="input" kind="integer" hidden="true"/>
<property name="numberOfDays" category="input" required="false" default="30" kind="integer"
description="The number of days worth of (release version) data to reterive from XL Deploy."/>
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: "reterive" --> "retrieve"


def get_deployed_applications_for_environment(self, environment, date=None):
archived_tasks = self.query_archived_tasks(date)
def get_deployed_applications_for_environment(self, environment, begin_date, date=None):
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe rename last argument from date to end_date

@jdewinne jdewinne requested a review from hierynomus November 3, 2017 23:07

#check the range of values for numberOfDays,
if not 1 <= numberOfDays <= maxDays:
numberOfDays = maxDays
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we log something here? So that it's clear in the logs that the data was truncated?

if xld_client.check_ci_exist(environment):
if date:
data = xld_client.get_deployed_applications_for_environment(environment, date)
#if date provided, set a begin_date based on provided date - number of days
Copy link
Contributor

Choose a reason for hiding this comment

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

There's now quite some duplication between the two branches... Consider refactoring it.

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.

3 participants