fix: reset gitee dom id
This commit is contained in:
parent
c49b1b02b9
commit
4466147fd0
|
@ -605,11 +605,11 @@ public class GiteePushTrigger extends Trigger<Job<?, ?>> {
|
|||
byte[] random = new byte[16]; // 16x8=128bit worth of randomness, since we use md5 digest as the API token
|
||||
RANDOM.nextBytes(random);
|
||||
String secretToken = Util.toHexString(random);
|
||||
response.setHeader("script", "document.getElementById('secretToken').value='" + secretToken + "'");
|
||||
response.setHeader("script", "document.getElementById('giteeSecretToken').value='" + secretToken + "'");
|
||||
}
|
||||
|
||||
public void doClearSecretToken(@AncestorInPath final Job<?, ?> project, StaplerResponse response) {;
|
||||
response.setHeader("script", "document.getElementById('secretToken').value=''");
|
||||
response.setHeader("script", "document.getElementById('giteeSecretToken').value=''");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
</f:entry>
|
||||
<f:entry title="${%Secret.Token}" help="/plugin/gitee/help/help-secretToken.html">
|
||||
<table>
|
||||
<f:readOnlyTextbox field="secretToken" id="secretToken"/>
|
||||
<f:readOnlyTextbox field="secretToken" id="giteeSecretToken"/>
|
||||
<f:validateButton title="${%Generate}" method="generateSecretToken"/>
|
||||
<f:validateButton title="${%Clear}" method="clearSecretToken"/>
|
||||
</table>
|
||||
|
|
Loading…
Reference in New Issue