6767 <td >
6868 <span >
6969 <props:textProperty name =" ${ constants. filesKey } " className =" longField" ></props:textProperty >
70+ <span class =" smallNote" >Files relative to the working directory to zip and upload to Code Dx. Separate multiple files with a comma (,)</span >
71+ </span >
72+ <span >
73+ <span class =" error" id =" ${ constants. sourceAndBinariesWarningKey } " >Warning: No source and binaries specified</span >
7074 </span >
71- <span class =" smallNote" >Files relative to the working directory to zip and upload to Code Dx. Separate multiple files with a comma (,)</span >
7275 </td >
7376 </tr >
7477 <tr class =" advancedSetting" >
9194 <props:textProperty name =" ${ constants. toolOutputFilesKey } " className =" longField" ></props:textProperty >
9295 <span class =" smallNote" >File paths can be absolute or relative to the working directory. Separate multiple files with a comma (,)</span >
9396 </span >
97+ <span >
98+ <span class =" error" id =" ${ constants. toolOutputsWarningKey } " >Warning: No tool output files specified</span >
99+ </span >
94100 </td >
95101 </tr >
96102 <tr >
252258 });
253259 }
254260
261+ function displayFileWarning ($textBox , $warningLabel ) {
262+ var textValue = BS .Util .trimSpaces ($textBox .val ());
263+ if (textValue) {
264+ $warningLabel .hide ();
265+ } else {
266+ $warningLabel .show ();
267+ }
268+ }
269+
255270 $j (function () {
256271 var isWaitForResults = $ (' codedx.waitForResults' ).checked ;
257272 var $url = $j (BS .Util .escapeId (' ${ constants. codeDxUrlKey } ' ));
258273 var $apiToken = $j (BS .Util .escapeId (' ${ constants. codeDxAPITokenKey } ' ));
259274 var $fingerprint = $j (BS .Util .escapeId (' ${ constants. sha1FingerprintKey } ' ));
260275 var $reload = $ (' reload' );
276+ var $sourceAndBinaries = $j (BS .Util .escapeId (' ${ constants. filesKey } ' ));
277+ var $toolOutputs = $j (BS .Util .escapeId (' ${ constants. toolOutputFilesKey } ' ));
278+ var $sourceAndBinariesWarning = $j (BS .Util .escapeId (' ${ constants. sourceAndBinariesWarningKey } ' ));
279+ var $toolOutputsWarning = $j (BS .Util .escapeId (' ${ constants. toolOutputsWarningKey } ' ));
261280
262281 $ (' ${ constants. reportArchiveNameKey } ' ).disabled = ! isWaitForResults;
263282 $ (' ${ constants. codeDxSeverityKey } ' ).disabled = ! isWaitForResults;
272291 $apiToken .on (' input' , function () { getCodeDxProjects (false ) });
273292 $fingerprint .on (' input' , function () { getCodeDxProjects (false ) });
274293 $reload .on (' click' , function () { getCodeDxProjects (false ) });
294+ $sourceAndBinaries .on (' input' , function () { displayFileWarning ($sourceAndBinaries, $sourceAndBinariesWarning) });
295+ $toolOutputs .on (' input' , function () { displayFileWarning ($toolOutputs, $toolOutputsWarning) });
296+
297+ setTimeout (function () {
298+ $sourceAndBinaries .trigger (' input' );
299+ $toolOutputs .trigger (' input' );
300+ }, 1000 );
275301 });
276302 </script >
277303</l:settingsGroup >
0 commit comments