-
Notifications
You must be signed in to change notification settings - Fork 181
[JENKINS-62448] Enhance information displayed in approval page #300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
cbfedb6
b7a3312
4c583a4
349ac04
c559fe8
1d39eff
de369d6
e4708f7
380deda
79b1995
0ea0c93
e978559
eadf75f
9bcceb4
1c5493f
3ee25d8
d934b69
0b0b624
fa17df8
8f55c06
65926ce
9dc032c
18bcb49
fcb41b7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,19 +1,13 @@ | ||||||||||||||||||||||||||||||
| approvedScripts=Approved scripts | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # approved scripts | ||||||||||||||||||||||||||||||
| metadataGatheringDisabled=The metadata gathering was disabled. \ | ||||||||||||||||||||||||||||||
| metadataGatheringDisabled=Metadata gathering disabled. \ | ||||||||||||||||||||||||||||||
| <p>You can re-enable it permanently by removing the system property: <br />\ | ||||||||||||||||||||||||||||||
| <code>org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval.metadataGathering</code> </p>\ | ||||||||||||||||||||||||||||||
| <p>or temporarily (until restart) by running this in the Script Console: <br />\ | ||||||||||||||||||||||||||||||
| <code>org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval.METADATA_GATHERING = true</code></p> | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ## table headers | ||||||||||||||||||||||||||||||
| approvedHash=Hash | ||||||||||||||||||||||||||||||
| approvedHash_tooltip=The hash could be seen as a signature of the script. It's used as an identifier to reference the content of the script. | ||||||||||||||||||||||||||||||
| approvedExpandCode=Code | ||||||||||||||||||||||||||||||
| approvedLanguage=Language | ||||||||||||||||||||||||||||||
| approvedScriptLength=Length | ||||||||||||||||||||||||||||||
| approvedScriptLength_tooltip=Length of the script in characters | ||||||||||||||||||||||||||||||
| usageCount=# of uses | ||||||||||||||||||||||||||||||
| usageCount_tooltip=Uses since the introduction of metadata | ||||||||||||||||||||||||||||||
| lastTimeUsed=Date of last use | ||||||||||||||||||||||||||||||
|
|
@@ -25,7 +19,8 @@ lastKnownApproverLogin=Last approver | |||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| ## table content | ||||||||||||||||||||||||||||||
| noRequesterSinceMetadata=N/A | ||||||||||||||||||||||||||||||
| noRequesterSinceMetadata_tooltip=The requester was not recorded. It could be due to the request being created before the metadata introduction or the code calling this script did not provide user information. | ||||||||||||||||||||||||||||||
| noRequesterSinceMetadata_tooltip=The requester was not recorded. \ | ||||||||||||||||||||||||||||||
| It could be due to the request being created before the metadata introduction or the code calling this script did not provide user information. | ||||||||||||||||||||||||||||||
|
Wadeck marked this conversation as resolved.
Outdated
|
||||||||||||||||||||||||||||||
| noRequestApprovalTimeSinceMetadata=N/A | ||||||||||||||||||||||||||||||
| noRequestApprovalTimeSinceMetadata_tooltip=It was requested before the introduction of metadata. | ||||||||||||||||||||||||||||||
| noContextItemSinceMetadata=N/A | ||||||||||||||||||||||||||||||
|
|
@@ -50,7 +45,8 @@ noKnownApproverSinceMetadata=N/A | |||||||||||||||||||||||||||||
| noKnownApproverSinceMetadata_tooltip=It was not approved since the introduction of metadata. | ||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When are these shown? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fwiw while I suggest changing a
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When a script is approved before the metadata introduction, and then is used. We do not have the information on who approved it.
Comment on lines
+37
to
+43
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| revokeApproval=Revoke all selected | ||||||||||||||||||||||||||||||
|
Wadeck marked this conversation as resolved.
Outdated
|
||||||||||||||||||||||||||||||
| revokeApproval_tooltip=Revoking an approved script can have an impact on the jobs using it. The next time an attempt to execute the script is made, a new approval will be required. | ||||||||||||||||||||||||||||||
| revokeApproval_tooltip=Revoking an approved script can have an impact on the jobs using it. \ | ||||||||||||||||||||||||||||||
| The next time an attempt to execute the script is made, a new approval will be required. | ||||||||||||||||||||||||||||||
| revokeApproval_confirm=Really delete all selected approvals? Any existing scripts will need to be requeued and reapproved. | ||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I'm not a fan of
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In my mind we are listing in the table the different approvals, but saying it's the list of scripts, that are already approved, make actually more sense. I will keep aside the delete/revoke/remove as it seems we don't have a consensus yet.
Wadeck marked this conversation as resolved.
Outdated
|
||||||||||||||||||||||||||||||
| approvedNoSelectedItemError=Please select at least one line. | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,117 +1,106 @@ | ||
| <?jelly escape-by-default='true'?> | ||
| <j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form" xmlns:i="jelly:fmt"> | ||
| <div class="custom-pane-frame-padding"> | ||
| <div id="pending-approval"> | ||
| <j:set var="pendingScripts" value="${it.getPendingScriptsSorted()}" /> | ||
|
|
||
| <h2> | ||
| ${%pendingScripts} | ||
| </h2> | ||
| <div id="pending-approval"> | ||
| <j:choose> | ||
| <j:when test="${pendingScripts.isEmpty()}"> | ||
| <p class="no-pending-script-approvals"> | ||
| <i>${%noPendingScripts}</i> | ||
| </p> | ||
| </j:when> | ||
| <j:otherwise> | ||
| <table class="pane bigtable"> | ||
| <j:choose> | ||
| <j:when test="${pendingScripts.isEmpty()}"> | ||
| <p class="no-pending-script-approvals"> | ||
| <i>${%noPendingScripts}</i> | ||
| </p> | ||
| </j:when> | ||
| <j:otherwise> | ||
| <table class="pane bigtable"> | ||
| <tr> | ||
| <th width="1%"><!-- checkbox --></th> | ||
| <th>${%pendingExpandCode}</th> | ||
| <th>${%pendingLanguage}</th> | ||
| <th>${%contextUser}</th> | ||
| <th>${%contextItem}</th> | ||
| <th title="${%requestApprovalTime_tooltip}" class="info-cursor">${%requestApprovalTime}</th> | ||
| </tr> | ||
| <j:forEach var="ps" items="${pendingScripts}"> | ||
| <tr class="js-selectable-row"> | ||
| <td> | ||
| <input type="checkbox" value="" name="pending-hash" | ||
| data-hash="${ps.hash}" | ||
| id="check-pending-${ps.hash}" | ||
| class="js-checkbox-hash js-bypass-click" /> | ||
| </td> | ||
| <td> | ||
| <div class="toggle-parent" data-expand-target-id="js-${ps.hash}-row" data-expand-codemirror="true"> | ||
| <span class="js-toggle-show-icon js-bypass-click action-link" title="${%pendingExpand_tooltip}">${%pendingExpand}</span> | ||
| <span class="js-toggle-hide-icon js-bypass-click hidden-element action-link" title="${%pendingMinimize_tooltip}">${%pendingMinimize}</span> | ||
| </div> | ||
| </td> | ||
| <td>${ps.language.displayName}</td> | ||
| <td> | ||
| <j:set var="user" value="${ps.context.user}" /> | ||
| <j:choose> | ||
| <j:when test="${user != null}"> | ||
| <a href="${rootURL}/user/${user}" class="model-link">${user}</a> | ||
| </j:when> | ||
| <j:otherwise> | ||
| <span title="${%noRequesterSinceMetadata_tooltip}" class="info-cursor"> | ||
| ${%noRequesterSinceMetadata} | ||
| </span> | ||
| </j:otherwise> | ||
| </j:choose> | ||
| </td> | ||
| <td> | ||
| <j:set var="contextItem" value="${ps.context.item}" /> | ||
| <j:choose> | ||
| <j:when test="${contextItem != null}"> | ||
| <a href="${rootURL}/${contextItem.url}" class="model-link">${contextItem.fullDisplayName}</a> | ||
| </j:when> | ||
| <j:otherwise> | ||
| <span title="${%noContextItemSinceMetadata_tooltip}" class="info-cursor"> | ||
| ${%noContextItemSinceMetadata} | ||
| </span> | ||
| </j:otherwise> | ||
| </j:choose> | ||
| </td> | ||
| <td> | ||
| <j:set var="approvalRequestTime" value="${ps.approvalRequestTimeDate}" /> | ||
| <j:choose> | ||
| <j:when test="${approvalRequestTime != null}"> | ||
| <i:formatDate value="${approvalRequestTime}" type="both" dateStyle="medium" timeStyle="medium"/> | ||
| </j:when> | ||
| <j:otherwise> | ||
| <span title="${%noRequestApprovalTimeSinceMetadata_tooltip}" class="info-cursor"> | ||
| ${%noRequestApprovalTimeSinceMetadata} | ||
| </span> | ||
| </j:otherwise> | ||
| </j:choose> | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <th width="1%"><!-- checkbox --></th> | ||
| <th tooltip="${%pendingHash_tooltip}" class="info-cursor">${%pendingHash}</th> | ||
| <th>${%pendingExpandCode}</th> | ||
| <th>${%pendingLanguage}</th> | ||
| <th title="${%pendingScriptLength_tooltip}" class="info-cursor">${%pendingScriptLength}</th> | ||
| <th>${%contextUser}</th> | ||
| <th>${%contextItem}</th> | ||
| <th title="${%requestApprovalTime_tooltip}" class="info-cursor">${%requestApprovalTime}</th> | ||
| <td colspan="6" id="js-${ps.hash}-row" class="js-async-hidden-element"> | ||
| <f:textarea readonly="readonly" codemirror-mode="${ps.language.codeMirrorMode}" codemirror-config='"readOnly": true' rows="10" cols="80" value="${ps.script}"/> | ||
| </td> | ||
| </tr> | ||
| <j:forEach var="ps" items="${pendingScripts}"> | ||
| <tr class="js-selectable-row"> | ||
| <td> | ||
| <input type="checkbox" value="" name="pending-hash" | ||
| data-hash="${ps.hash}" | ||
| id="check-pending-${ps.hash}" | ||
| class="js-checkbox-hash js-bypass-click" /> | ||
| </td> | ||
| <td class="hash"> | ||
| <label for="check-pending-${ps.hash}" title="${ps.hash}" class="js-bypass-click">${ps.hash.substring(0, 8)}</label> | ||
| </td> | ||
| <td> | ||
| <div class="toggle-parent" data-expand-target-id="js-${ps.hash}-row" data-expand-codemirror="true"> | ||
| <span class="js-toggle-show-icon js-bypass-click action-link" title="${%pendingExpand_tooltip}">${%pendingExpand}</span> | ||
| <span class="js-toggle-hide-icon js-bypass-click hidden-element action-link" title="${%pendingMinimize_tooltip}">${%pendingMinimize}</span> | ||
| </div> | ||
| </td> | ||
| <td>${ps.language.displayName}</td> | ||
| <td>${ps.script.size()}</td> | ||
| <td> | ||
| <j:set var="user" value="${ps.context.user}" /> | ||
| <j:choose> | ||
| <j:when test="${user != null}"> | ||
| <a href="${rootURL}/user/${user}" class="model-link">${user}</a> | ||
| </j:when> | ||
| <j:otherwise> | ||
| <span title="${%noRequesterSinceMetadata_tooltip}" class="info-cursor"> | ||
| ${%noRequesterSinceMetadata} | ||
| </span> | ||
| </j:otherwise> | ||
| </j:choose> | ||
| </td> | ||
| <td> | ||
| <j:set var="contextItem" value="${ps.context.item}" /> | ||
| <j:choose> | ||
| <j:when test="${contextItem != null}"> | ||
| <a href="${rootURL}/${contextItem.url}" class="model-link">${contextItem.fullDisplayName}</a> | ||
| </j:when> | ||
| <j:otherwise> | ||
| <span title="${%noContextItemSinceMetadata_tooltip}" class="info-cursor"> | ||
| ${%noContextItemSinceMetadata} | ||
| </span> | ||
| </j:otherwise> | ||
| </j:choose> | ||
| </td> | ||
| <td> | ||
| <j:set var="approvalRequestTime" value="${ps.approvalRequestTimeDate}" /> | ||
| <j:choose> | ||
| <j:when test="${approvalRequestTime != null}"> | ||
| <i:formatDate value="${approvalRequestTime}" type="both" dateStyle="medium" timeStyle="medium"/> | ||
| </j:when> | ||
| <j:otherwise> | ||
| <span title="${%noRequestApprovalTimeSinceMetadata_tooltip}" class="info-cursor"> | ||
| ${%noRequestApprovalTimeSinceMetadata} | ||
| </span> | ||
| </j:otherwise> | ||
| </j:choose> | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <td colspan="8" id="js-${ps.hash}-row" class="js-async-hidden-element"> | ||
| <f:textarea readonly="readonly" codemirror-mode="${ps.language.codeMirrorMode}" codemirror-config='"readOnly": true' rows="10" cols="80" value="${ps.script}"/> | ||
| </td> | ||
| </tr> | ||
| </j:forEach> | ||
| </table> | ||
|
|
||
| <p class="js-error-no-selected hidden-element error"> | ||
| ${%pendingNoSelectedItemError} | ||
| </p> | ||
|
|
||
| <div class="action-panel"> | ||
| <span class="yui-button"> | ||
| <button class="js-button-pending-approve-all" title="${%approvePending_tooltip}" | ||
| data-container-id="pending-approval" | ||
| data-action-confirm-message="${%approvePending_confirm}" | ||
| data-action-url="${rootURL}/scriptApproval/approvePendingScripts">${%approvePending}</button> | ||
| </span> | ||
| <span class="yui-button"> | ||
| <button class="js-button-pending-deny-all" title="${%denyPending_confirm}" | ||
| data-container-id="pending-approval" | ||
| data-action-confirm-message="${%denyPending_confirm}" | ||
| data-action-url="${rootURL}/scriptApproval/approvePendingScripts">${%denyPending}</button> | ||
| </span> | ||
| </div> | ||
| </j:otherwise> | ||
| </j:choose> | ||
| </div> | ||
| </j:forEach> | ||
| </table> | ||
|
|
||
| <p class="js-error-no-selected hidden-element error"> | ||
| ${%pendingNoSelectedItemError} | ||
| </p> | ||
|
|
||
| <div class="action-panel"> | ||
| <span class="yui-button"> | ||
| <button class="js-button-pending-approve-all" title="${%approvePending_tooltip}" | ||
| data-container-id="pending-approval" | ||
| data-action-confirm-message="${%approvePending_confirm}" | ||
| data-action-url="${rootURL}/scriptApproval/approvePendingScripts">${%approvePending}</button> | ||
| </span> | ||
| <span class="yui-button"> | ||
| <button class="js-button-pending-deny-all" title="${%denyPending_confirm}" | ||
| data-container-id="pending-approval" | ||
| data-action-confirm-message="${%denyPending_confirm}" | ||
| data-action-url="${rootURL}/scriptApproval/approvePendingScripts">${%denyPending}</button> | ||
| </span> | ||
| </div> | ||
| </j:otherwise> | ||
| </j:choose> | ||
| </div> | ||
| </j:jelly> |
Uh oh!
There was an error while loading. Please reload this page.