File tree Expand file tree Collapse file tree 4 files changed +20
-3
lines changed
resources/io/jenkins/plugins/pipelinegraphview/consoleview/PipelineConsoleViewAction Expand file tree Collapse file tree 4 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -47,4 +47,12 @@ export default [
4747 ] ,
4848 } ,
4949 } ,
50+ {
51+ languageOptions : {
52+ globals : {
53+ dialog : "readonly" ,
54+ notificationBar : "readonly" ,
55+ } ,
56+ } ,
57+ } ,
5058] ;
Original file line number Diff line number Diff line change 1313 <j : set var =" proxyId" value =" ${h.generateId()}" />
1414 <st : bind value =" ${it}" var =" cancelAction${proxyId}" />
1515 <button id =" pgv-cancel" data-confirm =" ${%Confirm(it.buildFullDisplayName)}"
16+ data-success-message =" ${%Build cancelled}"
1617 data-proxy-name =" cancelAction${proxyId}"
1718 class =" jenkins-button jenkins-!-error-color" >
1819 <l : icon src =" symbol-stop-circle-outline plugin-ionicons-api" />
Original file line number Diff line number Diff line change 1+ Build\ cancelled =Build cancelled
12Cancel =Cancel
23Confirm =Are you sure you want to abort {0}?
34Rebuild =Rebuild
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ if (rebuildButton) {
77 rebuildAction . doRebuild ( function ( success ) {
88 const result = success . responseJSON ;
99 if ( result ) {
10- window . hoverNotification ( rebuildButton . dataset . successMessage , rebuildButton ) ;
10+ notificationBar . show ( rebuildButton . dataset . successMessage , notificationBar . SUCCESS ) ;
1111 }
1212 } ) ;
1313 } )
@@ -21,11 +21,18 @@ if (cancelButton) {
2121 const question = cancelButton . getAttribute ( "data-confirm" ) ;
2222 const execute = function ( ) {
2323 const cancelAction = window [ `${ cancelButton . dataset . proxyName } ` ] ;
24- cancelAction . doCancel ( ) ;
24+ cancelAction . doCancel ( function ( response ) {
25+ const result = response . responseJSON ;
26+ if ( result . status === "ok" ) {
27+ notificationBar . show ( cancelButton . dataset . successMessage )
28+ } else {
29+ notificationBar . show ( result . message , notificationBar . WARNING )
30+ }
31+ } ) ;
32+
2533 } ;
2634
2735 if ( question != null ) {
28- /*eslint-disable no-undef*/
2936 dialog . confirm ( question ) . then ( ( ) => {
3037 execute ( ) ;
3138 return null ;
You can’t perform that action at this time.
0 commit comments