mirror of https://github.com/gogs/gogs.git
webhook: highlight delivery response on click
This decreases page load time for webhook edit page.pull/3853/merge
parent
ec05c64ead
commit
452551fa23
|
@ -20,11 +20,11 @@
|
||||||
"outputPathIsOutsideProject": 0,
|
"outputPathIsOutsideProject": 0,
|
||||||
"outputPathIsSetByUser": 0
|
"outputPathIsSetByUser": 0
|
||||||
},
|
},
|
||||||
"\/css\/semantic-2.2.7.min.css": {
|
"\/css\/semantic-2.2.9.min.css": {
|
||||||
"fileType": 16,
|
"fileType": 16,
|
||||||
"ignore": 1,
|
"ignore": 1,
|
||||||
"ignoreWasSetByUser": 1,
|
"ignoreWasSetByUser": 1,
|
||||||
"inputAbbreviatedPath": "\/css\/semantic-2.2.7.min.css",
|
"inputAbbreviatedPath": "\/css\/semantic-2.2.9.min.css",
|
||||||
"outputAbbreviatedPath": "No Output Path",
|
"outputAbbreviatedPath": "No Output Path",
|
||||||
"outputPathIsOutsideProject": 0,
|
"outputPathIsOutsideProject": 0,
|
||||||
"outputPathIsSetByUser": 0
|
"outputPathIsSetByUser": 0
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
"fileType": 32768,
|
"fileType": 32768,
|
||||||
"ignore": 0,
|
"ignore": 0,
|
||||||
"ignoreWasSetByUser": 0,
|
"ignoreWasSetByUser": 0,
|
||||||
"initialSize": 4048,
|
"initialSize": 514087,
|
||||||
"inputAbbreviatedPath": "\/img\/avatar_default.png",
|
"inputAbbreviatedPath": "\/img\/avatar_default.png",
|
||||||
"outputAbbreviatedPath": "\/img\/avatar_default.png",
|
"outputAbbreviatedPath": "\/img\/avatar_default.png",
|
||||||
"outputPathIsOutsideProject": 0,
|
"outputPathIsOutsideProject": 0,
|
||||||
|
@ -161,12 +161,12 @@
|
||||||
"outputStyle": 1,
|
"outputStyle": 1,
|
||||||
"syntaxCheckerStyle": 1
|
"syntaxCheckerStyle": 1
|
||||||
},
|
},
|
||||||
"\/js\/semantic-2.2.7.min.js": {
|
"\/js\/semantic-2.2.9.min.js": {
|
||||||
"fileType": 64,
|
"fileType": 64,
|
||||||
"ignore": 1,
|
"ignore": 1,
|
||||||
"ignoreWasSetByUser": 1,
|
"ignoreWasSetByUser": 1,
|
||||||
"inputAbbreviatedPath": "\/js\/semantic-2.2.7.min.js",
|
"inputAbbreviatedPath": "\/js\/semantic-2.2.9.min.js",
|
||||||
"outputAbbreviatedPath": "\/js\/min\/semantic-2.2.7.min-min.js",
|
"outputAbbreviatedPath": "\/js\/min\/semantic-2.2.9.min-min.js",
|
||||||
"outputPathIsOutsideProject": 0,
|
"outputPathIsOutsideProject": 0,
|
||||||
"outputPathIsSetByUser": 0,
|
"outputPathIsSetByUser": 0,
|
||||||
"outputStyle": 1,
|
"outputStyle": 1,
|
||||||
|
|
|
@ -930,6 +930,15 @@ function initWebhook() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Highlight payload on first click
|
||||||
|
$('.hook.history.list .toggle.button').click(function () {
|
||||||
|
$($(this).data('target') + ' .nohighlight').each(function () {
|
||||||
|
var $this = $(this);
|
||||||
|
$this.removeClass('nohighlight');
|
||||||
|
setTimeout(function(){ hljs.highlightBlock($this[0]) }, 500);
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
// Test delivery
|
// Test delivery
|
||||||
$('#test-delivery').click(function () {
|
$('#test-delivery').click(function () {
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
<pre class="raw">{{ range $key, $val := .ResponseInfo.Headers }}<strong>{{$key}}:</strong> {{$val}}
|
<pre class="raw">{{ range $key, $val := .ResponseInfo.Headers }}<strong>{{$key}}:</strong> {{$val}}
|
||||||
{{end}}</pre>
|
{{end}}</pre>
|
||||||
<h5>{{$.i18n.Tr "repo.settings.webhook.body"}}</h5>
|
<h5>{{$.i18n.Tr "repo.settings.webhook.body"}}</h5>
|
||||||
<pre class="raw"><code>{{.ResponseInfo.Body}}</code></pre>
|
<pre class="raw"><code class="nohighlight">{{.ResponseInfo.Body}}</code></pre>
|
||||||
{{else}}
|
{{else}}
|
||||||
N/A
|
N/A
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
Loading…
Reference in New Issue