예제 #1
0
 public function testJobLog()
 {
     Yii::app()->user->userModel = User::getByUsername('super');
     $jobLog = new JobLog();
     $jobLog->type = 'Monitor';
     $jobLog->startDateTime = DateTimeUtil::convertTimestampToDbFormatDateTime(time());
     $jobLog->endDateTime = DateTimeUtil::convertTimestampToDbFormatDateTime(time());
     $jobLog->status = JobLog::STATUS_COMPLETE_WITHOUT_ERROR;
     //Should fail to save because isProcessed is not specified.
     $this->assertFalse($jobLog->save());
     $jobLog->isProcessed = false;
     $this->assertTrue($jobLog->save());
     $id = $jobLog->id;
     $jobLog = JobLog::getById($id);
     $jobLog->delete();
     $this->assertEquals(0, count(JobInProcess::getAll()));
 }
예제 #2
0
 public function actionJobLogDetails($id)
 {
     $jobLog = JobLog::getById(intval($id));
     $detailsView = new JobLogDetailsView($this->getId(), $this->getModule()->getId(), $jobLog, strval($jobLog));
     $view = new JobsManagerPageView(ZurmoDefaultAdminViewUtil::makeStandardViewForCurrentUser($this, $detailsView));
     echo $view->render();
 }