@GET @Path( "/status/{id : .+}" ) @Produces( { MediaType.APPLICATION_JSON } ) public JobStatus getJobStatus( @PathParam( "id" ) String id ) { JobStatus status = new JobStatus(); // find job Job job = CarteResource.getJob( id ); CarteObjectEntry entry = CarteResource.getCarteObjectEntry( id ); status.setId( entry.getId() ); status.setName( entry.getName() ); status.setStatus( job.getStatus() ); return status; }
response.setCharacterEncoding( Const.XML_ENCODING ); SlaveServerJobStatus jobStatus = new SlaveServerJobStatus( jobName, id, job.getStatus() ); jobStatus.setFirstLoggingLineNr( startLineNr ); jobStatus.setLastLoggingLineNr( lastLineNr ); out.print( "<tr class=\"cellTableRow\" style=\"border: solid; border-width: 1px 0; border-bottom: none; font-size: 12; text-align:left\">" ); out.print( "<td style=\"padding: 8px 10px 10px 10px\" class=\"cellTableCell cellTableFirstColumn\">" + Const.NVL( Encode.forHtml( id ), "" ) + "</td>" ); out.print( "<td style=\"padding: 8px 10px 10px 10px\" class=\"cellTableCell\" id=\"statusColor\" style=\"font-weight: bold;\">" + job.getStatus() + "</td>" ); String dateStr = XMLHandler.date2string( job.getLogDate() ); out.print( "<td style=\"padding: 8px 10px 10px 10px\" class=\"cellTableCell cellTableLastColumn\">" + dateStr.substring( 0, dateStr.indexOf( ' ' ) ) + "</td>" );
String status = job.getStatus(); SlaveServerJobStatus jobStatus = new SlaveServerJobStatus( entry.getName(), entry.getId(), status ); jobStatus.setLogDate( job.getLogDate() ); String id = jobEntries.get( i ).getId(); Job job = getJobMap().getJob( jobEntries.get( i ) ); String status = job.getStatus(); String trClass = evenRow ? "cellTableEvenRow" : "cellTableOddRow"; // alternating row color String tdClass = evenRow ? "cellTableEvenRowCell" : "cellTableOddRowCell";
PowerMockito.when( mockJob.getLogChannelId() ).thenReturn( logId ); PowerMockito.when( mockJobMeta.getMaximum() ).thenReturn( new Point( 10, 10 ) ); when( mockJob.getStatus() ).thenReturn( "Finished" );