[JIRA] (JENKINS-60368) Server Sent Events doesn't work with CORS
Title: Message Title Stefan Schletterer updated an issue Jenkins / JENKINS-60368 Server Sent Events doesn't work with CORS Change By: Stefan Schletterer We use the CORS plugin to be able to access jenkins content from an HTML REST Client. To receive status updates on our dashboard we use the Jenkins SSE Gateway plugin with the _javascript_ client.The plugin doesn't use the CORS settings from the CORS plugin. So far we have forked the repo and [hard coded CORS in *src\main\java\org\jenkinsci\plugins\ssegateway\Endpoint.java*.|https://github.com/schletti2000/sse-gateway-plugin/blob/feature-cors/src/main/java/org/jenkinsci/plugins/ssegateway/Endpoint.java]A slightly better approach would be to get the information from the cors-plugin on initialize.But shouldn't the SSE request go through the CORS Filter anyway? Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from
[JIRA] (JENKINS-60368) Server Sent Events doesn't work with CORS
Title: Message Title Stefan Schletterer updated an issue Jenkins / JENKINS-60368 Server Sent Events doesn't work with CORS Change By: Stefan Schletterer We use the CORS plugin to be able to access jenkins content from an HTML REST Client. To receive status updates on our dashboard we use the Jenkins SSE Gateway plugin with the _javascript_ client. {{ The plugin doesn't use the CORS settings from the CORS plugin. So far [ we have forked the repo and [ hard coded cors CORS in *src\main\java\org\jenkinsci\plugins\ssegateway\Endpoint.java*. | [ https://github.com/schletti2000/sse-gateway-plugin/blob/feature-cors/src/main/java/org/jenkinsci/plugins/ssegateway/Endpoint.java] ] in *src\main\java\org\jenkinsci\plugins\ssegateway\Endpoint.java*: }} {{}}{{ A slightly better approach would be to get the information from the cors-plugin on initialize. }} But shouldn't the SSE request go through the CORS Filter anyway? Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- You received
[JIRA] (JENKINS-60368) Server Sent Events doesn't work with CORS
Title: Message Title Stefan Schletterer updated an issue Jenkins / JENKINS-60368 Server Sent Events doesn't work with CORS Change By: Stefan Schletterer We use the CORS plugin to be able to access jenkins content from an HTML REST Client. To receive status updates on our dashboard we use the Jenkins SSE Gateway plugin with the _javascript_ client.{{The plugin doesn't use the CORS settings from the CORS plugin. So far [ we have forked the repo and hard coded cors |[https://github.com/schletti2000/sse-gateway-plugin/blob/feature-cors/src/main/java/org/jenkinsci/plugins/ssegateway/Endpoint.java]] in *src\main\java\org\jenkinsci\plugins\ssegateway\Endpoint.java*: }}{{}}{{A slightly better approach would be to get the information from the cors-plugin on initialize.}}But shouldn't the SSE request go through the CORS Filter anyway? Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. T
[JIRA] (JENKINS-60368) Server Sent Events doesn't work with CORS
Title: Message Title Stefan Schletterer updated an issue Jenkins / JENKINS-60368 Server Sent Events doesn't work with CORS Change By: Stefan Schletterer We use the CORS plugin to be able to access jenkins content from an HTML REST Client. To receive status updates on our dashboard we use the Jenkins SSE Gateway plugin with the _javascript_ client.{{The plugin doesn't use the CORS settings from the CORS plugin. So far we have forked the repo and hard coded cors like this in *src\main\java\org\jenkinsci\plugins\ssegateway\Endpoint.java*: }} {{public void doFilter(...)}}{{...}} {{ String origin = httpServletRequest.getHeader("Origin"); }} {{ httpServletResponse.addHeader("Access-Control-Allow-Credentials", "true");}} {{httpServletResponse.setHeader("Access-Control-Allow-Origin", origin);}} {{httpServletResponse.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE, HEAD");}} {{httpServletResponse.setHeader("Access-Control-Allow-Headers", "X-PINGOTHER, LAST-EVENT-ID, Origin, X-Requested-With, Content-Type, Accept");}}{{...}}{{But much A slightly better approach would be to get the cors settings information from the cors- plugin , if it is installed and enabled: on initialize. }} cors=Jenkins.instance.pluginManager.plugins.find it.getShortName()== But shouldn ' cors-filter' t the SSE request go through the CORS Filter anyway? {{corsClass=AccessControlsFilter.class}}{{resp.addHeader("Access-Control-Allow-Methods", getDescriptor().getAllowedMethods());}}... Add Comment This me
[JIRA] (JENKINS-60368) Server Sent Events doesn't work with CORS
Title: Message Title Stefan Schletterer updated an issue Jenkins / JENKINS-60368 Server Sent Events doesn't work with CORS Change By: Stefan Schletterer We use the CORS plugin to be able to access jenkins content from an HTML REST Client. To receive status updates on our dashboard we use the Jenkins SSE Gateway plugin with the _javascript_ client.{{The plugin doesn't use the CORS settings from the CORS plugin. So far we have forked the repo and hard coded cors like this in *src\main\java\org\jenkinsci\plugins\ssegateway\Endpoint.java*: }}{{public void doFilter(...)}}{{...}}{{String origin = httpServletRequest.getHeader("Origin");}}{{httpServletResponse.addHeader("Access-Control-Allow-Credentials", "true");}}{{httpServletResponse.setHeader("Access-Control-Allow-Origin", origin);}}{{httpServletResponse.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE, HEAD");}}{{httpServletResponse.setHeader("Access-Control-Allow-Headers", "X-PINGOTHER, LAST-EVENT-ID, Origin, X-Requested-With, Content-Type, Accept");}}{{...}} {{But much better would be to get the cors settings from the plugin, if it is installed and enabled:}}cors=Jenkins.instance.pluginManager.plugins.find it.getShortName()=='cors-filter' {{corsClass=AccessControlsFilter.class}}{{resp.addHeader("Access-Control-Allow-Methods", getDescriptor().getAllowedMethods());}}... However, I dont know about the performance implications of querying the cors plugin on every request. Could you point me in the right direction so I can create a proper pull request? Add Comment
[JIRA] (JENKINS-60368) Server Sent Events doesn't work with CORS
Title: Message Title Stefan Schletterer updated an issue Jenkins / JENKINS-60368 Server Sent Events doesn't work with CORS Change By: Stefan Schletterer We use the CORS plugin to be able to access jenkins content from an HTML REST Client. To receive status updates on our dashboard we use the Jenkins SSE Gateway plugin with the _javascript_ client.{{The plugin doesn't use the CORS settings from the CORS plugin. So far we have forked the repo and hard coded cors like this in *src\main\java\org\jenkinsci\plugins\ssegateway\Endpoint.java*: }}{{ {{ public void doFilter(...)}}{{...}} }} {{ {{ String origin = httpServletRequest.getHeader("Origin");}} }} {{ {{ httpServletResponse.addHeader("Access-Control-Allow-Credentials", "true");}} }} {{ {{ httpServletResponse.setHeader("Access-Control-Allow-Origin", origin);}} }} {{ {{ httpServletResponse.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE, HEAD");}} }} {{ {{ httpServletResponse.setHeader("Access-Control-Allow-Headers", "X-PINGOTHER, LAST-EVENT-ID, Origin, X-Requested-With, Content-Type, Accept");}} }} {{...}} {{ }} {{But much better would be to get the cors settings from the plugin, if it is installed and enabled:}} {{ cors=Jenkins.instance.pluginManager.plugins.find { it.getShortName()=='cors-filter' }}}{{corsClass=AccessControlsFilter.class}}{{resp.addHeader("Access-Control-Allow-Methods", getDescriptor().getAllowedMethods());}}... However, I dont know about the performance implications of querying the cors plugin on every request. Could you point me in the right direction so I can create a proper pull request? Add Comment
[JIRA] (JENKINS-60368) Server Sent Events doesn't work with CORS
Title: Message Title Stefan Schletterer updated an issue Jenkins / JENKINS-60368 Server Sent Events doesn't work with CORS Change By: Stefan Schletterer We use the CORS plugin to be able to access jenkins content from an HTML REST Client. To receive status updates on our dashboard we use the Jenkins SSE Gateway plugin with the _javascript_ client. {{ The plugin doesn't use the CORS settings from the CORS plugin. So far we have forked the repo and hard coded cors like this in *src\main\java\org\jenkinsci\plugins\ssegateway\Endpoint.java*: }} {{ {{ public void doFilter(...)}}{{...}} }} {{ {{ String origin = httpServletRequest.getHeader("Origin");}} }} {{ {{ httpServletResponse.addHeader("Access-Control-Allow-Credentials", "true");}} }} {{ {{ httpServletResponse.setHeader("Access-Control-Allow-Origin", origin);}} }} {{ {{ httpServletResponse.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE, HEAD");}} }} {{ {{ httpServletResponse.setHeader("Access-Control-Allow-Headers", "X-PINGOTHER, LAST-EVENT-ID, Origin, X-Requested-With, Content-Type, Accept");}} }} {{ httpServletResponse . setHeader("Access-Control-Max-Age", "1728000"); .. }} {{ }} Better {{But much better would be to get the cors settings from the plugin , if it is installed and enabled : }} {{cors=Jenkins.instance.pluginManager.plugins.find \ {it.getShortName()=='cors-filter' }}}{{corsClass=AccessControlsFilter.class}}{{resp.addHeader("Access-Control-Allow-Methods", getDescriptor().getAllowedMethods());}} ... However, I dont know about the performance implications of querying the cors plugin on every request. Could you point me in the right direction so I can create a proper pull request? Add Comment
[JIRA] (JENKINS-60368) Server Sent Events doesn't work with CORS
Title: Message Title Stefan Schletterer created an issue Jenkins / JENKINS-60368 Server Sent Events doesn't work with CORS Issue Type: Improvement Assignee: Stefan Schletterer Components: sse-gateway-plugin Created: 2019-12-04 16:00 Environment: Jenkins: 2.190.2 jenkins-sse-gateway: 1.20 Priority: Minor Reporter: Stefan Schletterer We use the CORS plugin to be able to access jenkins content from an HTML REST Client. To receive status updates on our dashboard we use the Jenkins SSE Gateway plugin with the _javascript_ client. The plugin doesn't use the CORS settings from the CORS plugin. So far we have forked the repo and hard coded cors like this in src\main\java\org\jenkinsci\plugins\ssegateway\Endpoint.java: public void doFilter(...)... String origin = httpServletRequest.getHeader("Origin");httpServletResponse.addHeader("Access-Control-Allow-Credentials", "true");httpServletResponse.setHeader("Access-Control-Allow-Origin", origin);httpServletResponse.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE, HEAD");httpServletResponse.setHeader("Access-Control-Allow-Headers", "X-PINGOTHER, LAST-EVENT-ID, Origin, X-Requested-With, Content-Type, Accept");httpServletResponse.setHeader("Access-Control-Max-Age", "1728000"); Better would be to get the cors settings from the plugin: cors=Jenkins.instance.pluginManager.plugins.find {it.getShortName()=='cors-filter' } corsClass=AccessControlsFilter.classresp.addHeader("Access-Control-Allow-Methods", getDescriptor().getAllowedMethods()); However, I dont know about the performance implications of querying the cors plugin on every request.
[JIRA] (JENKINS-52477) XML Parsers should use report encoding given in XML file
Title: Message Title Stefan Schletterer edited a comment on JENKINS-52477 Re: XML Parsers should use report encoding given in XML file - I second that, especially for larger C/C++ projects it is difficult to specify an encoding since most newer .cpp / .h files are UTF-8 but older .c Files in the same project are ANSI encoded (We use cppCheck and ClangTidy). The current workaround is to convert all files to UTF-8 just before the analysis. - Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-52477) XML Parsers should use report encoding given in XML file
Title: Message Title Stefan Schletterer commented on JENKINS-52477 Re: XML Parsers should use report encoding given in XML file Ulli Hafner Oh sorry thats right, my issue was regarding the source file encoding. Also I only realized now that C++ files are typically ISO8859-1 encoded and with this settings the source files are parsed just fine. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55818) Extend REST API to enable navigation by modules, issue types, priority etc.
Title: Message Title Stefan Schletterer updated an issue Jenkins / JENKINS-55818 Extend REST API to enable navigation by modules, issue types, priority etc. Change By: Stefan Schletterer The web gui of the static analysis plugin allows me to navigate and sort the data by modules, issue types and filter by severity. However, the {{*io.jenkins.plugins.analysis.core.restapi.AnalysisResultApi* }} doesn't return the required information to navigate e.g. to a specific module. Currently the only navigation path is for {{ ./new,}} .{{/fixed}} and {{./all. }} However, when using the web gui, and navigating to a specific module, then a URL is generated for this module, and this can be used to get the data RESTful for the module (like {{*cppcheck/moduleName.192380630/ \ {{type.1844850586/}}api/json*). }} With the legacy plugin we are currently displaying Warnings by level, with hyperlinks to the Jenkins warnings web ui. I would also appreciate the tree query syntax, so that it would be possible to retrieve one dataset with all the information needed (So that the AnalysisResultApi serves as an entry point, from which a tree down to the issues could be retrieved) Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and sto
[JIRA] (JENKINS-55818) Extend REST API to enable navigation by modules, issue types, priority etc.
Title: Message Title Stefan Schletterer updated an issue Jenkins / JENKINS-55818 Extend REST API to enable navigation by modules, issue types, priority etc. Change By: Stefan Schletterer The web gui of the static analysis plugin allows me to navigate and sort the data by modules, issue types and filter by severity. However, the {{*io.jenkins.plugins.analysis.core.restapi.AnalysisResultApi* }}doesn't return the required information to navigate e.g. to a specific module. Currently the only navigation path is for {{./new,}} .{{/fixed}} and {{./all. }} However, when using the web gui, and navigating to a specific module, then a URL is generated for this module, and this can be used to get the data RESTful for the module (like {{*cppcheck/moduleName.192380630/ {{type.1844850586/}} api/json*). }} In our specific case With the legacy plugin we want to display say top 5 modules in a web dashboard are currently displaying Warnings by level , and allow the user with hyperlinks to jump to the Jenkins warnings -ng UI, eg web ui . {{job/cppCheck/14/cppcheck/moduleName.1853593734/type.1844850586/}} Perhaps I would also appreciate the tree query syntax enable sorting and paging like on , so that it would be possible to retrieve one dataset with all the web ui. information needed (So that the AnalysisResultApi serves as an entry point, from which a tree down to the issues could be retrieved) Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)
[JIRA] (JENKINS-55818) Extend REST API to enable navigation by modules, issue types, priority etc.
Title: Message Title Stefan Schletterer created an issue Jenkins / JENKINS-55818 Extend REST API to enable navigation by modules, issue types, priority etc. Issue Type: Improvement Assignee: Ulli Hafner Components: warnings-ng-plugin Created: 2019-01-28 18:03 Priority: Minor Reporter: Stefan Schletterer The web gui of the static analysis plugin allows me to navigate and sort the data by modules, issue types and filter by severity. However, the io.jenkins.plugins.analysis.core.restapi.AnalysisResultApi }}doesn't return the required information to navigate e.g. to a specific module. Currently the only navigation path is for {{./new, ./fixed and ./all. However, when using the web gui, and navigating to a specific module, then a URL is generated for this module, and this can be used to get the data RESTful for the module (like cppcheck/moduleName.192380630/api/json). In our specific case we want to display say top 5 modules in a web dashboard, and allow the user to jump to the Jenkins warnings-ng UI, eg. job/cppCheck/14/cppcheck/moduleName.1853593734/type.1844850586/ Perhaps the tree query syntax enable sorting and paging like on the web ui. Add Comment
[JIRA] (JENKINS-52477) XML Parsers should use encoding given in XML file
Title: Message Title Stefan Schletterer commented on JENKINS-52477 Re: XML Parsers should use encoding given in XML file I second that, especially for larger C/C++ projects it is difficult to specify an encoding since most newer .cpp / .h files are UTF-8 but older .c Files in the same project are ANSI encoded (We use cppCheck and ClangTidy). The current workaround is to convert all files to UTF-8 just before the analysis. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55730) Show absolute/relative path for source files
Title: Message Title Stefan Schletterer updated an issue Jenkins / JENKINS-55730 Show absolute/relative path for source files Change By: Stefan Schletterer In the The legacy version of the warnings plugin there was had an option to show absolute file path for the source files. This came with the additional option of sorting the issues by folder. The warnings-ng-plugin doesn't seem to offer the same option (use absolute paths and group by folder). Also, there is now way to show the absolute or module-relative paths of a source file, only the file name. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.