11$ ( document ) . ready ( ( ) => {
22 $ . ajax ( {
3- url : ' /core/version' ,
3+ url : " /core/version" ,
44 success : ( result ) => {
5- $ ( ' #versionTitle' ) . text ( "v" + result . version ) ;
6- $ ( ' #versionTitle' ) . show ( ) ;
5+ $ ( " #versionTitle" ) . text ( "v" + result . version ) ;
6+ $ ( " #versionTitle" ) . show ( ) ;
77 } ,
88 error : ( ) => {
9- $ ( ' #versionTitle' ) . hide ( ) ;
9+ $ ( " #versionTitle" ) . hide ( ) ;
1010 } ,
1111 } ) ;
1212 // Check auth is enabled on our host
1313 $ . ajax ( {
14- url : ' /oauth/health' ,
14+ url : " /oauth/health" ,
1515 success : ( ) => {
1616 // If enabled, then fetch our login status
1717 $ . ajax ( {
18- url : ' /core/user_profile' ,
19- dataType : ' json' ,
18+ url : " /core/user_profile" ,
19+ dataType : " json" ,
2020 success : ( result ) => {
2121 console . log ( result ) ;
2222 const user = result ;
2323 if ( result . username ) {
24- $ ( ' #usernameInfo' ) . text ( result . username ) ;
25- $ ( ' .loggedIn' ) . fadeIn ( ) ;
24+ $ ( " #usernameInfo" ) . text ( result . username ) ;
25+ $ ( " .loggedIn" ) . fadeIn ( ) ;
2626 } else {
27- $ ( ' .loggedOut' ) . fadeIn ( ) ;
27+ $ ( " .loggedOut" ) . fadeIn ( ) ;
2828 }
2929 } ,
3030 error : ( jqXHR , textStatus , errorThrown ) => {
31- $ ( ' .loggedOut' ) . fadeIn ( ) ;
31+ $ ( " .loggedOut" ) . fadeIn ( ) ;
3232 } ,
3333 } ) ;
3434 } ,
3535 error : ( ) => {
36- $ ( ' #authArea' ) . hide ( ) ;
36+ $ ( " #authArea" ) . hide ( ) ;
3737 } ,
3838 } ) ;
3939 $ . ajax ( {
40- url : ' /scheduler/health' ,
40+ url : " /scheduler/health" ,
4141 success : ( ) => {
4242 // Show the status at some point
4343 } ,
4444 error : ( ) => {
45- $ ( ' #schedulerButton' ) . hide ( ) ;
45+ $ ( " #schedulerButton" ) . hide ( ) ;
4646 } ,
4747 } ) ;
4848
49- const sb = $ ( ' .ui.left.sidebar' ) ;
49+ const sb = $ ( " .ui.left.sidebar" ) ;
5050 sb . sidebar ( {
51- transition : ' overlay' ,
51+ transition : " overlay" ,
5252 } ) ;
53- sb . sidebar ( ' attach events' , ' #runReport' ) ;
54- $ ( ' .ui .dropdown' ) . dropdown ( ) ;
53+ sb . sidebar ( " attach events" , " #runReport" ) ;
54+ $ ( " .ui .dropdown" ) . dropdown ( ) ;
5555
56- $ ( '.message .close' )
57- . on ( 'click' , function ( ) {
58- $ ( this )
59- . closest ( '.message' )
60- . hide ( ) ;
61- } ) ;
56+ $ ( ".message .close" ) . on ( "click" , function ( ) {
57+ $ ( this ) . closest ( ".message" ) . hide ( ) ;
58+ } ) ;
6259} ) ;
6360
6461function rerunReport ( jobId , rerunUrl ) {
6562 $ . ajax ( {
66- type : ' POST' ,
63+ type : " POST" ,
6764 url : rerunUrl ,
68- dataType : ' json' ,
65+ dataType : " json" ,
6966 success ( data , status , request ) {
7067 window . location . href = data . results_url ;
7168 } ,
7269 error ( xhr , textStatus , errorThrown ) {
73- $ ( ' #errorMsg' ) . text ( `${ xhr . status } ${ textStatus } ${ errorThrown } ` ) ;
74- $ ( ' #errorPopup' ) . show ( ) ;
70+ $ ( " #errorMsg" ) . text ( `${ xhr . status } ${ textStatus } ${ errorThrown } ` ) ;
71+ $ ( " #errorPopup" ) . show ( ) ;
7572 } ,
7673 } ) ;
7774}
@@ -81,32 +78,34 @@ function cloneReport(cloneUrl) {
8178}
8279
8380function viewStdout ( stdoutUrl ) {
84- stdoutContent = document . getElementById ( ' stdoutContent' )
81+ stdoutContent = document . getElementById ( " stdoutContent" ) ;
8582
8683 if ( ! stdoutContent . textContent ) {
8784 $ . ajax ( {
88- type : ' GET' ,
85+ type : " GET" ,
8986 url : stdoutUrl ,
90- dataType : ' json' ,
87+ dataType : " json" ,
9188 success ( data , status , request ) {
92- stdoutContent . textContent = data . join ( "" )
89+ stdoutContent . textContent = data . join ( "" ) ;
9390 } ,
9491 error ( xhr , textStatus , errorThrown ) {
95- $ ( ' #errorMsg' ) . text ( `${ xhr . status } ${ textStatus } ${ errorThrown } ` ) ;
96- $ ( ' #errorPopup' ) . show ( ) ;
92+ $ ( " #errorMsg" ) . text ( `${ xhr . status } ${ textStatus } ${ errorThrown } ` ) ;
93+ $ ( " #errorPopup" ) . show ( ) ;
9794 } ,
9895 } ) ;
9996 }
10097
101- $ ( '#stdoutModal' ) . modal ( {
102- onDeny ( ) {
103- return true ;
104- } ,
105- onApprove ( ) {
106- copy ( stdoutContent . textContent )
107- return false ;
108- } ,
109- } ) . modal ( 'show' ) ;
98+ $ ( "#stdoutModal" )
99+ . modal ( {
100+ onDeny ( ) {
101+ return true ;
102+ } ,
103+ onApprove ( ) {
104+ copy ( stdoutContent . textContent ) ;
105+ return false ;
106+ } ,
107+ } )
108+ . modal ( "show" ) ;
110109}
111110
112111function copy ( text ) {
@@ -118,18 +117,18 @@ function copy(text) {
118117 textArea . value = text ;
119118
120119 textArea . style . position = "absolute" ;
121- textArea . style . opacity = 0
120+ textArea . style . opacity = 0 ;
122121 document . body . appendChild ( textArea ) ;
123122 textArea . focus ( ) ;
124123 textArea . select ( ) ;
125124
126125 new Promise ( ( res , rej ) => {
127- document . execCommand ( ' copy' ) ? res ( ) : rej ( ) ;
126+ document . execCommand ( " copy" ) ? res ( ) : rej ( ) ;
128127 textArea . remove ( ) ;
129128 } ) ;
130129 }
131130}
132131
133132function viewFullscreen ( fullscreenUrl ) {
134133 window . location . href = fullscreenUrl ;
135- }
134+ }
0 commit comments