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