コード例 #1
0
ファイル: ErrorLogController.php プロジェクト: withlovee/HAII
 /**
  * Initial data for error_log filter
  * string    $status     status of problem ("all", "marked", "unmarked")
  * @param $data_type
  * @return array
  */
 protected function dataForForm($status, $data_type)
 {
     $params = Input::all();
     $data = $this->getSelectedValues($params);
     $data['basins'] = TeleStation::basins(true);
     $data['parts'] = TeleStation::parts(true);
     $data['provinces'] = TeleStation::provinces(true);
     $data['codes'] = TeleStation::codes(true);
     $data['marked'] = '';
     $data['unmarked'] = '';
     $data['start_date'] = '';
     $data['start_time'] = '';
     $data['all'] = '';
     $data['water'] = '';
     $data['rain'] = '';
     $data[$status] = 'active';
     $data[$data_type] = 'active';
     $data['data_type'] = $data_type;
     $data['url_status'] = $status;
     if ($status == 'marked') {
         $data['status'] = 'true';
     } elseif ($status == 'all') {
         $data['status'] = 'all';
     } else {
         $data['status'] = 'false';
     }
     return $data;
 }
コード例 #2
0
ファイル: BatchController.php プロジェクト: withlovee/HAII
 /**
  * Get batch task status and add task page
  * @return mixed
  */
 public function index()
 {
     $title = 'Batch Processor';
     $stations = TeleStation::codes();
     $batches = Batch::orderBy('id', 'desc')->get();
     return View::make('batch/index', compact('stations', 'title', 'batches'));
 }
コード例 #3
0
 /**
  * Get station codes by province
  * @return mixed
  */
 public function stationCodeByProvince()
 {
     $province = Input::get('province');
     $stationCode = array();
     if (is_array($province)) {
         foreach ($province as $p) {
             $stationCode = array_merge($stationCode, TeleStation::stationCodeByProvince($p));
         }
     } else {
         $stationCode = array_merge($stationCode, TeleStation::stationCodeByProvince($province));
     }
     return Response::json($stationCode);
 }