?> "><?php echo (int) $stats['complete']; ?> </span> (<?php echo round($stats['complete_pct'], 2); ?> %) </td> </tr> <tr> <th>Failed Jobs</th> <td><span class="label <?php echo JobStatus::getStatusHTMLClass('failure'); ?> "><?php echo (int) $stats['failure']; ?> </span> (<?php echo round($stats['failure_pct'], 2); ?> %) </td> </tr> <!-- > <tr> <th>Total Jobs</th> <td><span class="label label-inverse"><?php
/** * @param Bot $bot * @param Job $job * @return array */ private function _getBotData($bot, $job) { $botData = array(); $botData['id'] = $bot->id; $botData['name'] = $bot->getName(); $botData['status'] = $bot->getStatus(); $botData['status_class'] = BotStatus::getStatusHTMLClass($bot); $botData['url'] = $bot->getUrl(); $botData['last_seen'] = BotLastSeen::getHTML($bot); $webcam = $bot->getWebCamImage(); if ($webcam->isHydrated()) { $botData['webcam_url'] = $webcam->getDownloadURL(); } else { $botData['webcam_url'] = "/img/colorbars.gif"; } $buttons = $this->_getStatusButtons($bot); $menu = array(); $status = $bot->getStatus(); if ($status == BotState::Working) { $menu[] = $buttons['pause']; $menu[] = $buttons['dropjob']; $menu[] = $buttons['edit']; $menu[] = $buttons['delete']; } else { if ($status == BotState::Paused) { $menu[] = $buttons['play']; $menu[] = $buttons['dropjob']; $menu[] = $buttons['edit']; $menu[] = $buttons['delete']; } else { if ($status == BotState::Slicing) { $menu[] = $buttons['dropjob']; $menu[] = $buttons['edit']; $menu[] = $buttons['delete']; } else { if ($status == BotState::Waiting) { $menu[] = $buttons['qa']; $menu[] = $buttons['edit']; $menu[] = $buttons['delete']; } else { if ($status == BotState::Idle) { $menu[] = $buttons['offline']; $menu[] = $buttons['edit']; $menu[] = $buttons['error']; $menu[] = $buttons['delete']; } else { if ($status == BotState::Offline) { $menu[] = $buttons['online']; $menu[] = $buttons['edit']; $menu[] = $buttons['error']; $menu[] = $buttons['delete']; $menu[] = $buttons['retire']; } else { if ($status == BotState::Maintenance) { $menu[] = $buttons['online']; $menu[] = $buttons['offline']; $menu[] = $buttons['edit']; $menu[] = $buttons['delete']; } else { if ($status == BotState::Error) { $menu[] = $buttons['online']; $menu[] = $buttons['offline']; $menu[] = $buttons['edit']; $menu[] = $buttons['delete']; } else { if ($status == BotState::Retired) { $menu[] = $buttons['delete']; } } } } } } } } } $botData['menu'] = $menu; if ($job->isHydrated()) { $jobData = array(); $jobData['id'] = $job->id; $jobData['name'] = $job->getName(); $jobData['url'] = $job->getUrl(); $jobData['status'] = $job->get('status'); $jobData['status_class'] = JobStatus::getStatusHTMLClass($job->get('status')); $jobData['elapsed'] = $job->getElapsedText(); $jobData['estimated'] = $job->getEstimatedText(); if ($job->get('status') == 'taken' || $job->get('status') == 'slicing') { $jobData['progress'] = round($job->get('progress'), 2); $jobData['bar_class'] = ""; } $temps = JSON::decode($bot->get('temperature_data')); if ($bot->get('status') == BotState::Working && $temps !== NULL) { if (isset($temps->extruder)) { $botData['temp_extruder'] = $temps->extruder; } if (isset($temps->bed)) { $botData['temp_bed'] = $temps->bed; } } if ($job->get('status') == 'qa') { $jobData['qa_url'] = $job->getUrl() . "/qa"; } $sliceJob = $job->getSliceJob(); if ($job->get('status') == 'slicing' && $sliceJob->get('status') == 'pending') { $jobData['qa_url'] = $sliceJob->getUrl(); $jobData['bar_class'] = "bar-warning"; // Set it to 100% so it actually displays $jobData['progress'] = 100.0; } $botData['job'] = $jobData; } if ($bot->get('status') == 'error') { $botData['error_text'] = $bot->get('error_text'); return $botData; } return $botData; }
} else { ?> <img class="webcam" src="/img/colorbars.gif"> <?php } ?> </a> <?php if ($j->isHydrated()) { ?> <div class="bot_info_container"> <div class="bot_info"> <div class="bot_info_title"> <?php echo JobStatus::getStatusHTML($j); ?> <?php echo $j->getLink(); ?> <?php if ($j->get('status') == 'taken') { ?> <span class="muted pull-right"> <?php if ($size == 6) { ?> <?php $temps = JSON::decode($b->get('temperature_data')); ?> <?php
/** * @param $job Job * @return string */ public static function getStatusHTML($job) { return "<span class=\"label " . JobStatus::getStatusHTMLClass($job->get('status')) . "\">" . $job->get('status') . "</span>"; }
$job_statu_id = array(); $job_statu_ns = Job2Status::find_by_job_id($job_id); foreach ($job_statu_ns as $job_statuss) { $job_statu_id[] = $job_statuss->fk_job_status_id; } $smarty->assign('status_selected', $job_statu_id); ######################################################## $job_types = JobType::find_all(); if (is_array($job_types) and !empty($job_types)) { $job_t = array(); foreach ($job_types as $job_type) { $job_t[$job_type->id] = $job_type->type_name; } $smarty->assign('job_type', $job_t); } $job_status = JobStatus::find_all(); if (is_array($job_status) and !empty($job_status)) { $statu_t = array(); foreach ($job_status as $job_statu) { $statu_t[$job_statu->id] = $job_statu->status_name; } $smarty->assign('job_status', $statu_t); } //list of jobs $_SESSION['add_job']['job_ref'] = $job->job_ref; //$job->var_name = $job->mod_write_check ( $_POST['txt_job_title'] ); $_SESSION['add_job']['job_title'] = $job_title = $job->job_title; $_SESSION['add_job']['job_desc'] = $job->job_description; $_SESSION['add_job']['job_postion'] = $job->job_postion; $_SESSION['add_job']['salary'] = $job->job_salary; $salaryfreq = get_lang('select', 'salaryfreq');
//what are you looking for $ljt = $cv_details->look_job_title; $smarty->assign('ljt', $ljt); $ljt2 = $cv_details->look_job_title2; $smarty->assign('ljt2', $ljt2); $sql = " SELECT * FROM " . TBL_CV_CAT . " WHERE cv_id=" . $id; $cv_cat = $db->query($sql); $cv_cat_array = array(); while ($row = $db->fetch_object($cv_cat)) { $categories = Category::find_by_id($row->category_id); $cv_cat_array[] = $categories->cat_name; } $smarty->assign('li', join("<br />", $cv_cat_array)); //job states $js = empty($cv_details->look_job_status) ? 0 : $cv_details->look_job_status; $job_status = JobStatus::find_by_id($js); $ljs = $job_status ? $job_status->status_name : format_lang('none'); $smarty->assign('ljs', $ljs); //job type $job_t = empty($cv_details->look_job_type) ? 0 : $cv_details->look_job_type; $job_type_arr = JobType::find_by_id($job_t); //print_r( $job_type_arr); $job_types = $job_type_arr ? $job_type_arr->type_name : format_lang('none'); $smarty->assign('job_type', $job_types); //where do you wont to work //country $country_arry = Country::find_by_code($cv_details->country); $country_var_name = $country_arry->var_name; $country_name = $country_arry->name; $smarty->assign('country', $country_name); //states
$sql = $select . $from . $where . $group_by . $order . $limit; //echo $sql; $result = $db->query($sql); $num_rows = $db->num_rows($result); if ($num_rows > 0) { $manage_list = array(); $i = 1; while ($rows = $db->fetch_object($result)) { $employee = Employee::find_by_id($rows->fk_employee_id); $manage_list[$i]['id'] = $rows->id; $manage_list[$i]['employee_name'] = $employee->full_name(); $manage_list[$i]['employee_id'] = $rows->fk_employee_id; $manage_list[$i]['cv_title'] = $rows->cv_title; $manage_list[$i]['look_job_title'] = $rows->look_job_title; $manage_list[$i]['look_job_title2'] = $rows->look_job_title2; $status = JobStatus::find_by_id($rows->look_job_status); $status_name = $status->status_name; $manage_list[$i]['look_job_status'] = $status_name; $manage_list[$i]['recent_job_title'] = $rows->recent_job_title; //$manage_list[$i]['city']= $rows->city; $manage_list[$i]['modified_at'] = strftime(DATE_FORMAT, strtotime($rows->modified_at)); //locations //country $country_arry = Country::find_by_code($rows->country); $country_var_name = $country_arry->var_name; $country_name = $country_arry->name; //states $state = StateProvince::find_by_code($rows->country, $rows->state_province); $state_name = empty($state) ? $rows->state_province : $state->name; //county $county = County::find_by_code($rows->country, $rows->state_province, $rows->county);