Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BZ#1516430-Ensure the correct ansible play elapsed time is displayed #1326

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ function ComponentController ($state, $stateParams, VmsService, lodash, EventNot
}

function elapsed (finish, start) {
return Math.abs(new Date(finish) - new Date(start)) / 100
return Math.abs(new Date(finish) - new Date(start)) / 1000
}

function availableTooltip (item) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,6 @@ function ComponentController (ModalService, ServicesState, lodash) {
}

function elapsed (finish, start) {
return Math.abs(new Date(finish) - new Date(start)) / 100
return Math.abs(new Date(finish) - new Date(start)) / 1000
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('Component: ServiceDetailsAnsibleComponent', function () {
it('should calculate elapsed time', () => {
ctrl.$onInit()
const elapsedTime = ctrl.elapsed(1497908279, 1497908159)
expect(elapsedTime).to.eq(1.2)
expect(elapsedTime).to.eq(0.12)
})
it('should allow onchanges to be called', (done) => {
const getServiceCredentialSpy = sinon.stub(ServicesState, 'getServiceCredential').returns(Promise.resolve(successResponse))
Expand Down