Fixing show history when executing test
parent
b61dc2155d
commit
379b21b407
|
@ -94,6 +94,7 @@ WebhookDirective = ($rs, $repo, $confirm, $loading) ->
|
|||
log.prettySentHeaders = JSON.stringify(log.request_headers, undefined, 2)
|
||||
log.prettyDate = moment(log.created).format("DD MMM YYYY [at] hh:mm:ss")
|
||||
|
||||
webhook.logs_counter = webhooklogs.length
|
||||
webhook.logs = webhooklogs
|
||||
updateShowHideHistoryText()
|
||||
|
||||
|
@ -113,6 +114,9 @@ WebhookDirective = ($rs, $repo, $confirm, $loading) ->
|
|||
$el.find(".visualization-mode").addClass("hidden")
|
||||
$el.find(".edition-mode").removeClass("hidden")
|
||||
|
||||
openHistory = () ->
|
||||
$el.find(".webhooks-history").addClass("open")
|
||||
|
||||
cancel = () ->
|
||||
showVisualizationMode()
|
||||
$scope.$apply ->
|
||||
|
@ -132,10 +136,9 @@ WebhookDirective = ($rs, $repo, $confirm, $loading) ->
|
|||
form.setErrors(data)
|
||||
|
||||
$el.on "click", ".test-webhook", () ->
|
||||
openHistory()
|
||||
$rs.webhooks.test(webhook.id).then =>
|
||||
updateLogs()
|
||||
$el.find(".webhooks-history").addClass("open")
|
||||
updateShowHideHistoryText()
|
||||
|
||||
$el.on "click", ".edit-webhook", () ->
|
||||
showEditMode()
|
||||
|
|
|
@ -44,7 +44,7 @@ block content
|
|||
span(ng-bind="webhook.name")
|
||||
div.webhook-url
|
||||
span(ng-bind="webhook.url")
|
||||
a.show-history.toggle-history(href="", title="Toggle history", ng-show="webhook.logs_counter ") (Show history)
|
||||
a.show-history.toggle-history(href="", title="Toggle history", ng-show="webhook.logs_counter") (Show history)
|
||||
|
||||
div.webhook-options
|
||||
div.webhook-options-wrapper
|
||||
|
|
Loading…
Reference in New Issue