File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change 9393 <section class =" box" >
9494 <h3 class =" box_title" >Summary for reporting</h3 >
9595 <xsl : for-each select =" resource[@type='result']" >
96- <pre >
96+ <pre id = " summary " >
9797<xsl : for-each select =" value[@type!='structure']" ><xsl : value-of select =" @member" />: <xsl : value-of select =" @value" /><xsl : text >
9898</xsl : text ></xsl : for-each >
9999<xsl : for-each select =" value[@member='uname' and @state='set']/value" >uname: <xsl : value-of select =" @member" />: <xsl : value-of select =" @value" /><xsl : text >
106106</xsl : text ></xsl : for-each >
107107 </pre >
108108 </xsl : for-each >
109+ <ul class =" boxnav" >
110+ <li ><a href =" javascript:copy();" >Copy to clipboard</a ></li >
111+ <li ><a href =" javascript:openTicket();" >Open ticket</a ></li >
112+ </ul >
109113 </section >
110114 </xsl : for-each >
115+ <script >
116+ function getText() {
117+ const node = document.getElementById("summary");
118+ return node.textContent;
119+ }
120+
121+ function copy() {
122+ const text = getText();
123+ alert("Copied to clipboard: " + text);
124+ navigator.clipboard.writeText(text);
125+ }
126+
127+ function openTicket() {
128+ const baseurl = "http://gitlab.xiph.org/xiph/icecast-server/-/issues/new?issue[description]=";
129+ const basetext = "# Problem\r\n< describe your problem here> \r\n\r\n# Version Summary\r\n";
130+ const text = getText();
131+
132+ window.location.href = baseurl + encodeURIComponent(basetext + "```\r\n" + text + "```");
133+ }
134+ </script >
111135 </xsl : template >
112136</xsl : stylesheet >
You can’t perform that action at this time.
0 commit comments