[splunk-devops] Extract inline script block and event handler in com/splunk/splunkjenkins/model/MetaDataConfigItem/config.jelly

XMLWordPrintable

    Problems

    == Inline Script Block
    Line: 36
    ----
    <script>
    function check_datasource_key(item) {
        var val = item.value
        var tableRow = item.parentNode.parentNode.nextSibling;
        var validateRow
        while (tableRow != null ) {
            var className=tableRow.getAttribute("class")
            if (className==null) {
                break;
            }
            tableRow = tableRow.nextSibling
        }
        if (val == "disabled") {
            tableRow.style.display = "none"
            tableRow.nextSibling.style.display = "none"
        } else {
            tableRow.style.display = ""
            tableRow.nextSibling.style.display = "";
        }
    }
    
    
            </script>
    ----
    
    == Inline Event Handler
    Line: 9
    ----
    <f:select onchange="check_datasource_key(this)"/>
    ----
    

    Solutions

    https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks
    https://www.jenkins.io/doc/developer/security/csp/#inline-event-handlers

          Assignee:
          Ted Xiao
          Reporter:
          Basil Crow
          Votes:
          0 Vote for this issue
          Watchers:
          2 Start watching this issue

            Created:
            Updated:
            Resolved: