+ Add meas modules.
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* The control file of measrecord of ChanzhiEPS.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv11.html)
|
||||
* @author Xiying Guan <guanxiying@xirangit.com>
|
||||
* @package measrecord
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class measrecord extends control
|
||||
{
|
||||
public function browse($program = 0, $measID = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 10, $pageID = 1)
|
||||
{
|
||||
$this->app->loadLang('measurement');
|
||||
$this->app->loadClass('pager', $static=true);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
$this->lang->navGroup->measrecord = 'project';
|
||||
|
||||
$this->loadModel('project')->setMenu($program);
|
||||
|
||||
$this->view->records = $this->measrecord->getListByProgram($program, $measID, $orderBy, $pager);
|
||||
$this->view->measList = $this->measrecord->getSavedMeas($program);
|
||||
$this->view->title = $this->lang->measrecord->browse;
|
||||
$this->view->program = $program;
|
||||
$this->view->programs = $this->loadModel('program')->getPairs();
|
||||
$this->view->products = $this->loadModel('product')->getPairs();
|
||||
$this->view->projects = $this->loadModel('project')->getPairsByProgram();
|
||||
|
||||
if($measID)
|
||||
{
|
||||
$measurement = $this->loadModel('measurement')->getByID($measID);
|
||||
$measurement->params = json_decode($measurement->params);
|
||||
$this->view->measurement = $measurement;
|
||||
}
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
.side-col .detail-content{padding-left: 10px; margin-top: 0px}
|
||||
.tree li.has-list.open:before {border-left: none;}
|
||||
#measTree li {padding: 0 0 0 8px;}
|
||||
#measTree li.has-list {padding-left: 20px;}
|
||||
#measTree li > a {display: block; padding: 5px 0; border-radius: 2px; padding-left: 6px; height: 30px;}
|
||||
#measTree li > a > span {display: inline-block;}
|
||||
#measTree li > a > span + span {margin-left: 8px;}
|
||||
#measTree li.selected > a {background-color: #E8F3FC;}
|
||||
#measTree li.selected > a > span.title {color: #006AF1;}
|
||||
#measTree .label-id {border-color: #cbd0db; color: #7d8599}
|
||||
#measTree .label.label-type {background: #fff; border: 1px solid #7d8599; color:#7d8599}
|
||||
|
||||
#measTree li > a > span.title {color: #3C4353; white-space: nowrap; max-width: 60%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;}
|
||||
#measTree li > a > span.user {color: #838a9d;}
|
||||
#measTree li > a > span.user > .icon-person {font-size: 14px; position: relative; top: -1px; color: #a6aab8}
|
||||
|
||||
#measTree li > .list-toggle {transform: rotate(0deg); width: 16px; height: 16px; border: 4px solid #a6aab8; border-radius: 2px; top: 7px;}
|
||||
#measTree li > .list-toggle:before {content: ' '; display: block; position: absolute; border: 1px solid #a6aab8; top: 2px; left: -3px; right: -3px; bottom: 2px; min-width: 0; transition: all .2s;}
|
||||
#measTree li > .list-toggle:hover:before,
|
||||
#measTree li > .list-toggle:hover {border-color: #006AF1;}
|
||||
#measTree li.open > .list-toggle {width: 12px; height: 12px; top: 9px; background-color: #a6aab8; border-width: 3px; left: 3px;}
|
||||
#measTree li.open > .list-toggle:before {border: none; height: 2px; width: 6px; left: 0; top: 2px; background: #fff;}
|
||||
#measTree li.open > .list-toggle:hover {background: #006AF1;}
|
||||
|
||||
#measTree ul > li:after {display: block; position: absolute; content: ' '; border-top: 2px solid #cbd0db; top: 14px; left: -12px; z-index: 1; width: 10px;}
|
||||
#measTree ul > li:before,
|
||||
#measTree ul > li.has-list:before {background: none; content: ' '; display: block; position: absolute; width: auto; height: auto; border: none; border-left: 2px solid #cbd0db; top: -13px; bottom: 12px; left: -12px;}
|
||||
#measTree ul > li:last-child:before {bottom: auto; height: 29px;}
|
||||
#measTree ul > li:first-child:before {top: -9px;}
|
||||
#measTree ul > li.has-list:first-child:before {top: -13px;}
|
||||
#measTree ul > li.tree-single-item:before {height: 23px;}
|
||||
#measTree ul > li.has-list:after {width: 14px;}
|
||||
#measTree ul > li.item-meas a.selected{color: #0c64eb;}
|
||||
.side-col{padding-right: 5px; width: 25%}
|
||||
@@ -0,0 +1,8 @@
|
||||
$(function()
|
||||
{
|
||||
var $taskTree = $('#measTree').tree(
|
||||
{
|
||||
name: 'measTree',
|
||||
initialState: 'preserve'
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
$lang->measrecord->common = 'Project Measurement';
|
||||
$lang->measrecord->browse = 'History';
|
||||
$lang->measrecord->list = 'Measurements';
|
||||
$lang->measrecord->params = 'Measurement Parameters';
|
||||
|
||||
$lang->measrecord->value = 'Metrics';
|
||||
$lang->measrecord->date = 'Created';
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
$lang->measrecord->common = 'Project Measurement';
|
||||
$lang->measrecord->browse = 'History';
|
||||
$lang->measrecord->list = 'Measurements';
|
||||
$lang->measrecord->params = 'Measurement Parameters';
|
||||
|
||||
$lang->measrecord->value = 'Metrics';
|
||||
$lang->measrecord->date = 'Created';
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
$lang->measrecord->common = 'Project Measurement';
|
||||
$lang->measrecord->browse = 'History';
|
||||
$lang->measrecord->list = 'Measurements';
|
||||
$lang->measrecord->params = 'Measurement Parameters';
|
||||
|
||||
$lang->measrecord->value = 'Metrics';
|
||||
$lang->measrecord->date = 'Created';
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
$lang->measrecord->common = '项目度量';
|
||||
$lang->measrecord->browse = '度量记录';
|
||||
$lang->measrecord->list = '度量列表';
|
||||
$lang->measrecord->params = '度量参数';
|
||||
|
||||
$lang->measrecord->value = '度量值';
|
||||
$lang->measrecord->date = '创建时间';
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* The model file of measrecord module of ChanzhiEPS.
|
||||
*
|
||||
* @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv11.html)
|
||||
* @author Xiying Guan <guanxiying@xirangit.com>
|
||||
* @package measrecord
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class measrecordModel extends model
|
||||
{
|
||||
/**
|
||||
* Get list by program
|
||||
*
|
||||
* @param int $program
|
||||
* @param int $measurementID
|
||||
* @param string $orderBy
|
||||
* @param object $pager
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getListByProgram($program, $measurementID, $orderBy = 'id_desc', $pager = null)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_MEASRECORDS)
|
||||
->where('project')->eq($program)
|
||||
->andWhere('mid')->eq($measurementID)
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
->fetchAll();
|
||||
}
|
||||
|
||||
public function getSavedMeas($program)
|
||||
{
|
||||
return $this->dao->select('DISTINCT r.mid, m.name, m.purpose')->from(TABLE_BASICMEAS)->alias('m')
|
||||
->leftJoin(TABLE_MEASRECORDS)->alias('r')
|
||||
->on('m.id=r.mid')
|
||||
->where('project')->eq($program)
|
||||
->orderBy('m.purpose, m.order desc')
|
||||
->fetchGroup('purpose');
|
||||
}
|
||||
|
||||
/**
|
||||
* Save meas record.
|
||||
*
|
||||
* @param object $measurement
|
||||
* @param array $params
|
||||
* @param mix $queryResult
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function save($measurement, $params, $value, $type = '')
|
||||
{
|
||||
$record = new stdclass();
|
||||
$record->type = $type;
|
||||
$record->mid = $measurement->id;
|
||||
$record->measCode = $measurement->code;
|
||||
$record->date = helper::today();
|
||||
$record->year = date('Y');
|
||||
$record->month = date('Ym');
|
||||
$record->week = date('W');
|
||||
$record->day = date('Ymd');
|
||||
$record->params = json_encode($params);
|
||||
$record->value = $value;
|
||||
|
||||
if(isset($params['$program'])) $record->program = $params['$program'];
|
||||
if(isset($params['$product'])) $record->product = $params['$product'];
|
||||
if(isset($params['$project'])) $record->project = $params['$project'];
|
||||
|
||||
$this->dao->insert(TABLE_MEASRECORDS)->data($record)->exec();
|
||||
return !dao::isError();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
<?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div id="mainContent" class="main-row fade">
|
||||
<div class='side-col'>
|
||||
<div class='cell'>
|
||||
<div class="detail">
|
||||
<div class='detail-title'><?php echo $lang->measrecord->list;?></div>
|
||||
</div>
|
||||
<div class="detail-content article-content">
|
||||
<ul class='tree' id='measTree'>
|
||||
<?php
|
||||
foreach($measList as $purpose => $meases)
|
||||
{
|
||||
$class = '';
|
||||
$purposeName = zget($lang->measurement->purposeList, $purpose, $purpose);
|
||||
echo "<li class='item-purpose'>" . "<a class='tree-toggle'><span class='title' title='{$purposeName}'>" . $purposeName. '</span></a>';
|
||||
if(!empty($meases))
|
||||
{
|
||||
echo "<ul>";
|
||||
foreach($meases as $meas)
|
||||
{
|
||||
$class = '';
|
||||
if(isset($measurement) and zget($measurement, 'id') == $meas->mid) $class = 'selected';
|
||||
echo '<li class="item-meas">' . html::a($this->createLink('measrecord', 'browse', "program={$program}&measurement={$meas->mid}"), '<i class="icon icon-file-text"></i> ' . $meas->name, '', "class='$class' title='$meas->name'") . "</li>";
|
||||
}
|
||||
echo "</ul>";
|
||||
}
|
||||
echo '</li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main-col col-8">
|
||||
<div class="container">
|
||||
<?php if(empty($records)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p><span class="text-muted"><?php echo $lang->noData;?></span></p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class='main-table'>
|
||||
<table class='table table-bordered'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-60px'><?php echo $lang->idAB;?></th>
|
||||
<th><?php echo $lang->measurement->name;?></th>
|
||||
<?php foreach($measurement->params as $param):?>
|
||||
<th class='text-center'><?php echo $param->showName;?></th>
|
||||
<?php endforeach;?>
|
||||
<th class='text-center'>
|
||||
<?php echo $lang->measrecord->value;?>
|
||||
(<?php echo $measurement->unit?>)
|
||||
</th>
|
||||
<th class='w-120px text-center'><?php echo $lang->measrecord->date;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($records as $record):?>
|
||||
<?php $record->params = json_decode($record->params);?>
|
||||
<tr>
|
||||
<td><?php echo $record->id;?></td>
|
||||
<td><?php echo $measurement->name;?></td>
|
||||
<?php foreach($measurement->params as $param):?>
|
||||
<?php $value = '';?>
|
||||
<?php if(strpos($param->varName, 'program') !== false) $value = zget($programs, zget($record->params, $param->varName, $this->session->program), '')?>
|
||||
<?php if(strpos($param->varName, 'product') !== false) $value = zget($products, zget($record->params, $param->varName, $this->session->product), '')?>
|
||||
<?php if(strpos($param->varName, 'project') !== false) $value = zget($projects, zget($record->params, $param->varName, $this->session->project), '')?>
|
||||
<td class='text-center text-ellipsis' title='<?php echo $value;?>'>
|
||||
<?php echo $value;?>
|
||||
</td>
|
||||
<?php endforeach;?>
|
||||
<td class='text-right'><?php echo $record->value;?></td>
|
||||
<td class='text-center'><?php echo $record->date;?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
$config->measurement = new stdclass();
|
||||
$config->measurement->editor = new stdclass();
|
||||
$config->measurement->editor->createtemplate = array('id' => 'content', 'tools' => 'measurementTools');
|
||||
$config->measurement->editor->edittemplate = array('id' => 'content', 'tools' => 'measurementTools');
|
||||
|
||||
$config->measurement->createbasic = new stdclass();
|
||||
$config->measurement->editbasic = new stdclass();
|
||||
$config->measurement->createderivation = new stdclass();
|
||||
$config->measurement->editderivation = new stdclass();
|
||||
|
||||
$config->measurement->createbasic->requiredFields = 'name,code,unit,definition';
|
||||
$config->measurement->editbasic->requiredFields = 'name,code,unit,definition';
|
||||
$config->measurement->createderivation->requiredFields = 'name,purpose';
|
||||
$config->measurement->editderivation->requiredFields = 'name,purpose';
|
||||
|
||||
$config->measurement->createtemplate = new stdclass();
|
||||
$config->measurement->createtemplate->requiredFields = 'name';
|
||||
|
||||
$config->measurement->edittemplate = new stdclass();
|
||||
$config->measurement->edittemplate->requiredFields = $config->measurement->createtemplate->requiredFields;
|
||||
|
||||
$config->measurement->sqlBlackList = "create,drop,backup,alter,insert,replace,update,delete,rename,do,truncate,load,handler,lock,unlock,grant,outfile,infile";
|
||||
$config->measurement->sqlBlackFunc = "current_user,load_file,session_user,database,user,system_user";
|
||||
|
||||
$config->measurement->triggers = array();
|
||||
$config->measurement->triggers[] = 'project.close';
|
||||
|
||||
$config->measurement->scopeParams = new stdclass();
|
||||
$config->measurement->scopeParams->program = '$program int';
|
||||
$config->measurement->scopeParams->product = '$program int, $product int';
|
||||
$config->measurement->scopeParams->project = '$program int, $product int, $stage int';
|
||||
|
||||
global $lang;
|
||||
$config->measurement->search['module'] = 'measurement';
|
||||
$config->measurement->search['fields']['name'] = $lang->measurement->name;
|
||||
$config->measurement->search['fields']['id'] = $lang->measurement->id;
|
||||
$config->measurement->search['fields']['purpose'] = $lang->measurement->purpose;
|
||||
$config->measurement->search['fields']['scope'] = $lang->measurement->scope;
|
||||
$config->measurement->search['fields']['object'] = $lang->measurement->object;
|
||||
$config->measurement->search['fields']['code'] = $lang->measurement->code;
|
||||
$config->measurement->search['fields']['unit'] = $lang->measurement->unit;
|
||||
$config->measurement->search['fields']['definition'] = $lang->measurement->definition;
|
||||
$config->measurement->search['fields']['collectType'] = $lang->measurement->collectType;
|
||||
$config->measurement->search['fields']['createdBy'] = $lang->measurement->createdBy;
|
||||
|
||||
$config->measurement->search['params']['name'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
|
||||
$config->measurement->search['params']['id'] = array('operator' => '=', 'control' => 'input', 'values' => '');
|
||||
$config->measurement->search['params']['purpose'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->measurement->purposeList);
|
||||
$config->measurement->search['params']['scope'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->measurement->scopeList);
|
||||
$config->measurement->search['params']['object'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->measurement->objectList);
|
||||
$config->measurement->search['params']['code'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
|
||||
$config->measurement->search['params']['unit'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
|
||||
$config->measurement->search['params']['definition'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
|
||||
$config->measurement->search['params']['collectType'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->measurement->collectTypeList);
|
||||
$config->measurement->search['params']['createdBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
|
||||
@@ -0,0 +1,684 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* The control file of measurement module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
|
||||
* @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Guanxiying <guanxiying@easycorp.ltd>
|
||||
* @package measurement
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
class measurement extends control
|
||||
{
|
||||
/**
|
||||
* Construct.
|
||||
*▫
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
/* Set measurement menu group. */
|
||||
$this->projectID = isset($_GET['PRJ']) ? $_GET['PRJ'] : 0;
|
||||
if(!$this->projectID)
|
||||
{
|
||||
$this->lang->navGroup->measurement = 'system';
|
||||
$this->lang->navGroup->report = 'system';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Browse measurements.
|
||||
*
|
||||
* @param string $browseType
|
||||
* @param int $param
|
||||
* @param string $orderBy
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function browse(string $browseType = 'all', int $param = 0, string $orderBy = 'purpose,order_desc', int $recTotal = 0, int $recPerPage = 10, int $pageID = 1)
|
||||
{
|
||||
$this->loadModel('datatable');
|
||||
$this->session->set('measList', $this->app->getURI(true));
|
||||
|
||||
$this->app->loadClass('pager', true);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
/* Build the search form. */
|
||||
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
|
||||
$actionURL = $this->createLink('measurement', 'browse', "browseType=bysearch&queryID=myQueryID");
|
||||
$this->measurement->buildSearchForm($actionURL, $queryID);
|
||||
|
||||
$this->view->title = $this->lang->measurement->browse;
|
||||
$this->view->position[] = $this->lang->measurement->browse;
|
||||
|
||||
$this->view->pager = $pager;
|
||||
$this->view->recTotal = $recTotal;
|
||||
$this->view->recPerPage = $recPerPage;
|
||||
$this->view->pageID = $pageID;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->param = $param;
|
||||
$this->view->measurementList = $this->measurement->getList($browseType, $queryID, $orderBy, $pager);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create basic measurement.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function createBasic()
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$measurementID = $this->measurement->createBasic();
|
||||
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$this->loadModel('action')->create('measurement', $measurementID, 'createBasic');
|
||||
|
||||
$response = array();
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = $this->lang->measurement->saveSuccess;
|
||||
$response['locate'] = $this->session->measList ? $this->session->measList : $this->createLink('measurement', 'browse', "basic");
|
||||
|
||||
return $this->send($response);
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->measurement->create;
|
||||
$this->view->position[] = $this->lang->measurement->create;
|
||||
|
||||
$this->view->moduleList = $this->measurement->getModulePairs();
|
||||
$this->view->triggerOptions = $this->measurement->getTriggerOptions();
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete measurement.
|
||||
*
|
||||
* @param int $measurementID
|
||||
* @param string $confirm
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function delete(int $measurementID, string $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
return print(js::confirm($this->lang->measurement->confirmDelete, $this->createLink('measurement', 'delete', "measurementID=$measurementID&confirm=yes"), ''));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->measurement->delete(TABLE_BASICMEAS, $measurementID);
|
||||
|
||||
/* if ajax request, send result. */
|
||||
if($this->server->ajax)
|
||||
{
|
||||
if(dao::isError())
|
||||
{
|
||||
$response['result'] = 'fail';
|
||||
$response['message'] = dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = '';
|
||||
}
|
||||
return $this->send($response);
|
||||
}
|
||||
|
||||
return print(js::locate(inlink('browse'), 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit basic measurement.
|
||||
*
|
||||
* @param int $measurementID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function editBasic(int $measurementID)
|
||||
{
|
||||
$measurement = $this->measurement->getByID($measurementID);
|
||||
|
||||
if($_POST)
|
||||
{
|
||||
$measurementID = $this->measurement->editBasic($measurementID);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
$this->loadModel('action')->create('measurement',$measurementID,'editBasic');
|
||||
|
||||
$response = array();
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = $this->lang->measurement->saveSuccess;
|
||||
$response['locate'] = $this->session->measList ? $this->session->measList : $this->createLink('measurement', 'browse', "basic");
|
||||
return $this->send($response);
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->measurement->editBasic;
|
||||
$this->view->position[] = $this->lang->measurement->editBasic;
|
||||
$this->view->measurement = $measurement;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
|
||||
$this->view->triggerOptions = $this->measurement->getTriggerOptions();
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Search measurements.
|
||||
*
|
||||
* @param string $types
|
||||
* @param int $measurementID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function searchMeas(string $types, int $measurementID)
|
||||
{
|
||||
if($types == 'derivemeas')
|
||||
{
|
||||
$basicMeasurement = $this->measurement->getPairs();
|
||||
$derivation = $this->measurement->getByID('derivation', $measurementID);
|
||||
$definition = json_decode($derivation->definition,true);
|
||||
|
||||
$definitionItem = array();
|
||||
$definitionForm = array();
|
||||
foreach($definition as $key => $value)
|
||||
{
|
||||
if(preg_match('/\{|\}/', $value))
|
||||
{
|
||||
$basicmeasID = preg_replace('/\{|\}/', '', $value);
|
||||
$basicmeasName = $basicMeasurement[$basicmeasID];
|
||||
$definitionItem[] = $basicmeasName;
|
||||
$definitionForm[] = '通过接口获';
|
||||
}
|
||||
else
|
||||
{
|
||||
$methodName = $value;
|
||||
if($methodName == '*') $methodName = 'x';
|
||||
if($methodName == '/') $methodName = '÷';
|
||||
|
||||
$definitionItem[] = $methodName;
|
||||
$definitionForm[] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
$returnData = array();
|
||||
$returnData['definitionItem'] = $definitionItem;
|
||||
$returnData['definitionForm'] = $definitionForm;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Browse template.
|
||||
*
|
||||
* @param string $type
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function template(string $type = 'complex', int $recTotal = 0, int $recPerPage = 20, int $pageID = 1)
|
||||
{
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = pager::init($recTotal, $recPerPage, $pageID);
|
||||
|
||||
if($type == 'complex') $templates = $this->measurement->getTemplates($pager);
|
||||
if($type == 'single')
|
||||
{
|
||||
$this->app->loadLang('report');
|
||||
$templates = $this->measurement->getReports('list', $pager);
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->measurement->template;
|
||||
$this->view->position[] = $this->lang->measurement->template;
|
||||
$this->view->type = $type;
|
||||
$this->view->templates = $templates;
|
||||
$this->view->pager = $pager;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create report template.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function createTemplate()
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$this->measurement->saveTemplate();
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$locate = $this->createLink('measurement', 'template');
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->measurement->saveSuccess, 'locate' => $locate));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->measurement->createTemplate;
|
||||
$this->view->position[] = $this->lang->measurement->createTemplate;
|
||||
$this->view->basicMeases = $this->measurement->getPairs();
|
||||
$this->view->reports = $this->measurement->getReports('pairs');
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit report template.
|
||||
*
|
||||
* @param int $templateID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function editTemplate(int $templateID = 0)
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$changes = $this->measurement->editTemplate($templateID);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$locate = $this->createLink('measurement', 'template');
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->measurement->saveSuccess, 'locate' => $locate));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->measurement->editTemplate;
|
||||
$this->view->position[] = $this->lang->measurement->editTemplate;
|
||||
$this->view->template = $this->measurement->getTemplateByID($templateID);
|
||||
$this->view->basicMeases = $this->measurement->getPairs('basic');
|
||||
$this->view->deriveMeases = $this->measurement->getPairs('derivation');
|
||||
$this->view->reports = $this->measurement->getReports('pairs');
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* View report template.
|
||||
*
|
||||
* @param int $templateID
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function viewTemplate(int $templateID = 0, int $projectID = 0)
|
||||
{
|
||||
$template = $this->measurement->getTemplateByID($templateID);
|
||||
$this->view->template = $template;
|
||||
|
||||
if($_POST)
|
||||
{
|
||||
$_GET['onlybody'] = 'yes';
|
||||
$this->view->content = $this->measurement->parseTemplateContent($template->content);
|
||||
return $this->display('measurement', 'report');
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->measurement->viewTemplate;
|
||||
$this->view->position[] = $this->lang->measurement->viewTemplate;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->basicMeases = $this->measurement->getPairs('basic');
|
||||
$this->view->deriveMeases = $this->measurement->getPairs('derivation');
|
||||
$this->view->projectPairs = $this->loadModel('project')->getPairsByModel($template->model);
|
||||
$this->view->components = $this->measurement->getTemplateComponents($template->content);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Save report template.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function saveReport()
|
||||
{
|
||||
$report = fixer::input('post')
|
||||
->add('createdBy', $this->app->user->account)
|
||||
->add('createdDate', helper::today())
|
||||
->remove('parseContent, saveReport')
|
||||
->get();
|
||||
|
||||
$this->dao->insert(TABLE_PROGRAMREPORT)->data($report)->check('name', 'notempty')->autocheck()->exec();
|
||||
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess));
|
||||
}
|
||||
|
||||
/**
|
||||
* Set SQL function.
|
||||
*
|
||||
* @param int $measurementID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function setSQL(int $measurementID)
|
||||
{
|
||||
$measurement = $this->measurement->getByID($measurementID);
|
||||
if($_POST)
|
||||
{
|
||||
$result = $this->measurement->createSqlFunction($this->post->sql, $measurement);
|
||||
if($result['result'] != 'success') return $this->send($result);
|
||||
|
||||
foreach($this->post->varName as $i => $varName)
|
||||
{
|
||||
if(empty($varName)) return $this->send(array('result' => 'fail', 'errors' => $this->lang->measurement->tips->noticeVarName));
|
||||
$params[$varName]['showName'] = zget($this->post->showName, $i, '');
|
||||
$errors = array();
|
||||
if($params[$varName]['showName'] == '') $errors[] = sprintf($this->lang->measurement->tips->showNameMissed, $varName);
|
||||
if(empty($this->post->queryValue[$i])) $errors[] = sprintf($this->lang->measurement->tips->noticeQueryValue, $varName);
|
||||
if(!empty($errors)) return $this->send(array('result' => 'fail', 'errors' => join("<br>", $errors)));
|
||||
|
||||
$params[$varName]['varName'] = $varName;
|
||||
$params[$varName]['varType'] = zget($this->post->varType, $i, 'input');
|
||||
$params[$varName]['showName'] = zget($this->post->showName, $i, '');
|
||||
$params[$varName]['options'] = $this->post->options[$i];
|
||||
$params[$varName]['defaultValue'] = zget($this->post->defaultValue, $i, '');
|
||||
}
|
||||
|
||||
$this->dao->update(TABLE_BASICMEAS)
|
||||
->set('configure')->eq($this->post->sql)
|
||||
->set('params')->eq(json_encode($params))
|
||||
->where('id')->eq($measurementID)
|
||||
->exec();
|
||||
|
||||
$params = $this->measurement->processPostParams();
|
||||
$measFunction = $this->measurement->getSqlFunctionName($measurement);
|
||||
$queryResult = $this->measurement->execSqlMeasurement($measurement, $params, $this->post->action);
|
||||
if($queryResult === false) return $this->send(array('result' => 'fail', 'message' => $this->measurement->errorInfo));
|
||||
|
||||
if($this->post->action == 'save') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browse')));
|
||||
return $this->send(array('result' => 'success', 'queryResult' => sprintf($this->lang->measurement->saveSqlMeasSuccess, $queryResult)));
|
||||
}
|
||||
|
||||
$defaultParamString = zget($this->config->measurement->scopeParams, $measurement->scope);
|
||||
$defaultSQL = sprintf($this->lang->measurement->sqlTemplate, $this->measurement->getSqlFunctionName($measurement), $defaultParamString);
|
||||
$params = json_decode($measurement->params, true);
|
||||
|
||||
$this->view->title = $this->lang->measurement->design . $this->lang->colon . $measurement->name;
|
||||
$this->view->position[] = $this->lang->measurement->design;
|
||||
$this->view->sql = !empty($measurement->configure) ? $measurement->configure : $defaultSQL;
|
||||
$this->view->params = empty($params) ? array() : json_decode($measurement->params, true);
|
||||
$this->view->measurement = $measurement;
|
||||
$this->view->measurementID = $measurementID;
|
||||
$this->view->programPairs = $this->loadModel('project')->getPairsByProgram();
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get sql params from sql.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getSqlParams()
|
||||
{
|
||||
$measurementID = $this->post->measurementID;
|
||||
$measurement = $this->measurement->getByID($measurementID);
|
||||
if(!$this->post->sql) return print('');
|
||||
if($this->post->sql == $measurement->configure) $this->locate($this->server->http_referer);
|
||||
|
||||
$measFunction = $this->measurement->getSqlFunctionName($measurement);
|
||||
$postFunction = $this->measurement->parseSqlFunction($this->post->sql);
|
||||
if(!$postFunction) return print("sql error."); //@todo fix error message.
|
||||
$this->post->sql = str_replace($postFunction, $measFunction, $this->post->sql);
|
||||
|
||||
$this->view->params = $this->measurement->parseSqlParams($this->post->sql);
|
||||
$this->view->measurement = $measurement;
|
||||
$this->view->measurementID = $measurementID;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Init crontab queue.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function initCrontabQueue()
|
||||
{
|
||||
$this->measurement->initCrontabQueue();
|
||||
return print('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* Exec crontab queue.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function execCrontabQueue()
|
||||
{
|
||||
$queues = $this->measurement->getUnexecutedQueues();
|
||||
foreach($queues as $queue)
|
||||
{
|
||||
if($queue->execTime and date('H:i') < $queue->execTime) continue;
|
||||
$this->measurement->execQueue($queue);
|
||||
}
|
||||
return print('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* Set tips.
|
||||
*
|
||||
* @param string $type
|
||||
* @param string $object
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function setTips(string $type = 'progress', string $object = 'SPI')
|
||||
{
|
||||
$this->loadModel('custom');
|
||||
|
||||
if(strtolower($this->server->request_method) == "post")
|
||||
{
|
||||
$data = (array)fixer::input('post')->get();
|
||||
extract($data);
|
||||
|
||||
$tipsConfig = array();
|
||||
foreach($mins as $key => $min)
|
||||
{
|
||||
$max = zget($maxs, $key, '');
|
||||
$tip = zget($tips, $key, '');
|
||||
$range = zget($ranges, $key, '');
|
||||
if(empty($min) and empty($max) and empty($tip)) continue;
|
||||
if($object == 'SPI' || $object == 'CPI')
|
||||
{
|
||||
if($min < 0 || $max < 0) return $this->send(array('result' => 'fail', 'message' => $this->lang->custom->numberError));
|
||||
}
|
||||
if(!preg_match("/^(\-|\+?)\d+(\.\d+)?$/", $min)) return $this->send(array('result' => 'fail', 'message' => $this->lang->custom->regionMustNumber));
|
||||
if(!preg_match("/^(\-|\+?)\d+(\.\d+)?$/", $max)) return $this->send(array('result' => 'fail', 'message' => $this->lang->custom->regionMustNumber));
|
||||
if(empty($tip)) return $this->send(array('result' => 'fail', 'message' => $this->lang->custom->tipNotEmpty));
|
||||
|
||||
$tipCofig = new stdclass();
|
||||
$tipCofig->min = $min;
|
||||
$tipCofig->max = $max;
|
||||
$tipCofig->tip = $tip;
|
||||
$tipCofig->type = $object;
|
||||
$tipCofig->range = $range;
|
||||
|
||||
$tipsConfig[$key] = $tipCofig;
|
||||
}
|
||||
|
||||
if($type == 'progress') $this->loadModel('setting')->setItem("system.custom.$object.progressTip", json_encode($tipsConfig));
|
||||
if($type == 'cost') $this->loadModel('setting')->setItem("system.custom.$object.costTip", json_encode($tipsConfig));
|
||||
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('measurement', 'setTips', "type=$type&object=$object")));
|
||||
}
|
||||
|
||||
$tipType = $type . 'Tip';
|
||||
$tipsConfig = isset($this->config->custom->$object->$tipType) ? $this->config->custom->$object->$tipType : '';
|
||||
|
||||
$this->view->title = $this->lang->custom->common . $this->lang->colon . $this->lang->custom->setTips;
|
||||
$this->view->position[] = $this->lang->custom->common;
|
||||
$this->view->position[] = $this->lang->custom->setTips;
|
||||
$this->view->tipsConfig = json_decode($tipsConfig);
|
||||
$this->view->type = $type;
|
||||
$this->view->object = $object;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax set params.
|
||||
*
|
||||
* @param int $measurementID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxSetParams(int $measurementID = 0)
|
||||
{
|
||||
$measurement = $this->measurement->getByID($measurementID);
|
||||
|
||||
$data = fixer::input('post')->get();
|
||||
$params = array();
|
||||
foreach($data->varName as $i => $varName)
|
||||
{
|
||||
if(empty($varName)) return $this->send(array('result' => 'fail', 'message' => $this->lang->measurement->tips->noticeVarName));
|
||||
if(empty($data->showName[$i])) return $this->send(array('result' => 'fail', 'message' => sprintf($this->lang->measurement->tips->noticeShowName, $data->showName[$i])));
|
||||
if(empty($data->varType[$i])) return $this->send(array('result' => 'fail', 'message' => sprintf($this->lang->measurement->tips->noticeVarType, $data->varName[$i])));
|
||||
|
||||
$params[$varName]['varName'] = $varName;
|
||||
$params[$varName]['varType'] = $data->varType[$i];
|
||||
$params[$varName]['showName'] = $data->showName[$i];
|
||||
$params[$varName]['options'] = $data->options[$i];
|
||||
if(isset($data->defaultValue)) $params[$varName]['defaultValue'] = zget($data->defaultValue, $i, '');
|
||||
if(isset($data->queryValue)) $params[$varName]['queryValue'] = zget($data->queryValue, $i, '');
|
||||
}
|
||||
|
||||
$this->session->set('params', json_encode($params));
|
||||
if($measurement->method == 'php') $this->session->set('queryParams', $this->post->queryValue);
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'callback' => "hideParamForm()"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax build SQL.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxBuildSQL()
|
||||
{
|
||||
return print($this->fetch('sqlbuilder', 'create'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax get param control.
|
||||
*
|
||||
* @param string $controlType
|
||||
* @param string $optionType
|
||||
* @param string $value
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetParamControl(string $controlType, string $optionType = '', string $value = '')
|
||||
{
|
||||
$value = base64_decode($value);
|
||||
$html = '';
|
||||
$html .= "<td>" . $this->measurement->buildParamControl('defaultValue', $controlType, $value, $optionType) . "</td>";
|
||||
$html .= "<td>" . $this->measurement->buildParamControl('queryValue', $controlType, '', $optionType) . "</td>";
|
||||
|
||||
return print($html);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax check element whether need params.
|
||||
*
|
||||
* @param string $holderValue
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxCheckElementNeedParams(string $holderValue)
|
||||
{
|
||||
$holderValue = base64_Decode($holderValue);
|
||||
$sysData = $this->measurement->parseHolderValue($holderValue);
|
||||
$params = $this->measurement->getParams($sysData);
|
||||
$needParams = empty($params) ? 'no' : 'yes';
|
||||
return print($needParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax build param form.
|
||||
*
|
||||
* @param string $holderValue
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxBuildParamForm(string $holderValue)
|
||||
{
|
||||
$holderValue = base64_Decode($holderValue);
|
||||
$sysData = $this->measurement->parseHolderValue($holderValue);
|
||||
|
||||
$this->view->controlID = $sysData->controlID;
|
||||
$this->view->params = $this->measurement->getParams($sysData);
|
||||
$this->view->sysData = $sysData;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax get module actions.
|
||||
*
|
||||
* @param string $module
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetModuleActions(string $module)
|
||||
{
|
||||
$actions = $this->measurement->getModuleActions($module);
|
||||
return print(html::select('action', $actions, '', "class='form-control chosen'"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update sort.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function updateOrder()
|
||||
{
|
||||
$idList = explode(',', trim($this->post->meas, ','));
|
||||
$orderBy = $this->post->orderBy;
|
||||
foreach($idList as $id => $value)
|
||||
{
|
||||
if($value == 'undefined') unset($idList[$id]);
|
||||
}
|
||||
|
||||
if(strpos($orderBy, 'order') === false) return false;
|
||||
$data = $this->dao->select('id, `order`')->from(TABLE_BASICMEAS)->where('id')->in($idList)->orderBy($orderBy)->fetchPairs('order', 'id');
|
||||
|
||||
foreach($data as $order => $id)
|
||||
{
|
||||
$newID = array_shift($idList);
|
||||
if($id == $newID) continue;
|
||||
$this->dao->update(TABLE_BASICMEAS)->set('`order`')->eq($order)->where('id')->eq($newID)->exec();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch edit measurement.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function batchEdit()
|
||||
{
|
||||
$measurementID = $this->post->measurement;
|
||||
if(!empty($measurementID))
|
||||
{
|
||||
$this->view->measurements = $this->dao->select('*')->from(TABLE_BASICMEAS)->where('id')->in($this->post->measurement)->andWhere('deleted')->eq('0')->orderBy('order_desc')->fetchAll();
|
||||
}
|
||||
elseif($_POST)
|
||||
{
|
||||
$this->measurement->batchEdit();
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
return print(js::locate($this->createLink('measurement', 'browse'), 'parent'));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->measurement->common . $this->lang->colon . $this->lang->measurement->batchEdit;
|
||||
$this->view->position[] = $this->lang->measurement->batchEdit;
|
||||
$this->view->orderBy = 'order_desc';
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
.cycleConfig .checkbox-primary{float:left; width:100px;}
|
||||
.cycleConfig .tab-pane{padding:8px 0px;}
|
||||
fieldset legend{font-size:16px;}
|
||||
.tips span{padding: 0 5px;}
|
||||
.table td.nowrap{overflow: hidden; white-space: nowrap; text-overflow: ellipsis;}
|
||||
@@ -0,0 +1,2 @@
|
||||
textarea.form-control{ font-size:14px;}
|
||||
#responseBox{padding-left:20px; font-size:14px;}
|
||||
@@ -0,0 +1 @@
|
||||
.form-group > div span{line-height:20px;}
|
||||
@@ -0,0 +1,12 @@
|
||||
$(function()
|
||||
{
|
||||
$('#measurementList').on('sort.sortable', function(e, data)
|
||||
{
|
||||
var list = '';
|
||||
for(i = 0; i < data.list.length; i++)
|
||||
{
|
||||
list += $(data.list[i].item).attr('data-id') + ',';
|
||||
}
|
||||
$.post(createLink('measurement', 'updateOrder'), {'meas' : list, 'orderBy' : orderBy});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
$(function()
|
||||
{
|
||||
$('#measurementList').on('sort.sortable', function(e, data)
|
||||
{
|
||||
var list = '';
|
||||
for(i = 0; i < data.list.length; i++)
|
||||
{
|
||||
list += $(data.list[i].item).attr('data-id') + ',';
|
||||
}
|
||||
$.post(createLink('measurement', 'updateOrder'), {'meas' : list, 'orderBy' : orderBy});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,97 @@
|
||||
$(document).on('click', '#reDesignButton', function()
|
||||
{
|
||||
location.href = createLink('measurement', 'design', "measurementID=" + measurementID + "&step=1&type=reDesign");
|
||||
});
|
||||
|
||||
$(document).on('change', "select[name^='options']", function()
|
||||
{
|
||||
var $tr = $(this).closest('tr');
|
||||
var optionType = $(this).val();
|
||||
updateParamControl($tr, 'select', optionType);
|
||||
})
|
||||
|
||||
function setParams(data)
|
||||
{
|
||||
if(data)
|
||||
{
|
||||
var tbodyHtml = $('#setParams table tbody').html();
|
||||
$('#tmpDataBox').append(tbodyHtml);
|
||||
$('#setParams table tbody').empty();
|
||||
|
||||
var html = $('#templateBox table tbody tr.template').html();
|
||||
for(i in data)
|
||||
{
|
||||
if(data[i].indexOf('|'))
|
||||
{
|
||||
params = data[i].split('|');
|
||||
paramName = params[0];
|
||||
defaultValue = params[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
paramName = data[i];
|
||||
defaultValue = '';
|
||||
}
|
||||
if($('#tmpDataBox').find('#' + paramName).length)
|
||||
{
|
||||
$('#setParams table tbody').append($('#tmpDataBox').find('#' + paramName).prop('outerHTML'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#setParams table tbody').append('<tr id=>' + paramName + html + '</tr>');
|
||||
$('#setParams table tbody tr:last td:first').find('span:first').html(paramName);
|
||||
$('#setParams table tbody tr:last td:first').find('input:hidden').val(paramName);
|
||||
}
|
||||
|
||||
$('#setParams table tbody tr:last input[name^="defaultValue"]').val(defaultValue);
|
||||
|
||||
var index = $('#setParams table tbody tr:last').index();
|
||||
$('#setParams table tbody tr:last td').eq(2).find('input:radio').attr('name', 'varType[' + index + ']');
|
||||
}
|
||||
$('#submit').prop('disabled', false);
|
||||
$('#setParams').modal('show');
|
||||
}
|
||||
}
|
||||
|
||||
function hideParamForm()
|
||||
{
|
||||
$('#setParams').modal('hide');
|
||||
location.href = createLink('measurement', 'design', "measurementID=" + measurementID + "&step=3");
|
||||
}
|
||||
|
||||
function toggleSelectList(obj)
|
||||
{
|
||||
controlType = $(obj).val();
|
||||
if(controlType == 'select')
|
||||
{
|
||||
$(obj).parents('td').find('select').removeClass('hidden');
|
||||
}
|
||||
else
|
||||
{
|
||||
$(obj).parents('td').find('select').addClass('hidden');
|
||||
}
|
||||
|
||||
var optionType = $(obj).parents('td').find('select').val();
|
||||
var $tr = $(obj).closest('tr');
|
||||
updateParamControl($tr, controlType, optionType);
|
||||
}
|
||||
|
||||
function updateParamControl($tr, controlType, optionType)
|
||||
{
|
||||
var defaultValue = $tr.find('[name^=defaultValue]').val();
|
||||
defaultValue = window.btoa(defaultValue);
|
||||
$.get(createLink('measurement', 'ajaxGetParamControl', "controlType=" + controlType + "&optionType=" + optionType + '&defaultValue=' + defaultValue), function(data)
|
||||
{
|
||||
$tr.find("td:last").remove();
|
||||
$tr.find("td:last").remove();
|
||||
$tr.append(data);
|
||||
$tr.find("td input").each(function()
|
||||
{
|
||||
if($(this).hasClass('form-date')) $(this).datepicker();
|
||||
});
|
||||
$tr.find("td select").each(function()
|
||||
{
|
||||
if($(this).hasClass('chosen')) $(this).chosen();
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
$().ready(function()
|
||||
{
|
||||
$.setAjaxForm('#sqlForm', function(response)
|
||||
{
|
||||
if(response.result == 'success')
|
||||
{
|
||||
$('#responseBox').removeClass('text-danger').html(response.queryResult);
|
||||
$('#submit').prop('disabled', false).addClass('btn-primary');
|
||||
if(typeof(response.locate) != 'undefined') location.href = response.locate;
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#responseBox').addClass('text-danger').html(response.errors);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
$(document).on('click', '#testBtn', function()
|
||||
{
|
||||
$('#action').val('test');
|
||||
$('#sqlForm').submit();
|
||||
});
|
||||
|
||||
$(document).on('click', '#submit', function()
|
||||
{
|
||||
$('#action').val('save');
|
||||
$('#sqlForm').submit();
|
||||
});
|
||||
|
||||
|
||||
$('#sql').change(function()
|
||||
{
|
||||
$('#submit').prop('disabled', true).removeClass('btn-primary');
|
||||
$.post(createLink('measurement', 'getsqlparams'),
|
||||
{
|
||||
sql: $('#sql').val(), measurementID:measurementID},
|
||||
function(response)
|
||||
{
|
||||
$('#paramBox').html(response);
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
$('[name^=varType]').change();
|
||||
|
||||
function togglParamList(obj)
|
||||
{
|
||||
var varType = $(obj).parents('td').find('select[name*=varType]');
|
||||
toggleSelectList(varType);
|
||||
}
|
||||
|
||||
function toggleSelectList(obj)
|
||||
{
|
||||
isSelect = $(obj).val() == 'select';
|
||||
if(isSelect)
|
||||
{
|
||||
$(obj).parents('td').find('select[name*=options]').removeClass('hidden');
|
||||
}
|
||||
else
|
||||
{
|
||||
$(obj).parents('td').find('select[name*=options]').addClass('hidden');
|
||||
}
|
||||
|
||||
var optionType = $(obj).parents('td').find('select[name*=options]').val();
|
||||
var tr = $(obj).closest('tr');
|
||||
controlType = $(obj).val();
|
||||
updateParamControl(tr, controlType, optionType);
|
||||
}
|
||||
|
||||
function updateParamControl(tr, controlType, optionType)
|
||||
{
|
||||
var defaultValue = tr.find('[name^=defaultValue]').val();
|
||||
defaultValue = window.btoa(defaultValue);
|
||||
$.get(createLink('measurement', 'ajaxGetParamControl', "controlType=" + controlType + "&optionType=" + optionType + '&defaultValue=' + defaultValue), function(data)
|
||||
{
|
||||
tr.find("td:last").remove();
|
||||
tr.find("td:last").remove();
|
||||
tr.append(data);
|
||||
tr.find("td input").each(function()
|
||||
{
|
||||
if($(this).hasClass('form-date')) $(this).datepicker();
|
||||
});
|
||||
tr.find("td select").each(function()
|
||||
{
|
||||
if($(this).hasClass('chosen')) $(this).chosen();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function submitForm(value)
|
||||
{
|
||||
$('#action').val(value);
|
||||
$('#sqlForm').submit();
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
function toggleSelectList(obj)
|
||||
{
|
||||
isSelect = $(obj).prop('checked');
|
||||
if(isSelect)
|
||||
{
|
||||
$(obj).parents('td').find('select').removeClass('hidden');
|
||||
}
|
||||
else
|
||||
{
|
||||
$(obj).parents('td').find('select').addClass('hidden');
|
||||
}
|
||||
|
||||
var optionType = $(obj).parents('td').find('select').val();
|
||||
var $tr = $(obj).closest('tr');
|
||||
controlType = isSelect ? 'select' : 'input';
|
||||
updateParamControl($tr, controlType, optionType);
|
||||
}
|
||||
|
||||
function updateParamControl($tr, controlType, optionType)
|
||||
{
|
||||
var defaultValue = $tr.find('#defaultValue').val();
|
||||
defaultValue = window.btoa(defaultValue);
|
||||
$.get(createLink('measurement', 'ajaxGetParamControl', "controlType=" + controlType + "&optionType=" + optionType + '&defaultValue=' + defaultValue), function(data)
|
||||
{
|
||||
$tr.find("td:last").remove();
|
||||
$tr.find("td:last").remove();
|
||||
$tr.append(data);
|
||||
$tr.find("td input").each(function()
|
||||
{
|
||||
if($(this).hasClass('form-date')) $(this).datepicker();
|
||||
});
|
||||
$tr.find("td select").each(function()
|
||||
{
|
||||
if($(this).hasClass('chosen')) $(this).chosen();
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#submit').click(function()
|
||||
{
|
||||
$('.m-measurement-viewtemplate .col-md-9').show();
|
||||
$('#reportForm').submit();
|
||||
});
|
||||
|
||||
$('fieldset [name^=program]').prop('readonly', true);
|
||||
|
||||
$('.m-measurement-viewtemplate .col-md-9').hide();
|
||||
});
|
||||
@@ -0,0 +1,234 @@
|
||||
<?php
|
||||
$lang->measurement->common = 'Measurement';
|
||||
$lang->measurement->setTips = 'Interval Reminder';
|
||||
$lang->measurement->scope = 'Scope';
|
||||
$lang->measurement->object = 'Object';
|
||||
$lang->measurement->purpose = 'Purpose';
|
||||
$lang->measurement->code = 'Code';
|
||||
$lang->measurement->order = 'Order';
|
||||
$lang->measurement->returns = 'Return Type';
|
||||
$lang->measurement->definition = 'Measurement Definition';
|
||||
$lang->measurement->name = 'Measurement Name';
|
||||
$lang->measurement->type = 'Measurement Type';
|
||||
$lang->measurement->params = 'Parameter Settings';
|
||||
$lang->measurement->basicMeas = 'Basic Measurement';
|
||||
$lang->measurement->deriveMeas = 'Derived Measurement';
|
||||
$lang->measurement->measList = 'Measurement List';
|
||||
$lang->measurement->reportList = 'Report List';
|
||||
$lang->measurement->saveReport = 'Save Report';
|
||||
$lang->measurement->saveReportAB = 'Save Report';
|
||||
$lang->measurement->test = 'Test Measurement';
|
||||
$lang->measurement->batchEdit = 'Batch Edit';
|
||||
$lang->measurement->sqlBuilder = 'SQL Builder';
|
||||
$lang->measurement->template = 'Report template';
|
||||
$lang->measurement->model = 'Project Model';
|
||||
|
||||
$lang->measurement->modelList['waterfall'] = 'Waterfall';
|
||||
$lang->measurement->modelList['scrum'] = 'Scrum';
|
||||
|
||||
$lang->measurement->report = new stdclass;
|
||||
$lang->measurement->report->name = 'Report name';
|
||||
$lang->measurement->report->program = 'project';
|
||||
$lang->measurement->report->product = $lang->productCommon;
|
||||
$lang->measurement->report->project = 'stage';
|
||||
$lang->measurement->report->createdBy = 'CreatedBy';
|
||||
$lang->measurement->report->createdDate = 'CreatedDate';
|
||||
|
||||
$lang->measurement->searchMeas = 'Search Measurement';
|
||||
$lang->measurement->designPHP = 'Design PHP';
|
||||
$lang->measurement->designSQL = 'Design SQL';
|
||||
$lang->measurement->initCrontabQueue = 'Initialize Crontab queue';
|
||||
$lang->measurement->execCrontabQueue = 'Execute Crontab queue';
|
||||
$lang->measurement->saveSqlMeasSuccess = 'Query successful, test result: %s';
|
||||
|
||||
$lang->measurement->actionConfig = "Action Config";
|
||||
$lang->measurement->moduleName = 'Module Name';
|
||||
$lang->measurement->actionName = 'Action Name';
|
||||
$lang->measurement->cycleConfig = "Cycle Config";
|
||||
$lang->measurement->execTime = "Execution Time";
|
||||
$lang->measurement->cycleDay = 'Day';
|
||||
$lang->measurement->cycleWeek = 'Week';
|
||||
$lang->measurement->cycleMonth = 'Month';
|
||||
$lang->measurement->every = 'Interval';
|
||||
$lang->measurement->dayNames = array(1 => 'Monday', 2 => 'Tuesday', 3 => 'Wednesday', 4 => 'Thursday', 5 => 'Friday', 6 => 'Saturday', 0 => 'Saturday');
|
||||
|
||||
$lang->measurement->cycleType['day'] = 'Every day %s';
|
||||
$lang->measurement->cycleType['week'] = 'Weekly %s';
|
||||
$lang->measurement->cycleType['month'] = 'Monthly %s';
|
||||
|
||||
$lang->measurement->scopeList[''] = '';
|
||||
$lang->measurement->scopeList['project'] = 'project';
|
||||
$lang->measurement->scopeList['product'] = $lang->productCommon;
|
||||
$lang->measurement->scopeList['sprint'] = 'stage';
|
||||
|
||||
$lang->measurement->purposeList[''] = '';
|
||||
$lang->measurement->purposeList['scale'] = 'Scale';
|
||||
$lang->measurement->purposeList['duration'] = 'Duration';
|
||||
$lang->measurement->purposeList['workload'] = 'Workload';
|
||||
$lang->measurement->purposeList['cost'] = 'Cost';
|
||||
$lang->measurement->purposeList['quality'] = 'Quality';
|
||||
|
||||
$lang->measurement->objectList[''] = '';
|
||||
$lang->measurement->objectList['staff'] = 'Staff';
|
||||
$lang->measurement->objectList['finance'] = 'Task';
|
||||
$lang->measurement->objectList['case'] = 'Case';
|
||||
$lang->measurement->objectList['bug'] = 'Bug';
|
||||
$lang->measurement->objectList['review'] = 'Review';
|
||||
$lang->measurement->objectList['stage'] = 'Stage';
|
||||
$lang->measurement->objectList['program'] = 'Project';
|
||||
$lang->measurement->objectList['softRequest'] = 'Story';
|
||||
$lang->measurement->objectList['userRequest'] = 'Requirements';
|
||||
|
||||
$lang->measurement->typeList['basic'] = $lang->measurement->basicMeas;
|
||||
|
||||
$lang->measurement->sysData = $lang->measurement->typeList;
|
||||
$lang->measurement->sysData['report'] = 'A single report';
|
||||
|
||||
$lang->measurement->collectTypeList['crontab'] = 'Crontab';
|
||||
$lang->measurement->collectTypeList['action'] = 'Action';
|
||||
|
||||
$lang->measurement->buildinParams = new stdclass;
|
||||
$lang->measurement->buildinParams->program = 'Project';
|
||||
$lang->measurement->buildinParams->day = 'Day';
|
||||
|
||||
$lang->measurement->codeExistence = 'Measurement code: %s already exists.';
|
||||
$lang->measurement->codeEmpty = 'The measurement code for ID: %s cannot be empty.';
|
||||
$lang->measurement->nameEmpty = 'The measurement name for ID: %s cannot be empty.';
|
||||
$lang->measurement->unitEmpty = 'The measurement unit for ID: %s cannot be empty.';
|
||||
$lang->measurement->definitionEmpty = 'The measurement definition for ID: %s cannot be empty.';
|
||||
|
||||
$lang->measurement->noticeScope = 'Notice Scope';
|
||||
$lang->measurement->design = 'Design';
|
||||
$lang->measurement->browse = 'Measurements';
|
||||
$lang->measurement->browseBasic = 'Basic Measurement';
|
||||
$lang->measurement->browseDerivation = 'Derived Measurement';
|
||||
$lang->measurement->create = 'Create Measurement';
|
||||
$lang->measurement->createBasic = $lang->measurement->create;
|
||||
$lang->measurement->editBasic = 'Edit Basic Measurement';
|
||||
$lang->measurement->editDerivation = 'Edit Derived Measurement';
|
||||
$lang->measurement->delete = 'Delete';
|
||||
$lang->measurement->deleted = 'Deleted';
|
||||
$lang->measurement->collectType = 'Collect Type';
|
||||
$lang->measurement->collectConf = 'Collect Config';
|
||||
$lang->measurement->collectedBy = 'CollectedBy';
|
||||
$lang->measurement->unit = 'Unit';
|
||||
$lang->measurement->save = 'Save';
|
||||
$lang->measurement->saveSuccess = 'SaveSuccess';
|
||||
$lang->measurement->reDesign = 'The redesign';
|
||||
$lang->measurement->confirmDelete = 'Do you want to delete?';
|
||||
$lang->measurement->options = 'Options';
|
||||
$lang->measurement->id = 'ID';
|
||||
$lang->measurement->createTemplate = 'Creating a composite template';
|
||||
$lang->measurement->createSingle = 'Creating a single template';
|
||||
$lang->measurement->editTemplate = 'Edit Template';
|
||||
$lang->measurement->viewTemplate = 'View Template';
|
||||
$lang->measurement->content = 'Content';
|
||||
$lang->measurement->addMeas = 'Add Measurement';
|
||||
$lang->measurement->dataSource = 'Data Source';
|
||||
$lang->measurement->dataName = 'Data Name';
|
||||
$lang->measurement->setSQL = 'Set SQL';
|
||||
$lang->measurement->setPHP = 'Set PHP';
|
||||
$lang->measurement->callSqlBuilder = 'Call Sql Builder';
|
||||
$lang->measurement->query = 'Query';
|
||||
$lang->measurement->byQuery = 'Search';
|
||||
$lang->measurement->call = 'Call';
|
||||
$lang->measurement->queryResult = 'Query Result:';
|
||||
$lang->measurement->setParams = 'Set Params';
|
||||
$lang->measurement->createdBy = 'CreatedBy';
|
||||
$lang->measurement->createdDate = 'CreatedDate';
|
||||
$lang->measurement->purpose = 'Purpose';
|
||||
$lang->measurement->aim = 'Aim';
|
||||
$lang->measurement->analyst = 'Analyst';
|
||||
$lang->measurement->analysisMethod = 'Analysis Method';
|
||||
|
||||
$lang->measurement->placeholder = new stdclass();
|
||||
$lang->measurement->placeholder->sql = 'Please complete the MySQL custom function statement.';
|
||||
$lang->measurement->placeholder->php = 'Please follow the code required by the system. The class name cannot be changed and must include the GET method.';
|
||||
$lang->measurement->codeTemplate = <<<EOT
|
||||
<?php
|
||||
class %sModel extends model
|
||||
{
|
||||
public function get(\$param1)
|
||||
{
|
||||
return \$param1 + \$param2;
|
||||
}
|
||||
}
|
||||
?>
|
||||
EOT;
|
||||
|
||||
$lang->measurement->sqlTemplate = <<<EOT
|
||||
CREATE FUNCTION `%s`(%s) RETURNS
|
||||
BEGIN
|
||||
|
||||
END
|
||||
EOT;
|
||||
|
||||
$lang->measurement->param = new stdclass();
|
||||
$lang->measurement->param->varName = 'Variable Name';
|
||||
$lang->measurement->param->showName = 'Show Name';
|
||||
$lang->measurement->param->varType = 'Type';
|
||||
$lang->measurement->param->defaultValue = 'Default Value';
|
||||
$lang->measurement->param->queryValue = 'Query Value';
|
||||
|
||||
$lang->measurement->param->typeList['input'] = 'Input';
|
||||
$lang->measurement->param->typeList['date'] = 'Date';
|
||||
$lang->measurement->param->typeList['select'] = 'Select';
|
||||
|
||||
$lang->measurement->param->options['project'] = 'Project List';
|
||||
$lang->measurement->param->options['product'] = $lang->productCommon . 'List';
|
||||
$lang->measurement->param->options['sprint'] = $lang->executionCommon . 'List';
|
||||
|
||||
$lang->measurement->tips = new stdclass();
|
||||
$lang->measurement->tips->nameError = 'Error in MySQL function name, please check function name.';
|
||||
$lang->measurement->tips->createError = 'Failed to create a custom function for MySQL. Error message:<br/> %s';
|
||||
$lang->measurement->tips->noticeSelect = 'SQL statements can only be query statements';
|
||||
$lang->measurement->tips->noticeBlack = 'SQL contains the disable SQL keyword %s';
|
||||
$lang->measurement->tips->noticeVarName = 'The variable name is not set';
|
||||
$lang->measurement->tips->noticeVarType = 'The type of the variable %s is not set';
|
||||
$lang->measurement->tips->noticeShowName = 'The show name of the variable %s is not set';
|
||||
$lang->measurement->tips->noticeQueryValue = 'The query value of the variable %s is not set';
|
||||
$lang->measurement->tips->showNameMissed = 'The show name of the variable %s is not set';
|
||||
$lang->measurement->tips->errorSql = 'SQL statement error! Error:';
|
||||
$lang->measurement->tips->click2SetParams = 'Please click on the red variable block to set parameters, and then';
|
||||
$lang->measurement->tips->view = 'View';
|
||||
$lang->measurement->tips->click2InsertData = "Click <span class='ke-icon-holder'></span> to insert a metric or report";
|
||||
|
||||
$lang->basicmeas = new stdclass();
|
||||
$lang->basicmeas->name = $lang->measurement->name;
|
||||
$lang->basicmeas->code = $lang->measurement->code;
|
||||
$lang->basicmeas->unit = $lang->measurement->unit;
|
||||
$lang->basicmeas->definition = $lang->measurement->definition;
|
||||
|
||||
$lang->derivemeas = new stdclass();
|
||||
$lang->derivemeas->name = $lang->measurement->name;
|
||||
$lang->derivemeas->purpose = $lang->measurement->purpose;
|
||||
|
||||
$lang->meastemplate = new stdclass();
|
||||
$lang->meastemplate->id = 'ID';
|
||||
$lang->meastemplate->single = 'A Single Template';
|
||||
$lang->meastemplate->complex = 'Composite Template';
|
||||
$lang->meastemplate->name = 'Template Name';
|
||||
$lang->meastemplate->desc = 'Description';
|
||||
$lang->meastemplate->content = 'Content';
|
||||
$lang->meastemplate->createdBy = 'CreatedBy';
|
||||
$lang->meastemplate->createdDate = 'CreatedDate';
|
||||
$lang->meastemplate->addedBy = 'AddedBy';
|
||||
$lang->meastemplate->addedDate = 'AddedDate';
|
||||
|
||||
$lang->meastemplate->actions = array();
|
||||
$lang->measurement->actions[] = 'Before unit testing';
|
||||
$lang->measurement->actions[] = 'After the test is complete';
|
||||
$lang->measurement->actions[] = 'Test report review completed';
|
||||
$lang->measurement->actions[] = 'Test Plan Review';
|
||||
$lang->measurement->actions[] = 'Milestone report after review';
|
||||
$lang->measurement->actions[] = 'After Milestone Review';
|
||||
$lang->measurement->actions[] = 'Quantified project monitoring process';
|
||||
$lang->measurement->actions[] = 'Upon completion of stories';
|
||||
$lang->measurement->actions[] = 'After requirements stories';
|
||||
$lang->measurement->actions[] = 'After compiling the stories specification';
|
||||
$lang->measurement->actions[] = 'Stories specification review';
|
||||
$lang->measurement->actions[] = 'After the stories milestone';
|
||||
$lang->measurement->actions[] = 'After the project plan review';
|
||||
$lang->measurement->actions[] = 'The project plan review is completed';
|
||||
|
||||
$lang->measurement->actions['project.close'] = 'End of the project';
|
||||
@@ -0,0 +1,234 @@
|
||||
<?php
|
||||
$lang->measurement->common = 'Measurement';
|
||||
$lang->measurement->setTips = 'Interval Reminder';
|
||||
$lang->measurement->scope = 'Scope';
|
||||
$lang->measurement->object = 'Object';
|
||||
$lang->measurement->purpose = 'Purpose';
|
||||
$lang->measurement->code = 'Code';
|
||||
$lang->measurement->order = 'Order';
|
||||
$lang->measurement->returns = 'Return Type';
|
||||
$lang->measurement->definition = 'Measurement Definition';
|
||||
$lang->measurement->name = 'Measurement Name';
|
||||
$lang->measurement->type = 'Measurement Type';
|
||||
$lang->measurement->params = 'Parameter Settings';
|
||||
$lang->measurement->basicMeas = 'Basic Measurement';
|
||||
$lang->measurement->deriveMeas = 'Derived Measurement';
|
||||
$lang->measurement->measList = 'Measurement List';
|
||||
$lang->measurement->reportList = 'Report List';
|
||||
$lang->measurement->saveReport = 'Save Report';
|
||||
$lang->measurement->saveReportAB = 'Save Report';
|
||||
$lang->measurement->test = 'Test Measurement';
|
||||
$lang->measurement->batchEdit = 'Batch Edit';
|
||||
$lang->measurement->sqlBuilder = 'SQL Builder';
|
||||
$lang->measurement->template = 'Report template';
|
||||
$lang->measurement->model = 'Project Model';
|
||||
|
||||
$lang->measurement->modelList['waterfall'] = 'Waterfall';
|
||||
$lang->measurement->modelList['scrum'] = 'Scrum';
|
||||
|
||||
$lang->measurement->report = new stdclass;
|
||||
$lang->measurement->report->name = 'Report name';
|
||||
$lang->measurement->report->program = 'project';
|
||||
$lang->measurement->report->product = $lang->productCommon;
|
||||
$lang->measurement->report->project = 'stage';
|
||||
$lang->measurement->report->createdBy = 'CreatedBy';
|
||||
$lang->measurement->report->createdDate = 'CreatedDate';
|
||||
|
||||
$lang->measurement->searchMeas = 'Search Measurement';
|
||||
$lang->measurement->designPHP = 'Design PHP';
|
||||
$lang->measurement->designSQL = 'Design SQL';
|
||||
$lang->measurement->initCrontabQueue = 'Initialize Crontab queue';
|
||||
$lang->measurement->execCrontabQueue = 'Execute Crontab queue';
|
||||
$lang->measurement->saveSqlMeasSuccess = 'Query successful, test result: %s';
|
||||
|
||||
$lang->measurement->actionConfig = "Action Config";
|
||||
$lang->measurement->moduleName = 'Module Name';
|
||||
$lang->measurement->actionName = 'Action Name';
|
||||
$lang->measurement->cycleConfig = "Cycle Config";
|
||||
$lang->measurement->execTime = "Execution Time";
|
||||
$lang->measurement->cycleDay = 'Day';
|
||||
$lang->measurement->cycleWeek = 'Week';
|
||||
$lang->measurement->cycleMonth = 'Month';
|
||||
$lang->measurement->every = 'Interval';
|
||||
$lang->measurement->dayNames = array(1 => 'Monday', 2 => 'Tuesday', 3 => 'Wednesday', 4 => 'Thursday', 5 => 'Friday', 6 => 'Saturday', 0 => 'Saturday');
|
||||
|
||||
$lang->measurement->cycleType['day'] = 'Every day %s';
|
||||
$lang->measurement->cycleType['week'] = 'Weekly %s';
|
||||
$lang->measurement->cycleType['month'] = 'Monthly %s';
|
||||
|
||||
$lang->measurement->scopeList[''] = '';
|
||||
$lang->measurement->scopeList['project'] = 'project';
|
||||
$lang->measurement->scopeList['product'] = $lang->productCommon;
|
||||
$lang->measurement->scopeList['sprint'] = 'stage';
|
||||
|
||||
$lang->measurement->purposeList[''] = '';
|
||||
$lang->measurement->purposeList['scale'] = 'Scale';
|
||||
$lang->measurement->purposeList['duration'] = 'Duration';
|
||||
$lang->measurement->purposeList['workload'] = 'Workload';
|
||||
$lang->measurement->purposeList['cost'] = 'Cost';
|
||||
$lang->measurement->purposeList['quality'] = 'Quality';
|
||||
|
||||
$lang->measurement->objectList[''] = '';
|
||||
$lang->measurement->objectList['staff'] = 'Staff';
|
||||
$lang->measurement->objectList['finance'] = 'Task';
|
||||
$lang->measurement->objectList['case'] = 'Case';
|
||||
$lang->measurement->objectList['bug'] = 'Bug';
|
||||
$lang->measurement->objectList['review'] = 'Review';
|
||||
$lang->measurement->objectList['stage'] = 'Stage';
|
||||
$lang->measurement->objectList['program'] = 'Project';
|
||||
$lang->measurement->objectList['softRequest'] = 'Story';
|
||||
$lang->measurement->objectList['userRequest'] = 'Requirements';
|
||||
|
||||
$lang->measurement->typeList['basic'] = $lang->measurement->basicMeas;
|
||||
|
||||
$lang->measurement->sysData = $lang->measurement->typeList;
|
||||
$lang->measurement->sysData['report'] = 'A single report';
|
||||
|
||||
$lang->measurement->collectTypeList['crontab'] = 'Crontab';
|
||||
$lang->measurement->collectTypeList['action'] = 'Action';
|
||||
|
||||
$lang->measurement->buildinParams = new stdclass;
|
||||
$lang->measurement->buildinParams->program = 'Project';
|
||||
$lang->measurement->buildinParams->day = 'Day';
|
||||
|
||||
$lang->measurement->codeExistence = 'Measurement code: %s already exists.';
|
||||
$lang->measurement->codeEmpty = 'The measurement code for ID: %s cannot be empty.';
|
||||
$lang->measurement->nameEmpty = 'The measurement name for ID: %s cannot be empty.';
|
||||
$lang->measurement->unitEmpty = 'The measurement unit for ID: %s cannot be empty.';
|
||||
$lang->measurement->definitionEmpty = 'The measurement definition for ID: %s cannot be empty.';
|
||||
|
||||
$lang->measurement->noticeScope = 'Notice Scope';
|
||||
$lang->measurement->design = 'Design';
|
||||
$lang->measurement->browse = 'Measurements';
|
||||
$lang->measurement->browseBasic = 'Basic Measurement';
|
||||
$lang->measurement->browseDerivation = 'Derived Measurement';
|
||||
$lang->measurement->create = 'Create Measurement';
|
||||
$lang->measurement->createBasic = $lang->measurement->create;
|
||||
$lang->measurement->editBasic = 'Edit Basic Measurement';
|
||||
$lang->measurement->editDerivation = 'Edit Derived Measurement';
|
||||
$lang->measurement->delete = 'Delete';
|
||||
$lang->measurement->deleted = 'Deleted';
|
||||
$lang->measurement->collectType = 'Collect Type';
|
||||
$lang->measurement->collectConf = 'Collect Config';
|
||||
$lang->measurement->collectedBy = 'CollectedBy';
|
||||
$lang->measurement->unit = 'Unit';
|
||||
$lang->measurement->save = 'Save';
|
||||
$lang->measurement->saveSuccess = 'SaveSuccess';
|
||||
$lang->measurement->reDesign = 'The redesign';
|
||||
$lang->measurement->confirmDelete = 'Do you want to delete?';
|
||||
$lang->measurement->options = 'Options';
|
||||
$lang->measurement->id = 'ID';
|
||||
$lang->measurement->createTemplate = 'Creating a composite template';
|
||||
$lang->measurement->createSingle = 'Creating a single template';
|
||||
$lang->measurement->editTemplate = 'Edit Template';
|
||||
$lang->measurement->viewTemplate = 'View Template';
|
||||
$lang->measurement->content = 'Content';
|
||||
$lang->measurement->addMeas = 'Add Measurement';
|
||||
$lang->measurement->dataSource = 'Data Source';
|
||||
$lang->measurement->dataName = 'Data Name';
|
||||
$lang->measurement->setSQL = 'Set SQL';
|
||||
$lang->measurement->setPHP = 'Set PHP';
|
||||
$lang->measurement->callSqlBuilder = 'Call Sql Builder';
|
||||
$lang->measurement->query = 'Query';
|
||||
$lang->measurement->byQuery = 'Search';
|
||||
$lang->measurement->call = 'Call';
|
||||
$lang->measurement->queryResult = 'Query Result:';
|
||||
$lang->measurement->setParams = 'Set Params';
|
||||
$lang->measurement->createdBy = 'CreatedBy';
|
||||
$lang->measurement->createdDate = 'CreatedDate';
|
||||
$lang->measurement->purpose = 'Purpose';
|
||||
$lang->measurement->aim = 'Aim';
|
||||
$lang->measurement->analyst = 'Analyst';
|
||||
$lang->measurement->analysisMethod = 'Analysis Method';
|
||||
|
||||
$lang->measurement->placeholder = new stdclass();
|
||||
$lang->measurement->placeholder->sql = 'Please complete the MySQL custom function statement.';
|
||||
$lang->measurement->placeholder->php = 'Please follow the code required by the system. The class name cannot be changed and must include the GET method.';
|
||||
$lang->measurement->codeTemplate = <<<EOT
|
||||
<?php
|
||||
class %sModel extends model
|
||||
{
|
||||
public function get(\$param1)
|
||||
{
|
||||
return \$param1 + \$param2;
|
||||
}
|
||||
}
|
||||
?>
|
||||
EOT;
|
||||
|
||||
$lang->measurement->sqlTemplate = <<<EOT
|
||||
CREATE FUNCTION `%s`(%s) RETURNS
|
||||
BEGIN
|
||||
|
||||
END
|
||||
EOT;
|
||||
|
||||
$lang->measurement->param = new stdclass();
|
||||
$lang->measurement->param->varName = 'Variable Name';
|
||||
$lang->measurement->param->showName = 'Show Name';
|
||||
$lang->measurement->param->varType = 'Type';
|
||||
$lang->measurement->param->defaultValue = 'Default Value';
|
||||
$lang->measurement->param->queryValue = 'Query Value';
|
||||
|
||||
$lang->measurement->param->typeList['input'] = 'Input';
|
||||
$lang->measurement->param->typeList['date'] = 'Date';
|
||||
$lang->measurement->param->typeList['select'] = 'Select';
|
||||
|
||||
$lang->measurement->param->options['project'] = 'Project List';
|
||||
$lang->measurement->param->options['product'] = $lang->productCommon . 'List';
|
||||
$lang->measurement->param->options['sprint'] = $lang->executionCommon . 'List';
|
||||
|
||||
$lang->measurement->tips = new stdclass();
|
||||
$lang->measurement->tips->nameError = 'Error in MySQL function name, please check function name.';
|
||||
$lang->measurement->tips->createError = 'Failed to create a custom function for MySQL. Error message:<br/> %s';
|
||||
$lang->measurement->tips->noticeSelect = 'SQL statements can only be query statements';
|
||||
$lang->measurement->tips->noticeBlack = 'SQL contains the disable SQL keyword %s';
|
||||
$lang->measurement->tips->noticeVarName = 'The variable name is not set';
|
||||
$lang->measurement->tips->noticeVarType = 'The type of the variable %s is not set';
|
||||
$lang->measurement->tips->noticeShowName = 'The show name of the variable %s is not set';
|
||||
$lang->measurement->tips->noticeQueryValue = 'The query value of the variable %s is not set';
|
||||
$lang->measurement->tips->showNameMissed = 'The show name of the variable %s is not set';
|
||||
$lang->measurement->tips->errorSql = 'SQL statement error! Error:';
|
||||
$lang->measurement->tips->click2SetParams = 'Please click on the red variable block to set parameters, and then';
|
||||
$lang->measurement->tips->view = 'View';
|
||||
$lang->measurement->tips->click2InsertData = "Click <span class='ke-icon-holder'></span> to insert a metric or report";
|
||||
|
||||
$lang->basicmeas = new stdclass();
|
||||
$lang->basicmeas->name = $lang->measurement->name;
|
||||
$lang->basicmeas->code = $lang->measurement->code;
|
||||
$lang->basicmeas->unit = $lang->measurement->unit;
|
||||
$lang->basicmeas->definition = $lang->measurement->definition;
|
||||
|
||||
$lang->derivemeas = new stdclass();
|
||||
$lang->derivemeas->name = $lang->measurement->name;
|
||||
$lang->derivemeas->purpose = $lang->measurement->purpose;
|
||||
|
||||
$lang->meastemplate = new stdclass();
|
||||
$lang->meastemplate->id = 'ID';
|
||||
$lang->meastemplate->single = 'A Single Template';
|
||||
$lang->meastemplate->complex = 'Composite Template';
|
||||
$lang->meastemplate->name = 'Template Name';
|
||||
$lang->meastemplate->desc = 'Description';
|
||||
$lang->meastemplate->content = 'Content';
|
||||
$lang->meastemplate->createdBy = 'CreatedBy';
|
||||
$lang->meastemplate->createdDate = 'CreatedDate';
|
||||
$lang->meastemplate->addedBy = 'AddedBy';
|
||||
$lang->meastemplate->addedDate = 'AddedDate';
|
||||
|
||||
$lang->meastemplate->actions = array();
|
||||
$lang->measurement->actions[] = 'Before unit testing';
|
||||
$lang->measurement->actions[] = 'After the test is complete';
|
||||
$lang->measurement->actions[] = 'Test report review completed';
|
||||
$lang->measurement->actions[] = 'Test Plan Review';
|
||||
$lang->measurement->actions[] = 'Milestone report after review';
|
||||
$lang->measurement->actions[] = 'After Milestone Review';
|
||||
$lang->measurement->actions[] = 'Quantified project monitoring process';
|
||||
$lang->measurement->actions[] = 'Upon completion of stories';
|
||||
$lang->measurement->actions[] = 'After requirements stories';
|
||||
$lang->measurement->actions[] = 'After compiling the stories specification';
|
||||
$lang->measurement->actions[] = 'Stories specification review';
|
||||
$lang->measurement->actions[] = 'After the stories milestone';
|
||||
$lang->measurement->actions[] = 'After the project plan review';
|
||||
$lang->measurement->actions[] = 'The project plan review is completed';
|
||||
|
||||
$lang->measurement->actions['project.close'] = 'End of the project';
|
||||
@@ -0,0 +1,234 @@
|
||||
<?php
|
||||
$lang->measurement->common = 'Measurement';
|
||||
$lang->measurement->setTips = 'Interval Reminder';
|
||||
$lang->measurement->scope = 'Scope';
|
||||
$lang->measurement->object = 'Object';
|
||||
$lang->measurement->purpose = 'Purpose';
|
||||
$lang->measurement->code = 'Code';
|
||||
$lang->measurement->order = 'Order';
|
||||
$lang->measurement->returns = 'Return Type';
|
||||
$lang->measurement->definition = 'Measurement Definition';
|
||||
$lang->measurement->name = 'Measurement Name';
|
||||
$lang->measurement->type = 'Measurement Type';
|
||||
$lang->measurement->params = 'Parameter Settings';
|
||||
$lang->measurement->basicMeas = 'Basic Measurement';
|
||||
$lang->measurement->deriveMeas = 'Derived Measurement';
|
||||
$lang->measurement->measList = 'Measurement List';
|
||||
$lang->measurement->reportList = 'Report List';
|
||||
$lang->measurement->saveReport = 'Save Report';
|
||||
$lang->measurement->saveReportAB = 'Save Report';
|
||||
$lang->measurement->test = 'Test Measurement';
|
||||
$lang->measurement->batchEdit = 'Batch Edit';
|
||||
$lang->measurement->sqlBuilder = 'SQL Builder';
|
||||
$lang->measurement->template = 'Report template';
|
||||
$lang->measurement->model = 'Project Model';
|
||||
|
||||
$lang->measurement->modelList['waterfall'] = 'Waterfall';
|
||||
$lang->measurement->modelList['scrum'] = 'Scrum';
|
||||
|
||||
$lang->measurement->report = new stdclass;
|
||||
$lang->measurement->report->name = 'Report name';
|
||||
$lang->measurement->report->program = 'project';
|
||||
$lang->measurement->report->product = $lang->productCommon;
|
||||
$lang->measurement->report->project = 'stage';
|
||||
$lang->measurement->report->createdBy = 'CreatedBy';
|
||||
$lang->measurement->report->createdDate = 'CreatedDate';
|
||||
|
||||
$lang->measurement->searchMeas = 'Search Measurement';
|
||||
$lang->measurement->designPHP = 'Design PHP';
|
||||
$lang->measurement->designSQL = 'Design SQL';
|
||||
$lang->measurement->initCrontabQueue = 'Initialize Crontab queue';
|
||||
$lang->measurement->execCrontabQueue = 'Execute Crontab queue';
|
||||
$lang->measurement->saveSqlMeasSuccess = 'Query successful, test result: %s';
|
||||
|
||||
$lang->measurement->actionConfig = "Action Config";
|
||||
$lang->measurement->moduleName = 'Module Name';
|
||||
$lang->measurement->actionName = 'Action Name';
|
||||
$lang->measurement->cycleConfig = "Cycle Config";
|
||||
$lang->measurement->execTime = "Execution Time";
|
||||
$lang->measurement->cycleDay = 'Day';
|
||||
$lang->measurement->cycleWeek = 'Week';
|
||||
$lang->measurement->cycleMonth = 'Month';
|
||||
$lang->measurement->every = 'Interval';
|
||||
$lang->measurement->dayNames = array(1 => 'Monday', 2 => 'Tuesday', 3 => 'Wednesday', 4 => 'Thursday', 5 => 'Friday', 6 => 'Saturday', 0 => 'Saturday');
|
||||
|
||||
$lang->measurement->cycleType['day'] = 'Every day %s';
|
||||
$lang->measurement->cycleType['week'] = 'Weekly %s';
|
||||
$lang->measurement->cycleType['month'] = 'Monthly %s';
|
||||
|
||||
$lang->measurement->scopeList[''] = '';
|
||||
$lang->measurement->scopeList['project'] = 'project';
|
||||
$lang->measurement->scopeList['product'] = $lang->productCommon;
|
||||
$lang->measurement->scopeList['sprint'] = 'stage';
|
||||
|
||||
$lang->measurement->purposeList[''] = '';
|
||||
$lang->measurement->purposeList['scale'] = 'Scale';
|
||||
$lang->measurement->purposeList['duration'] = 'Duration';
|
||||
$lang->measurement->purposeList['workload'] = 'Workload';
|
||||
$lang->measurement->purposeList['cost'] = 'Cost';
|
||||
$lang->measurement->purposeList['quality'] = 'Quality';
|
||||
|
||||
$lang->measurement->objectList[''] = '';
|
||||
$lang->measurement->objectList['staff'] = 'Staff';
|
||||
$lang->measurement->objectList['finance'] = 'Task';
|
||||
$lang->measurement->objectList['case'] = 'Case';
|
||||
$lang->measurement->objectList['bug'] = 'Bug';
|
||||
$lang->measurement->objectList['review'] = 'Review';
|
||||
$lang->measurement->objectList['stage'] = 'Stage';
|
||||
$lang->measurement->objectList['program'] = 'Project';
|
||||
$lang->measurement->objectList['softRequest'] = 'Story';
|
||||
$lang->measurement->objectList['userRequest'] = 'Requirements';
|
||||
|
||||
$lang->measurement->typeList['basic'] = $lang->measurement->basicMeas;
|
||||
|
||||
$lang->measurement->sysData = $lang->measurement->typeList;
|
||||
$lang->measurement->sysData['report'] = 'A single report';
|
||||
|
||||
$lang->measurement->collectTypeList['crontab'] = 'Crontab';
|
||||
$lang->measurement->collectTypeList['action'] = 'Action';
|
||||
|
||||
$lang->measurement->buildinParams = new stdclass;
|
||||
$lang->measurement->buildinParams->program = 'Project';
|
||||
$lang->measurement->buildinParams->day = 'Day';
|
||||
|
||||
$lang->measurement->codeExistence = 'Measurement code: %s already exists.';
|
||||
$lang->measurement->codeEmpty = 'The measurement code for ID: %s cannot be empty.';
|
||||
$lang->measurement->nameEmpty = 'The measurement name for ID: %s cannot be empty.';
|
||||
$lang->measurement->unitEmpty = 'The measurement unit for ID: %s cannot be empty.';
|
||||
$lang->measurement->definitionEmpty = 'The measurement definition for ID: %s cannot be empty.';
|
||||
|
||||
$lang->measurement->noticeScope = 'Notice Scope';
|
||||
$lang->measurement->design = 'Design';
|
||||
$lang->measurement->browse = 'Measurements';
|
||||
$lang->measurement->browseBasic = 'Basic Measurement';
|
||||
$lang->measurement->browseDerivation = 'Derived Measurement';
|
||||
$lang->measurement->create = 'Create Measurement';
|
||||
$lang->measurement->createBasic = $lang->measurement->create;
|
||||
$lang->measurement->editBasic = 'Edit Basic Measurement';
|
||||
$lang->measurement->editDerivation = 'Edit Derived Measurement';
|
||||
$lang->measurement->delete = 'Delete';
|
||||
$lang->measurement->deleted = 'Deleted';
|
||||
$lang->measurement->collectType = 'Collect Type';
|
||||
$lang->measurement->collectConf = 'Collect Config';
|
||||
$lang->measurement->collectedBy = 'CollectedBy';
|
||||
$lang->measurement->unit = 'Unit';
|
||||
$lang->measurement->save = 'Save';
|
||||
$lang->measurement->saveSuccess = 'SaveSuccess';
|
||||
$lang->measurement->reDesign = 'The redesign';
|
||||
$lang->measurement->confirmDelete = 'Do you want to delete?';
|
||||
$lang->measurement->options = 'Options';
|
||||
$lang->measurement->id = 'ID';
|
||||
$lang->measurement->createTemplate = 'Creating a composite template';
|
||||
$lang->measurement->createSingle = 'Creating a single template';
|
||||
$lang->measurement->editTemplate = 'Edit Template';
|
||||
$lang->measurement->viewTemplate = 'View Template';
|
||||
$lang->measurement->content = 'Content';
|
||||
$lang->measurement->addMeas = 'Add Measurement';
|
||||
$lang->measurement->dataSource = 'Data Source';
|
||||
$lang->measurement->dataName = 'Data Name';
|
||||
$lang->measurement->setSQL = 'Set SQL';
|
||||
$lang->measurement->setPHP = 'Set PHP';
|
||||
$lang->measurement->callSqlBuilder = 'Call Sql Builder';
|
||||
$lang->measurement->query = 'Query';
|
||||
$lang->measurement->byQuery = 'Search';
|
||||
$lang->measurement->call = 'Call';
|
||||
$lang->measurement->queryResult = 'Query Result:';
|
||||
$lang->measurement->setParams = 'Set Params';
|
||||
$lang->measurement->createdBy = 'CreatedBy';
|
||||
$lang->measurement->createdDate = 'CreatedDate';
|
||||
$lang->measurement->purpose = 'Purpose';
|
||||
$lang->measurement->aim = 'Aim';
|
||||
$lang->measurement->analyst = 'Analyst';
|
||||
$lang->measurement->analysisMethod = 'Analysis Method';
|
||||
|
||||
$lang->measurement->placeholder = new stdclass();
|
||||
$lang->measurement->placeholder->sql = 'Please complete the MySQL custom function statement.';
|
||||
$lang->measurement->placeholder->php = 'Please follow the code required by the system. The class name cannot be changed and must include the GET method.';
|
||||
$lang->measurement->codeTemplate = <<<EOT
|
||||
<?php
|
||||
class %sModel extends model
|
||||
{
|
||||
public function get(\$param1)
|
||||
{
|
||||
return \$param1 + \$param2;
|
||||
}
|
||||
}
|
||||
?>
|
||||
EOT;
|
||||
|
||||
$lang->measurement->sqlTemplate = <<<EOT
|
||||
CREATE FUNCTION `%s`(%s) RETURNS
|
||||
BEGIN
|
||||
|
||||
END
|
||||
EOT;
|
||||
|
||||
$lang->measurement->param = new stdclass();
|
||||
$lang->measurement->param->varName = 'Variable Name';
|
||||
$lang->measurement->param->showName = 'Show Name';
|
||||
$lang->measurement->param->varType = 'Type';
|
||||
$lang->measurement->param->defaultValue = 'Default Value';
|
||||
$lang->measurement->param->queryValue = 'Query Value';
|
||||
|
||||
$lang->measurement->param->typeList['input'] = 'Input';
|
||||
$lang->measurement->param->typeList['date'] = 'Date';
|
||||
$lang->measurement->param->typeList['select'] = 'Select';
|
||||
|
||||
$lang->measurement->param->options['project'] = 'Project List';
|
||||
$lang->measurement->param->options['product'] = $lang->productCommon . 'List';
|
||||
$lang->measurement->param->options['sprint'] = $lang->executionCommon . 'List';
|
||||
|
||||
$lang->measurement->tips = new stdclass();
|
||||
$lang->measurement->tips->nameError = 'Error in MySQL function name, please check function name.';
|
||||
$lang->measurement->tips->createError = 'Failed to create a custom function for MySQL. Error message:<br/> %s';
|
||||
$lang->measurement->tips->noticeSelect = 'SQL statements can only be query statements';
|
||||
$lang->measurement->tips->noticeBlack = 'SQL contains the disable SQL keyword %s';
|
||||
$lang->measurement->tips->noticeVarName = 'The variable name is not set';
|
||||
$lang->measurement->tips->noticeVarType = 'The type of the variable %s is not set';
|
||||
$lang->measurement->tips->noticeShowName = 'The show name of the variable %s is not set';
|
||||
$lang->measurement->tips->noticeQueryValue = 'The query value of the variable %s is not set';
|
||||
$lang->measurement->tips->showNameMissed = 'The show name of the variable %s is not set';
|
||||
$lang->measurement->tips->errorSql = 'SQL statement error! Error:';
|
||||
$lang->measurement->tips->click2SetParams = 'Please click on the red variable block to set parameters, and then';
|
||||
$lang->measurement->tips->view = 'View';
|
||||
$lang->measurement->tips->click2InsertData = "Click <span class='ke-icon-holder'></span> to insert a metric or report";
|
||||
|
||||
$lang->basicmeas = new stdclass();
|
||||
$lang->basicmeas->name = $lang->measurement->name;
|
||||
$lang->basicmeas->code = $lang->measurement->code;
|
||||
$lang->basicmeas->unit = $lang->measurement->unit;
|
||||
$lang->basicmeas->definition = $lang->measurement->definition;
|
||||
|
||||
$lang->derivemeas = new stdclass();
|
||||
$lang->derivemeas->name = $lang->measurement->name;
|
||||
$lang->derivemeas->purpose = $lang->measurement->purpose;
|
||||
|
||||
$lang->meastemplate = new stdclass();
|
||||
$lang->meastemplate->id = 'ID';
|
||||
$lang->meastemplate->single = 'A Single Template';
|
||||
$lang->meastemplate->complex = 'Composite Template';
|
||||
$lang->meastemplate->name = 'Template Name';
|
||||
$lang->meastemplate->desc = 'Description';
|
||||
$lang->meastemplate->content = 'Content';
|
||||
$lang->meastemplate->createdBy = 'CreatedBy';
|
||||
$lang->meastemplate->createdDate = 'CreatedDate';
|
||||
$lang->meastemplate->addedBy = 'AddedBy';
|
||||
$lang->meastemplate->addedDate = 'AddedDate';
|
||||
|
||||
$lang->meastemplate->actions = array();
|
||||
$lang->measurement->actions[] = 'Before unit testing';
|
||||
$lang->measurement->actions[] = 'After the test is complete';
|
||||
$lang->measurement->actions[] = 'Test report review completed';
|
||||
$lang->measurement->actions[] = 'Test Plan Review';
|
||||
$lang->measurement->actions[] = 'Milestone report after review';
|
||||
$lang->measurement->actions[] = 'After Milestone Review';
|
||||
$lang->measurement->actions[] = 'Quantified project monitoring process';
|
||||
$lang->measurement->actions[] = 'Upon completion of stories';
|
||||
$lang->measurement->actions[] = 'After requirements stories';
|
||||
$lang->measurement->actions[] = 'After compiling the stories specification';
|
||||
$lang->measurement->actions[] = 'Stories specification review';
|
||||
$lang->measurement->actions[] = 'After the stories milestone';
|
||||
$lang->measurement->actions[] = 'After the project plan review';
|
||||
$lang->measurement->actions[] = 'The project plan review is completed';
|
||||
|
||||
$lang->measurement->actions['project.close'] = 'End of the project';
|
||||
@@ -0,0 +1,234 @@
|
||||
<?php
|
||||
$lang->measurement->common = '度量';
|
||||
$lang->measurement->setTips = '区间提示';
|
||||
$lang->measurement->scope = '范围';
|
||||
$lang->measurement->object = '对象';
|
||||
$lang->measurement->purpose = '目的';
|
||||
$lang->measurement->code = '代号';
|
||||
$lang->measurement->order = '排序';
|
||||
$lang->measurement->returns = '返回类型';
|
||||
$lang->measurement->definition = '度量定义';
|
||||
$lang->measurement->name = '度量名称';
|
||||
$lang->measurement->type = '度量类型';
|
||||
$lang->measurement->params = '参数设置';
|
||||
$lang->measurement->basicMeas = '基本度量';
|
||||
$lang->measurement->deriveMeas = '衍生度量';
|
||||
$lang->measurement->measList = '度量列表';
|
||||
$lang->measurement->reportList = '报告列表';
|
||||
$lang->measurement->saveReport = '保存此报告';
|
||||
$lang->measurement->saveReportAB = '保存报告';
|
||||
$lang->measurement->test = '测试度量';
|
||||
$lang->measurement->batchEdit = '批量编辑';
|
||||
$lang->measurement->sqlBuilder = '度量数据';
|
||||
$lang->measurement->template = '报表模板';
|
||||
$lang->measurement->model = '项目模型';
|
||||
|
||||
$lang->measurement->modelList['waterfall'] = '瀑布';
|
||||
$lang->measurement->modelList['scrum'] = '敏捷';
|
||||
|
||||
$lang->measurement->report = new stdclass;
|
||||
$lang->measurement->report->name = '报告名称';
|
||||
$lang->measurement->report->program = '项目';
|
||||
$lang->measurement->report->product = '产品';
|
||||
$lang->measurement->report->project = '阶段';
|
||||
$lang->measurement->report->createdBy = '创建人';
|
||||
$lang->measurement->report->createdDate = '创建时间';
|
||||
|
||||
$lang->measurement->searchMeas = "搜索度量";
|
||||
$lang->measurement->designPHP = "设置PHP";
|
||||
$lang->measurement->designSQL = "设置度量SQL";
|
||||
$lang->measurement->initCrontabQueue = "初始化计划任务队列";
|
||||
$lang->measurement->execCrontabQueue = "处理计划任务队列";
|
||||
$lang->measurement->saveSqlMeasSuccess = "查询成功,测试结果:%s";
|
||||
|
||||
$lang->measurement->actionConfig = "动作设置";
|
||||
$lang->measurement->moduleName = '模块名称';
|
||||
$lang->measurement->actionName = '动作名称';
|
||||
$lang->measurement->cycleConfig = "定时设置";
|
||||
$lang->measurement->execTime = "执行时间";
|
||||
$lang->measurement->cycleDay = '天';
|
||||
$lang->measurement->cycleWeek = '周';
|
||||
$lang->measurement->cycleMonth = '月';
|
||||
$lang->measurement->every = '间隔';
|
||||
$lang->measurement->dayNames = array(1 => '星期一', 2 => '星期二', 3 => '星期三', 4 => '星期四', 5 => '星期五', 6 => '星期六', 0 => '星期日');
|
||||
|
||||
$lang->measurement->cycleType['day'] = '每隔%s天';
|
||||
$lang->measurement->cycleType['week'] = '每周%s';
|
||||
$lang->measurement->cycleType['month'] = '每月%s';
|
||||
|
||||
$lang->measurement->scopeList[''] = '';
|
||||
$lang->measurement->scopeList['project'] = '项目';
|
||||
$lang->measurement->scopeList['product'] = '产品';
|
||||
$lang->measurement->scopeList['sprint'] = '阶段';
|
||||
|
||||
$lang->measurement->purposeList[''] = '';
|
||||
$lang->measurement->purposeList['scale'] = '规模';
|
||||
$lang->measurement->purposeList['duration'] = '工期';
|
||||
$lang->measurement->purposeList['workload'] = '工作量';
|
||||
$lang->measurement->purposeList['cost'] = '成本';
|
||||
$lang->measurement->purposeList['quality'] = '质量';
|
||||
|
||||
$lang->measurement->objectList[''] = '';
|
||||
$lang->measurement->objectList['staff'] = '人员';
|
||||
$lang->measurement->objectList['finance'] = '任务';
|
||||
$lang->measurement->objectList['case'] = '用例';
|
||||
$lang->measurement->objectList['bug'] = '缺陷';
|
||||
$lang->measurement->objectList['review'] = '评审';
|
||||
$lang->measurement->objectList['stage'] = '阶段';
|
||||
$lang->measurement->objectList['program'] = '项目';
|
||||
$lang->measurement->objectList['softRequest'] = '软件需求';
|
||||
$lang->measurement->objectList['userRequest'] = '用户需求';
|
||||
|
||||
$lang->measurement->typeList['basic'] = $lang->measurement->basicMeas;
|
||||
|
||||
$lang->measurement->sysData = $lang->measurement->typeList;
|
||||
$lang->measurement->sysData['report'] = '单一报表';
|
||||
|
||||
$lang->measurement->collectTypeList['crontab'] = '定时计划';
|
||||
$lang->measurement->collectTypeList['action'] = '动作触发';
|
||||
|
||||
$lang->measurement->buildinParams = new stdclass;
|
||||
$lang->measurement->buildinParams->program = '项目';
|
||||
$lang->measurement->buildinParams->day = '日期';
|
||||
|
||||
$lang->measurement->codeExistence = '度量代号:%s已存在。';
|
||||
$lang->measurement->codeEmpty = 'ID:%s的度量代号不能为空。';
|
||||
$lang->measurement->nameEmpty = 'ID:%s的度量名称不能为空。';
|
||||
$lang->measurement->unitEmpty = 'ID:%s的度量单位不能为空。';
|
||||
$lang->measurement->definitionEmpty = 'ID:%s的度量定义不能为空。';
|
||||
|
||||
$lang->measurement->noticeScope = '通知范围';
|
||||
$lang->measurement->design = '设计';
|
||||
$lang->measurement->browse = '浏览列表';
|
||||
$lang->measurement->browseBasic = '基本度量';
|
||||
$lang->measurement->browseDerivation = '衍生度量';
|
||||
$lang->measurement->create = '创建新度量';
|
||||
$lang->measurement->createBasic = $lang->measurement->create;
|
||||
$lang->measurement->editBasic = '编辑基本度量';
|
||||
$lang->measurement->editDerivation = '编辑衍生度量';
|
||||
$lang->measurement->delete = '删除';
|
||||
$lang->measurement->deleted = '已删除';
|
||||
$lang->measurement->collectType = '收集方式';
|
||||
$lang->measurement->collectConf = '收集配置';
|
||||
$lang->measurement->collectedBy = '收集人';
|
||||
$lang->measurement->unit = '度量单位';
|
||||
$lang->measurement->save = '保存';
|
||||
$lang->measurement->saveSuccess = '保存成功';
|
||||
$lang->measurement->reDesign = '重新设计';
|
||||
$lang->measurement->confirmDelete = '确定删除吗?';
|
||||
$lang->measurement->options = '操作';
|
||||
$lang->measurement->id = '编号';
|
||||
$lang->measurement->createTemplate = '创建复合模板';
|
||||
$lang->measurement->createSingle = '创建单一模板';
|
||||
$lang->measurement->editTemplate = '编辑模板';
|
||||
$lang->measurement->viewTemplate = '查看模板';
|
||||
$lang->measurement->content = '内容';
|
||||
$lang->measurement->addMeas = '添加度量项';
|
||||
$lang->measurement->dataSource = '数据源';
|
||||
$lang->measurement->dataName = '数据标识';
|
||||
$lang->measurement->setSQL = '设置SQL语句';
|
||||
$lang->measurement->setPHP = '设置PHP代码';
|
||||
$lang->measurement->callSqlBuilder = '调用SQL构建器';
|
||||
$lang->measurement->query = '查询';
|
||||
$lang->measurement->byQuery = '搜索';
|
||||
$lang->measurement->call = '调用';
|
||||
$lang->measurement->queryResult = '查询结果:';
|
||||
$lang->measurement->setParams = '设置参数';
|
||||
$lang->measurement->createdBy = '由谁创建';
|
||||
$lang->measurement->createdDate = '创建日期';
|
||||
$lang->measurement->purpose = '目的';
|
||||
$lang->measurement->aim = '度量目标';
|
||||
$lang->measurement->analyst = '分析人';
|
||||
$lang->measurement->analysisMethod = '分析方法';
|
||||
|
||||
$lang->measurement->placeholder = new stdclass();
|
||||
$lang->measurement->placeholder->sql = '请填写完整的mysql自定义函数语句。';
|
||||
$lang->measurement->placeholder->php = '请按照系统要求的编码,类名不能修改,必须包含get 方法。';
|
||||
$lang->measurement->codeTemplate = <<<EOT
|
||||
<?php
|
||||
class %sModel extends model
|
||||
{
|
||||
public function get(\$param1)
|
||||
{
|
||||
return \$param1 + \$param2;
|
||||
}
|
||||
}
|
||||
?>
|
||||
EOT;
|
||||
|
||||
$lang->measurement->sqlTemplate = <<<EOT
|
||||
CREATE FUNCTION `%s`(%s) RETURNS
|
||||
BEGIN
|
||||
|
||||
END
|
||||
EOT;
|
||||
|
||||
$lang->measurement->param = new stdclass();
|
||||
$lang->measurement->param->varName = '变量名';
|
||||
$lang->measurement->param->showName = '显示名';
|
||||
$lang->measurement->param->varType = '类型';
|
||||
$lang->measurement->param->defaultValue = '默认值';
|
||||
$lang->measurement->param->queryValue = '测试值';
|
||||
|
||||
$lang->measurement->param->typeList['input'] = '文本框';
|
||||
$lang->measurement->param->typeList['date'] = '日期';
|
||||
$lang->measurement->param->typeList['select'] = '下拉菜单';
|
||||
|
||||
$lang->measurement->param->options['project'] = '项目列表';
|
||||
$lang->measurement->param->options['product'] = $lang->productCommon . '列表';
|
||||
$lang->measurement->param->options['sprint'] = $lang->executionCommon . '列表';
|
||||
|
||||
$lang->measurement->tips = new stdclass();
|
||||
$lang->measurement->tips->nameError = 'Mysql 自定义函数名错误,请检查函数名。';
|
||||
$lang->measurement->tips->createError = "创建 Mysql 自定义函数失败,错误信息:<br/> %s";
|
||||
$lang->measurement->tips->noticeSelect = 'SQL语句只能是查询语句';
|
||||
$lang->measurement->tips->noticeBlack = 'SQL中含有禁用SQL关键字 %s';
|
||||
$lang->measurement->tips->noticeVarName = '变量名称没有设置';
|
||||
$lang->measurement->tips->noticeVarType = '变量 %s 的类型没有设置';
|
||||
$lang->measurement->tips->noticeShowName = '变量 %s 的显示名称没有设置';
|
||||
$lang->measurement->tips->noticeQueryValue = '变量 %s 的测试值没有设置。';
|
||||
$lang->measurement->tips->showNameMissed = '变量 %s 的显示名没有设置。';
|
||||
$lang->measurement->tips->errorSql = 'SQL语句有错!错误:';
|
||||
$lang->measurement->tips->click2SetParams = '请先点击红色变量块设置参数,然后';
|
||||
$lang->measurement->tips->view = '预览';
|
||||
$lang->measurement->tips->click2InsertData = "点击 <span class='ke-icon-holder'></span> 来插入度量指标或报表";
|
||||
|
||||
$lang->basicmeas = new stdclass();
|
||||
$lang->basicmeas->name = $lang->measurement->name;
|
||||
$lang->basicmeas->code = $lang->measurement->code;
|
||||
$lang->basicmeas->unit = $lang->measurement->unit;
|
||||
$lang->basicmeas->definition = $lang->measurement->definition;
|
||||
|
||||
$lang->derivemeas = new stdclass();
|
||||
$lang->derivemeas->name = $lang->measurement->name;
|
||||
$lang->derivemeas->purpose = $lang->measurement->purpose;
|
||||
|
||||
$lang->meastemplate = new stdclass();
|
||||
$lang->meastemplate->id = '编号';
|
||||
$lang->meastemplate->single = '单一模板';
|
||||
$lang->meastemplate->complex = '复合模板';
|
||||
$lang->meastemplate->name = '模板名称';
|
||||
$lang->meastemplate->desc = '描述';
|
||||
$lang->meastemplate->content = '内容';
|
||||
$lang->meastemplate->createdBy = '由谁创建';
|
||||
$lang->meastemplate->createdDate = '创建时间';
|
||||
$lang->meastemplate->addedBy = '由谁创建';
|
||||
$lang->meastemplate->addedDate = '创建时间';
|
||||
|
||||
$lang->meastemplate->actions = array();
|
||||
$lang->measurement->actions[] = '单元测试前';
|
||||
$lang->measurement->actions[] = '测试完成后';
|
||||
$lang->measurement->actions[] = '测试报告评审结束';
|
||||
$lang->measurement->actions[] = '测试计划评审';
|
||||
$lang->measurement->actions[] = '里程碑报告评审后';
|
||||
$lang->measurement->actions[] = '里程碑评审过后';
|
||||
$lang->measurement->actions[] = '量化项目监控过程中';
|
||||
$lang->measurement->actions[] = '需求完成后';
|
||||
$lang->measurement->actions[] = '需求评审后';
|
||||
$lang->measurement->actions[] = '需求说明书编撰完成后';
|
||||
$lang->measurement->actions[] = '需求说明书评审';
|
||||
$lang->measurement->actions[] = '需求里程碑过后';
|
||||
$lang->measurement->actions[] = '项目计划评审后';
|
||||
$lang->measurement->actions[] = '项目计划评审结束';
|
||||
|
||||
$lang->measurement->actions['project.close'] = '项目结束';
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,58 @@
|
||||
<?php if($sysData->type == 'basic'):?>
|
||||
<div id='<?php echo $controlID?>'>
|
||||
<table class='table table-form'>
|
||||
<?php foreach($params as $param):?>
|
||||
<tr>
|
||||
<th class='w-120px'><?php echo $param['showName'];?></td>
|
||||
<td>
|
||||
<?php
|
||||
$defaultValue = isset($param['defaultValue']) ? $param['defaultValue'] : '';
|
||||
echo $this->measurement->buildParamControl($param['varName'], $param['varType'], $defaultValue, $param['options'], $controlID);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if($sysData->type == 'derive'):?>
|
||||
<?php foreach($params as $index => $basicParams):?>
|
||||
<div id='<?php echo $controlID?>'>
|
||||
<table class='table table-form'>
|
||||
<thead>
|
||||
<th colspan='2'></th>
|
||||
</thead>
|
||||
<?php foreach($basicParams as $param):?>
|
||||
<tr>
|
||||
<th class='w-120px'><?php echo $param['showName'];?></td>
|
||||
<td>
|
||||
<?php
|
||||
$defaultValue = isset($param['defaultValue']) ? $param['defaultValue'] : '';
|
||||
echo $this->sysData->buildParamControl($param['varName'], $param['varType'], $defaultValue, $param['options'], $controlID . $index);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if($sysData->type == 'report'):?>
|
||||
<div id='<?php echo $controlID?>'>
|
||||
<table class='table table-form'>
|
||||
<?php foreach($params as $param):?>
|
||||
<tr>
|
||||
<th class='w-120px'><?php echo $param['showName'];?></td>
|
||||
<td>
|
||||
<?php
|
||||
$defaultValue = isset($param['defaultValue']) ? $param['defaultValue'] : '';
|
||||
echo $this->measurement->buildParamControl($param['varName'], $param['varType'], $defaultValue, $param['options'], $controlID);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
|
||||
<?php include $app->getModuleRoot() . 'common/view/sortable.html.php';?>
|
||||
<?php js::set('orderBy', $orderBy);?>
|
||||
<div class="main-content" id="mainContent">
|
||||
<div class="main-header">
|
||||
<h2><?php echo $lang->measurement->batchEdit;?></h2>
|
||||
</div>
|
||||
<form class="load-indicator main-form" method="post" target="hiddenwin" id="batchEdit">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-form">
|
||||
<thead>
|
||||
<tr class="text-center">
|
||||
<th class="w-50px"><?php echo $lang->sort;?></th>
|
||||
<th class="w-30px"><?php echo $lang->idAB;?></th>
|
||||
<th class="w-120px"><?php echo $this->lang->measurement->purpose?></th>
|
||||
<th class="w-120px"><?php echo $this->lang->measurement->scope?></th>
|
||||
<th class="w-120px"><?php echo $this->lang->measurement->object?></th>
|
||||
<th class="required"><?php echo $this->lang->measurement->name?></th>
|
||||
<th class="required"><?php echo $this->lang->measurement->code?></th>
|
||||
<th class="required"><?php echo $this->lang->measurement->unit?></th>
|
||||
<th class="required"><?php echo $this->lang->measurement->definition?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="sortable" id="measurementList">
|
||||
<?php foreach($measurements as $measurement):?>
|
||||
<tr data-id="<?php echo $measurement->id;?>" class="text-center">
|
||||
<td class='sort-handler' title='<?php echo $lang->dragAndSort?>'><i class='icon-move'></i></td>
|
||||
<td><?php echo $measurement->id;?></td>
|
||||
<td><?php echo html::select("purpose[$measurement->id]", $lang->measurement->purposeList, $measurement->purpose, "class='form-control'");?></td>
|
||||
<td><?php echo html::select("scope[$measurement->id]", $lang->measurement->scopeList, $measurement->scope, "class='form-control'");?></td>
|
||||
<td><?php echo html::select("object[$measurement->id]", $lang->measurement->objectList, $measurement->object, "class='form-control'");?></td>
|
||||
<td><?php echo html::input("name[$measurement->id]", $measurement->name, "class='form-control'");?></td>
|
||||
<td><?php echo html::input("code[$measurement->id]", $measurement->code, "class='form-control'");?></td>
|
||||
<td><?php echo html::input("unit[$measurement->id]", $measurement->unit, "class='form-control'");?></td>
|
||||
<td><?php echo html::textarea("definition[$measurement->id]", $measurement->definition, "class='form-control'");?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="9" class="text-center form-actions">
|
||||
<?php echo html::submitButton($lang->save)?>
|
||||
<?php echo html::backButton()?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,85 @@
|
||||
<?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
|
||||
<?php include $app->getModuleRoot() . 'common/view/sortable.html.php';?>
|
||||
<?php js::set('confirmDelete', $lang->measurement->confirmDelete);?>
|
||||
<?php js::set('orderBy', $orderBy);?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php include './menu.html.php';?>
|
||||
<a class="btn btn-link querybox-toggle" id='bysearchTab'><i class="icon icon-search muted"></i> <?php echo $lang->measurement->byQuery;?></a>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php common::printLink('measurement', 'createBasic', "", "<i class='icon icon-plus'></i>" . $lang->measurement->create, '', "class='btn btn-primary '", '');?>
|
||||
</div>
|
||||
</div>
|
||||
<div id='mainContent' class='main-row'>
|
||||
<div class="main-col">
|
||||
<div class="cell<?php if($browseType == 'bysearch') echo ' show';?>" id="queryBox" data-module='measurement'></div>
|
||||
<form class="main-table" data-ride='table' method='post' action='<?php echo $this->createLink('measurement', 'batchEdit');?>'>
|
||||
<table class="table table-fixed has-sort-head" id='measList'>
|
||||
<thead>
|
||||
<tr>
|
||||
<?php $batchEdit = common::hasPriv('measurement', 'batchEdit');?>
|
||||
<?php $vars = "browseType=$browseType¶m=$param&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
|
||||
<th class='c-id'>
|
||||
<?php if($batchEdit):?>
|
||||
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll;?>">
|
||||
<label></label>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
|
||||
</th>
|
||||
<th class='w-60px text-left'><?php common::printOrderLink('purpose', $orderBy, $vars, $lang->measurement->purpose);?></th>
|
||||
<th class='w-60px text-left'><?php common::printOrderLink('scope', $orderBy, $vars, $lang->measurement->scope);?></th>
|
||||
<th class='w-60px text-left'><?php common::printOrderLink('object', $orderBy, $vars, $lang->measurement->object);?></th>
|
||||
<th class='text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->measurement->name);?></th>
|
||||
<th class='w-170px text-left'><?php common::printOrderLink('code', $orderBy, $vars, $lang->measurement->code);?></th>
|
||||
<th class='w-80px'><?php common::printOrderLink('unit', $orderBy, $vars, $lang->measurement->unit);?></th>
|
||||
<th class=''><?php common::printOrderLink('definition', $orderBy, $vars, $lang->measurement->definition);?></th>
|
||||
<th class='c-actions text-center'><?php echo $lang->actions;?></th>
|
||||
<th class='w-60px'><?php echo $lang->measurement->order;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class='sortable' id="measurementList">
|
||||
<?php foreach ($measurementList as $key => $measurement):?>
|
||||
<tr data-id="<?php echo $measurement->id;?>">
|
||||
<td class="c-id">
|
||||
<?php if($batchEdit):?>
|
||||
<?php echo html::checkbox('measurement', array($measurement->id => '')) . html::a($this->createLink('measurement', 'setSQL', "measurementID=$measurement->id"), sprintf('%03d', $measurement->id));?>
|
||||
<?php else:?>
|
||||
<?php echo sprintf('%03d', $measurement->id);?>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
<td class='text-left'><?php echo zget($lang->measurement->purposeList, $measurement->purpose);?></td>
|
||||
<td class='text-left'><?php echo zget($lang->measurement->scopeList, $measurement->scope);?></td>
|
||||
<td class='text-left'><?php echo zget($lang->measurement->objectList, $measurement->object);?></td>
|
||||
<td class='text-left' title="<?php echo $measurement->name;?>"><?php echo html::a(inlink('setSQL', "measurementID=$measurement->id"), $measurement->name);?></td>
|
||||
<td class='text-left'><?php echo html::a(inlink('setSQL', "measurementID=$measurement->id"), $measurement->code);?></td>
|
||||
<td class='nowrap' title=<?php echo $measurement->unit;?>><?php echo $measurement->unit;?></td>
|
||||
<td class='text-left nowrap' title="<?php echo $measurement->definition;?>"><?php echo $measurement->definition;?></td>
|
||||
<td class="text-center c-actions">
|
||||
<?php common::printIcon('measurement', 'setSQL', "measurementID=$measurement->id", $measurement, 'list', 'pencil');?>
|
||||
<?php common::printIcon('measurement', 'editBasic', "measurementID=$measurement->id", $measurement, 'list', 'edit');?>
|
||||
<?php
|
||||
if(common::hasPriv('measurement', 'delete'))
|
||||
{
|
||||
$deleteURL = helper::createLink('measurement', 'delete', "measurementID=$measurement->id&confirm=yes");
|
||||
echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"measList\",confirmDelete)", '<i class="icon-common-delete icon-trash"></i>', '', "title='{$lang->measurement->delete}' class='btn'");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td class='sort-handler' title='<?php echo $lang->dragAndSort?>'><i class='icon-move'></i></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
<?php if($batchEdit):?>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class="table-actions btn-toolbar"><?php echo html::submitButton($lang->edit, '', 'btn');?></div>
|
||||
<?php endif;?>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,32 @@
|
||||
<div class='main-table'>
|
||||
<table class='table'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-60px'><?php echo $lang->idAB;?></th>
|
||||
<th><?php echo $lang->meastemplate->name;?></th>
|
||||
<th class='w-120px'><?php echo $lang->measurement->model;?></th>
|
||||
<th class='w-120px'><?php echo $lang->meastemplate->createdBy;?></th>
|
||||
<th class='w-120px'><?php echo $lang->meastemplate->createdDate;?></th>
|
||||
<th class='c-actions'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($templates as $template):?>
|
||||
<tr>
|
||||
<td><?php echo $template->id;?></td>
|
||||
<td><?php echo $template->name;?></td>
|
||||
<td><?php echo zget($lang->measurement->modelList, $template->model, '');?></td>
|
||||
<td><?php echo $template->createdBy;?></td>
|
||||
<td><?php echo $template->createdDate;?></td>
|
||||
<td class='c-actions'>
|
||||
<?php echo common::printIcon('measurement', 'editTemplate', "id=$template->id", $template, '', 'edit', '', '', '', '', $lang->measurement->editTemplate);?>
|
||||
<?php echo common::printIcon('measurement', 'viewTemplate', "id=$template->id", $template, '', 'eye', '', '', '', $lang->measurement->viewTemplate);?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
|
||||
<div id="mainContent" class="main-content">
|
||||
<div class='center-block'>
|
||||
<div class="main-header">
|
||||
<h2><?php echo $lang->measurement->create;?></h2>
|
||||
</div>
|
||||
<form class='main-form form-ajax' method='post' enctype='multipart/form-data' id='dataform'>
|
||||
<table class="table table-form">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->name;?></th>
|
||||
<td><?php echo html::input('name', '', 'class="form-control"');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->code;?></th>
|
||||
<td><?php echo html::input('code', '', 'class="form-control"');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->scope;?></th>
|
||||
<td><?php echo html::select('scope', $lang->measurement->scopeList, 'program', 'class="form-control"');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->object;?></th>
|
||||
<td><?php echo html::select('object', $lang->measurement->objectList, 'program', 'class="form-control"');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->purpose;?></th>
|
||||
<td><?php echo html::select('purpose', $lang->measurement->purposeList, 'program', 'class="form-control"');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->unit;?></th>
|
||||
<td><?php echo html::input('unit', '', 'class="form-control"');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->definition;?></th>
|
||||
<td><?php echo html::textarea('definition', '', 'class="form-control"');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php include './createcollectconf.html.php';?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class='form-actions text-center'>
|
||||
<td colspan='3'><?php echo html::submitButton(); echo html::backButton();?></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('#subNavbar ul li[data-id="settips"]').removeClass('active');
|
||||
$('#subNavbar ul li[data-id="template"]').removeClass('active');
|
||||
</script>
|
||||
<?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,83 @@
|
||||
<style>
|
||||
#module_chosen {width: 50%!important}
|
||||
</style>
|
||||
<tr>
|
||||
<th class='thWidth'><?php echo $lang->measurement->collectType;?></th>
|
||||
<td class='w-400px'>
|
||||
<?php echo html::select('collectType', $lang->measurement->collectTypeList, '', "class='form-control chosen'");?>
|
||||
</td><td></td>
|
||||
</tr>
|
||||
<tr class='actionConfig hidden'>
|
||||
<th><?php echo $lang->measurement->actionConfig;?></th>
|
||||
<td>
|
||||
<?php echo html::select('action', $triggerOptions, '', "class='form-control chosen'");?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class='cycleConfig'>
|
||||
<th><?php echo $lang->measurement->cycleConfig;?></th>
|
||||
<td colspan='2'>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class='active'><a data-tab data-type='week' href="#week"><?php echo $lang->measurement->cycleWeek;?></a></li>
|
||||
<li><a data-tab data-type='month' href="#month"><?php echo $lang->measurement->cycleMonth;?></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active clearfix" id="week">
|
||||
<?php echo html::checkbox('config[week]', $lang->measurement->dayNames)?>
|
||||
</div>
|
||||
<div class="tab-pane clearfix" id="month">
|
||||
<?php
|
||||
$days = array();
|
||||
for($i = 1; $i <= 10; $i ++) $days[$i] = $i;
|
||||
echo html::checkbox('config[month]', $days);
|
||||
$days = array();
|
||||
for($i = 11; $i <= 20; $i ++) $days[$i] = $i;
|
||||
echo html::checkbox('config[month]', $days);
|
||||
$days = array();
|
||||
for($i = 21; $i <= 31; $i ++) $days[$i] = $i;
|
||||
echo html::checkbox('config[month]', $days);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon'><?php echo $lang->measurement->execTime;?></span>
|
||||
<?php echo html::input('execTime', '', "class='form-control form-time w-200px'");?>
|
||||
</div>
|
||||
<?php echo html::hidden('config[type]', 'week')?>
|
||||
</td>
|
||||
</tr>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$(document).on('change', '#module', function()
|
||||
{
|
||||
var moduleName = $('#module').val();
|
||||
var link = createLink('measurement', 'ajaxGetModuleActions', "module=" + moduleName);
|
||||
$.get(link, function(data)
|
||||
{
|
||||
$('#action').replaceWith(data);
|
||||
$('#action_chosen').remove();
|
||||
$("#action").chosen();
|
||||
});
|
||||
})
|
||||
|
||||
$('#collectType').change(function()
|
||||
{
|
||||
var collectType = $('#collectType').val();
|
||||
if(collectType == 'crontab')
|
||||
{
|
||||
$('.cycleConfig').removeClass('hidden');
|
||||
$('.actionConfig').addClass('hidden');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('.actionConfig').removeClass('hidden');
|
||||
$('.cycleConfig').addClass('hidden');
|
||||
}
|
||||
});
|
||||
|
||||
$('ul.nav-tabs a').click(function()
|
||||
{
|
||||
if($(this).data('type'))$('input[id*=type][id*=config]').val($(this).data('type'));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
|
||||
<div id="mainContent" class="main-content">
|
||||
<div class='center-block'>
|
||||
<div class="main-header">
|
||||
<h2><?php echo $lang->measurement->createDerivation;?></h2>
|
||||
</div>
|
||||
<form class='main-form form-ajax' method='post' enctype='multipart/form-data' id='dataform'>
|
||||
<table class="table table-form">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->name;?></th>
|
||||
<td><?php echo html::input('name', '', 'class="form-control"');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->purpose;?></th>
|
||||
<td><?php echo html::input('purpose', '', 'class="form-control"');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->aim;?></th>
|
||||
<td><?php echo html::input('aim', '', 'class="form-control"');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->definition;?></th>
|
||||
<td><?php echo html::input('definition', '', 'class="form-control" readonly placeholder="'.$lang->measurement->selectFormula.'"');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->analyst;?></th>
|
||||
<td><?php echo html::select('analyst', $users, '', 'class="form-control chosen"');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->analysisMethod;?></th>
|
||||
<td><?php echo html::input('analysisMethod', '', 'class="form-control"');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php include './createcollectconf.html.php';?>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->noticeScope;?></th>
|
||||
<td><?php echo html::input('scope', '', 'class="form-control"');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class='form-actions text-center'>
|
||||
<td colspan='3'><?php echo html::submitButton();echo html::backButton();?></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<?php echo html::hidden('definitionMethods', '', 'autocomplete="off"');?>
|
||||
</form>
|
||||
<?php include './definition.html.php';?>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('#subNavbar ul li[data-id="settips"]').removeClass('active');
|
||||
$('#subNavbar ul li[data-id="template"]').removeClass('active');
|
||||
</script>
|
||||
<?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
|
||||
<?php include $app->getModuleRoot() . 'common/view/kindeditor.html.php';?>
|
||||
<div id="mainContent" class="main-content fade">
|
||||
<div class="center-block">
|
||||
<div class="main-header">
|
||||
<h2>
|
||||
<?php echo $lang->measurement->createTemplate;?>
|
||||
</h2>
|
||||
</div>
|
||||
<form class="load-indicator main-form form-ajax" method='post' enctype='multipart/form-data' id='dataform'>
|
||||
<table class="table table-form">
|
||||
<tr>
|
||||
<th><?php echo $lang->meastemplate->name;?></th>
|
||||
<td><?php echo html::input('name', '', "class='form-control'");?></td>
|
||||
</tr>
|
||||
<?php if(helper::hasFeature('scrum_measrecord')):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->model;?></th>
|
||||
<td><?php echo html::radio('model', $lang->measurement->modelList, 'waterfall');?></td>
|
||||
</tr>
|
||||
<?php else:?>
|
||||
<?php echo html::hidden('model', 'waterfall');?>
|
||||
<?php endif?>
|
||||
<tr>
|
||||
<th><?php echo $lang->meastemplate->content;?></th>
|
||||
<td colspan='2' class='tips'>
|
||||
<?php echo html::textarea('content', '', "class='form-control'");?>
|
||||
<i class="icon icon-exclamation-sign icon-rotate-180"></i>
|
||||
<?php echo $lang->measurement->tips->click2InsertData;?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='3' class='form-actions text-center'><?php echo html::submitButton() . html::backButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php include './holdermodal.html.php';?>
|
||||
<script>
|
||||
$('#subNavbar ul li[data-id="settips"]').removeClass('active');
|
||||
$('#subNavbar ul li[data-id="define"]').removeClass('active');
|
||||
</script>
|
||||
<?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,125 @@
|
||||
<style type="text/css">
|
||||
.left{float:left !important;}
|
||||
.center{text-align:center;}
|
||||
.clear:after{content:'';display:block;clear:both;}
|
||||
.center-block{position:relative;}
|
||||
.definition-factory{position:absolute;top:0;right:0;width:43%;display:none;padding-top:46px;}
|
||||
.definition-factory .formula-box{height:auto;line-height:30px;border-bottom:solid 1px grey;}
|
||||
.definition-factory .formula-box span{padding-right:5px;}
|
||||
.definition-factory .material-box{padding:5px 0 0 27px;}
|
||||
.definition-factory .material-box .material{cursor:pointer;text-align: center;background-color: #e5e5e5;margin: 15px;float: left;width: 30px;height:30px;line-height:30px;}
|
||||
.definition-factory .basicmeas-box{margin-top:5px;border:1px solid #dcdcdc;height:34px;}
|
||||
.definition-factory .basicmeas-box .title{background-color:#eee;color:#3c4353;width:20%;border-right:none;height:32px;line-height:32px;}
|
||||
.definition-factory .basicmeas-box .selectbox{width:80% !important;}
|
||||
</style>
|
||||
|
||||
<div class='definition-factory' id='definition-factory'>
|
||||
<div class='formula-box' id='formula-box'></div>
|
||||
<div class='material-box clear' id='material-box'>
|
||||
<div class="material" data-method="<?php echo $lang->measurement->plus;?>"><?php echo $lang->measurement->plus;?></div>
|
||||
<div class="material" data-method="<?php echo $lang->measurement->minus;?>"><?php echo $lang->measurement->minus;?></div>
|
||||
<div class="material" data-method="<?php echo $lang->measurement->multiplicationAlias;?>"><?php echo $lang->measurement->multiplication;?></div>
|
||||
<div class="material" data-method="<?php echo $lang->measurement->divisionAlias;?>"><?php echo $lang->measurement->division;?></div>
|
||||
<div class="material" data-method="<?php echo $lang->measurement->remainder;?>"><?php echo $lang->measurement->remainder;?></div>
|
||||
<div class="material" data-method="<?php echo $lang->measurement->leftParentheses;?>"><?php echo $lang->measurement->leftParentheses;?></div>
|
||||
<div class="material" data-method="<?php echo $lang->measurement->rightParentheses;?>"><?php echo $lang->measurement->rightParentheses;?></div>
|
||||
<div class="material" data-method="<?php echo $lang->measurement->equal;?>"><?php echo $lang->measurement->equal;?></div>
|
||||
<div class="material" data-method="<?php echo $lang->measurement->dot;?>"><?php echo $lang->measurement->dot;?></div>
|
||||
<div class="material" data-method="<?php echo $lang->measurement->del;?>"><?php echo $lang->measurement->del;?></div>
|
||||
<div class="material" data-method="<?php echo $lang->measurement->zero;?>"><?php echo $lang->measurement->zero;?></div>
|
||||
<div class="material" data-method="<?php echo $lang->measurement->one;?>"><?php echo $lang->measurement->one;?></div>
|
||||
<div class="material" data-method="<?php echo $lang->measurement->two;?>"><?php echo $lang->measurement->two;?></div>
|
||||
<div class="material" data-method="<?php echo $lang->measurement->three;?>"><?php echo $lang->measurement->three;?></div>
|
||||
<div class="material" data-method="<?php echo $lang->measurement->four;?>"><?php echo $lang->measurement->four;?></div>
|
||||
<div class="material" data-method="<?php echo $lang->measurement->five;?>"><?php echo $lang->measurement->five;?></div>
|
||||
<div class="material" data-method="<?php echo $lang->measurement->six;?>"><?php echo $lang->measurement->six;?></div>
|
||||
<div class="material" data-method="<?php echo $lang->measurement->seven;?>"><?php echo $lang->measurement->seven;?></div>
|
||||
<div class="material" data-method="<?php echo $lang->measurement->eight;?>"><?php echo $lang->measurement->eight;?></div>
|
||||
<div class="material" data-method="<?php echo $lang->measurement->nine;?>"><?php echo $lang->measurement->nine;?></div>
|
||||
</div>
|
||||
<div class='basicmeas-box clear'>
|
||||
<label class='left center title'><?php echo $lang->measurement->basicMeas;?></label>
|
||||
<div class='left selectbox' id='basicMeasBox'>
|
||||
<?php echo html::select('basicmeas', $basicMeas, '', 'class="form-control chosen"');?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var definitionItem = "<?php if(isset($definitonItem)) echo $definitonItem;?>";
|
||||
$(function()
|
||||
{
|
||||
definition.setDefautl(definitionItem);
|
||||
|
||||
$("form input").click(function()
|
||||
{
|
||||
if($(this).attr('name') == 'definition')
|
||||
$('#definition-factory').show();
|
||||
else
|
||||
$('#definition-factory').hide();
|
||||
})
|
||||
|
||||
$('#material-box .material').click(function()
|
||||
{
|
||||
var method = $(this).attr('data-method');
|
||||
if(method == 'C') return definition.del();
|
||||
|
||||
definition.setFormula(method,'method');
|
||||
})
|
||||
|
||||
$('#basicmeas').change(function()
|
||||
{
|
||||
var measurementID = $(this).val();
|
||||
definition.setFormula(measurementID,'basicmeas');
|
||||
})
|
||||
})
|
||||
|
||||
var definition = {
|
||||
del:function()
|
||||
{
|
||||
$('#formula-box span').eq(-1).remove();
|
||||
definition.getFormula();
|
||||
return true;
|
||||
},
|
||||
setFormula:function(method,type)
|
||||
{
|
||||
var formulaObj = $('#formula-box');
|
||||
if(type == 'method')
|
||||
{
|
||||
var methodName = method;
|
||||
if(methodName == '*') methodName = 'x';
|
||||
if(methodName == '/') methodName = '÷';
|
||||
|
||||
var formulaElement = '<span data-method="'+method+'">'+methodName+'</span>';
|
||||
}
|
||||
|
||||
if(type == 'basicmeas')
|
||||
{
|
||||
var measurement = $('#basicMeasBox .chosen-single-with-deselect .chosen-search input').attr('placeholder');
|
||||
var formulaElement = '<span data-method="{'+method+'}">'+measurement+'</span>';
|
||||
}
|
||||
|
||||
formulaObj.append(formulaElement);
|
||||
definition.getFormula();
|
||||
},
|
||||
getFormula:function()
|
||||
{
|
||||
var methodObj = $('#formula-box span');
|
||||
var methods = [];
|
||||
|
||||
methodObj.each(function()
|
||||
{
|
||||
methods.push($(this).attr('data-method'));
|
||||
})
|
||||
|
||||
if(methodObj.length==0) methods = [];
|
||||
|
||||
var methodJson = JSON.stringify(methods);
|
||||
$('#definitionMethods').val(methodJson);
|
||||
},
|
||||
setDefautl:function(definitionItem)
|
||||
{
|
||||
if(definitionItem != '') $('#formula-box').html(definitionItem);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,48 @@
|
||||
<div id='mainContent' class='main-row'>
|
||||
<div class="main-col">
|
||||
<div class="main-table">
|
||||
<table class="table table-fixed" id='measList'>
|
||||
<thead>
|
||||
<tr class='text-left'>
|
||||
<th class='c-id text-center'><?php echo $lang->measurement->id;?></th>
|
||||
<th><?php echo $lang->measurement->name;?></th>
|
||||
<th class='w-150px'><?php echo $lang->measurement->purpose;?></th>
|
||||
<th class='w-150px'><?php echo $lang->measurement->aim;?></th>
|
||||
<th class='w-80px text-center'><?php echo $lang->measurement->collectType;?></th>
|
||||
<th class='w-120px text-center'><?php echo $lang->measurement->analyst;?></th>
|
||||
<th class='w-200px'><?php echo $lang->measurement->analysisMethod;?></th>
|
||||
<th class='w-200px'><?php echo $lang->measurement->noticeScope;?></th>
|
||||
<th class='w-120px text-center'><?php echo $lang->measurement->options;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="measurementList">
|
||||
<?php foreach ($measurementList as $key => $measurement):?>
|
||||
<tr class='text-left'>
|
||||
<td class="c-id text-center"><?php echo $measurement->id;?></td>
|
||||
<td><?php echo $measurement->name;?></td>
|
||||
<td><?php echo $measurement->purpose;?></td>
|
||||
<td title="<?php echo $measurement->aim;?>"><?php echo $measurement->aim;?></td>
|
||||
<td class='text-center'><?php echo zget($lang->measurement->collectTypeList, $measurement->collectType);?></td>
|
||||
<td class="text-center"><?php echo $measurement->analyst;?></td>
|
||||
<td title="<?php echo $measurement->analysisMethod;?>"><?php echo $measurement->analysisMethod;?></td>
|
||||
<td><?php echo $measurement->scope;?></td>
|
||||
<td class="text-center c-actions">
|
||||
<?php common::printIcon('measurement', 'editDerivation', "measurementID=$measurement->id", $measurement, 'list', 'edit');?>
|
||||
<?php
|
||||
if(common::hasPriv('measurement', 'delete'))
|
||||
{
|
||||
$deleteURL = helper::createLink('measurement', 'delete', "type=derivation&measurementID=$measurement->id&confirm=yes");
|
||||
echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"measList\",confirmDelete)", '<i class="icon-common-delete icon-trash"></i>', '', "title='{$lang->measurement->delete}' class='btn'");
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
|
||||
<?php if($measurement->method == 'sql') include 'designsql.html.php';?>
|
||||
<?php if($measurement->method == 'php') include 'designphp.html.php';?>
|
||||
<?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>
|
||||
<script>
|
||||
$('#subNavbar ul li[data-id="settips"]').removeClass('active');
|
||||
$('#subNavbar ul li[data-id="template"]').removeClass('active');
|
||||
</script>
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php include '../../common/view/codeeditor.html.php';?>
|
||||
<?php js::set('measurementID', $measurementID);?>
|
||||
<style>
|
||||
#triggerModal{z-index: 1000000;}
|
||||
</style>
|
||||
<div class='panel'>
|
||||
<div class='panel-heading'>
|
||||
<div class='panel-title'>
|
||||
<?php echo $lang->measurement->setPHP?>
|
||||
<span class='text-sm text-important'><?php echo $lang->measurement->placeholder->php;?></span>
|
||||
</div>
|
||||
</div>
|
||||
<form method='post' action="<?php echo $actionLink;?>" id='phpForm' class='form-ajax'>
|
||||
<div style='padding: 10px'>
|
||||
<?php echo html::textarea('code', $code, "class='form-control' rows='16'")?>
|
||||
<?php if($step == 3 and !empty($params)):?>
|
||||
<div class='row' style='padding-top: 10px'>
|
||||
<?php foreach($params as $varName => $param):?>
|
||||
<?php echo html::hidden('params[]', json_encode($param));?>
|
||||
<div class='col-md-3 col-sm-6' style='width:220px'>
|
||||
<div class='input-group'>
|
||||
<?php $paramName = isset($param['showName']) ? $param['showName'] : $varName?>
|
||||
<span class='input-group-addon text-ellipsis' style='max-width: 140px' title='<?php echo $paramName;?>'><?php echo $paramName;?></span>
|
||||
<?php
|
||||
$defaultValue = isset($param['defaultValue']) ? $param['defaultValue'] : '';
|
||||
$value = zget($param, 'queryValue', $defaultValue);
|
||||
echo $this->measurement->buildParamControl('vars', $param['varType'], $value, $param['options']);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php if($step == 3):?>
|
||||
<div style='padding: 0 10px 10px;'>
|
||||
<div class='input-group'>
|
||||
<span><?php echo $lang->measurement->queryResult;?></span>
|
||||
<?php echo $queryResult;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
<div style='padding: 0 10px 10px;'>
|
||||
<?php echo html::submitButton($lang->measurement->call);?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
$().ready(function()
|
||||
{
|
||||
$('#execBtn').click(function()
|
||||
{
|
||||
if($('#code').val() == '') return false;
|
||||
$()
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php include './setparams.html.php';?>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php js::set('measurementID', $measurementID);?>
|
||||
<style>
|
||||
#triggerModal{z-index: 1000000;}
|
||||
</style>
|
||||
<div class='panel'>
|
||||
<div class='panel-heading'>
|
||||
<div class='panel-title'><?php echo $measurement->name . " $lang->colon " . $lang->measurement->setSQL?></div>
|
||||
</div>
|
||||
<form method='post' action='<?php echo $actionLink?>' id='sqlForm' class='form-ajax'>
|
||||
<div style='padding: 10px'>
|
||||
<?php echo html::textarea('sql', $sql, "placeholder='{$lang->measurement->placeholder->sql}' class='form-control' $readonly rows='8'")?>
|
||||
<div class='row' style='padding-top: 10px'><?php if($hasParams and $step == 3) include 'showsqlparams.html.php'?></div>
|
||||
</div>
|
||||
<?php if($step == 3):?>
|
||||
<div style='padding: 0 10px 10px;'>
|
||||
<div class='input-group'>
|
||||
<span><?php echo $lang->measurement->queryResult;?></span>
|
||||
<?php echo $queryResult;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div style='padding: 0 10px 10px;'>
|
||||
<?php
|
||||
if($step == 1 or $step == 2)
|
||||
{
|
||||
$link = $this->createLink('measurement', 'ajaxBuildSQL', '', '', true);
|
||||
echo html::a($link, $lang->measurement->callSqlBuilder, '', "class='btn btn-secondary' data-toggle='modal' data-width ='95%' data-type='iframe'");
|
||||
echo html::submitButton($lang->measurement->query, '', 'btn btn-primary');
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if($step == 3)
|
||||
{
|
||||
echo html::commonButton($lang->measurement->reDesign, "id='reDesignButton'", 'btn btn-secondary');
|
||||
echo html::submitButton($lang->measurement->save, '', 'btn btn-primary');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php include './setparams.html.php';?>
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
|
||||
<div id="mainContent" class="main-content">
|
||||
<div class='center-block'>
|
||||
<div class="main-header">
|
||||
<h2><?php echo $lang->measurement->editBasic;?></h2>
|
||||
</div>
|
||||
<form class='main-form form-ajax' method='post' enctype='multipart/form-data' id='dataform'>
|
||||
<table class="table table-form">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->name;?></th>
|
||||
<td><?php echo html::input('name', $measurement->name, 'class="form-control"');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->code;?></th>
|
||||
<td><?php echo html::input('code', $measurement->code, 'class="form-control"');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->scope;?></th>
|
||||
<td><?php echo html::select('scope', $lang->measurement->scopeList, $measurement->scope, 'class="form-control"');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->object;?></th>
|
||||
<td><?php echo html::select('object', $lang->measurement->objectList, $measurement->object, 'class="form-control"');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->purpose;?></th>
|
||||
<td><?php echo html::select('purpose', $lang->measurement->purposeList, $measurement->purpose, 'class="form-control"');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->unit;?></th>
|
||||
<td><?php echo html::input('unit', $measurement->unit, 'class="form-control"');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->definition;?></th>
|
||||
<td><?php echo html::textarea('definition', $measurement->definition, 'class="form-control"');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php include './editcollectconf.html.php';?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class='form-actions text-center'>
|
||||
<td colspan='3'><?php echo html::submitButton();echo html::backButton();?></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<?php echo html::hidden('measurementID',$measurement->id);?>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('#subNavbar ul li[data-id="settips"]').removeClass('active');
|
||||
$('#subNavbar ul li[data-id="template"]').removeClass('active');
|
||||
</script>
|
||||
<?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,85 @@
|
||||
<style>
|
||||
#module_chosen {width: 50%!important}
|
||||
</style>
|
||||
<tr>
|
||||
<th class='thWidth'><?php echo $lang->measurement->collectType;?></th>
|
||||
<td class='w-400px'>
|
||||
<?php echo html::select('collectType', $lang->measurement->collectTypeList, $measurement->collectType, "class='form-control chosen'");?>
|
||||
</td><td></td>
|
||||
</tr>
|
||||
<tr class='actionConfig <?php if($measurement->collectType == 'crontab') echo "hidden";?>'>
|
||||
<th><?php echo $lang->measurement->actionConfig;?></th>
|
||||
<td>
|
||||
<?php $collectAction = isset($measurement->collectConf->action) ? $measurement->collectConf->action : '';?>
|
||||
<?php echo html::select('action', $triggerOptions, $collectAction, "class='form-control chosen'");?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
$weekTabActive = '';
|
||||
$monthTabActive = '';
|
||||
if($measurement->collectType == 'crontab')
|
||||
{
|
||||
$weekTabActive = zget($measurement->collectConf, 'type', '') == 'week' ? 'active' : '';
|
||||
$monthTabActive = zget($measurement->collectConf, 'type', '') == 'month' ? 'active' : '';
|
||||
}
|
||||
?>
|
||||
<tr class='cycleConfig'>
|
||||
<th><?php echo $lang->measurement->cycleConfig;?></th>
|
||||
<td colspan='2'>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class='<?php echo $weekTabActive?>'><a data-tab data-type='week' href="#week"><?php echo $lang->measurement->cycleWeek;?></a></li>
|
||||
<li class='<?php echo $monthTabActive?>'><a data-tab data-type='month' href="#month"><?php echo $lang->measurement->cycleMonth;?></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane clearfix <?php echo $weekTabActive?>" id="week">
|
||||
<?php echo html::checkbox('config[week]', $lang->measurement->dayNames, zget($measurement->collectConf, 'week'))?>
|
||||
</div>
|
||||
<div class="tab-pane clearfix <?php echo $monthTabActive?>" id="month">
|
||||
<?php
|
||||
$days = array();
|
||||
for($i = 1; $i <= 10; $i ++) $days[$i] = $i;
|
||||
echo html::checkbox('config[month]', $days, zget($measurement->collectConf, 'month'));
|
||||
$days = array();
|
||||
for($i = 11; $i <= 20; $i ++) $days[$i] = $i;
|
||||
echo html::checkbox('config[month]', $days, zget($measurement->collectConf, 'month'));
|
||||
$days = array();
|
||||
for($i = 21; $i <= 31; $i ++) $days[$i] = $i;
|
||||
echo html::checkbox('config[month]', $days, zget($measurement->collectConf, 'month'));
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon'><?php echo $lang->measurement->execTime;?></span>
|
||||
<?php echo html::input('execTime', $measurement->execTime, "class='form-control form-time w-200px'");?>
|
||||
</div>
|
||||
<?php if($measurement->collectType == 'crontab') echo html::hidden('config[type]', $measurement->collectConf->type)?>
|
||||
<?php if($measurement->collectType == 'action') echo html::hidden('config[type]', 'week')?>
|
||||
</td>
|
||||
</tr>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$(document).on('change', '#collectType', function()
|
||||
{
|
||||
var collectType = $('#collectType').val();
|
||||
if(collectType == 'crontab')
|
||||
{
|
||||
$('.cycleConfig').removeClass('hidden');
|
||||
$('.actionConfig').addClass('hidden');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('.actionConfig').removeClass('hidden');
|
||||
$('.cycleConfig').addClass('hidden');
|
||||
}
|
||||
})
|
||||
|
||||
$('#collectType').change();
|
||||
|
||||
$('ul.nav-tabs a').click(function()
|
||||
{
|
||||
if($(this).data('type'))$('input[id*=type][id*=config]').val($(this).data('type'));
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,62 @@
|
||||
<?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
|
||||
<div id="mainContent" class="main-content">
|
||||
<div class='center-block'>
|
||||
<div class="main-header">
|
||||
<h2><?php echo $lang->measurement->editDerivation;?></h2>
|
||||
</div>
|
||||
<form class='main-form form-ajax' method='post' enctype='multipart/form-data' id='dataform'>
|
||||
<table class="table table-form">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->name;?></th>
|
||||
<td><?php echo html::input('name', $measurement->name, 'class="form-control"');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->purpose;?></th>
|
||||
<td><?php echo html::input('purpose', $measurement->purpose, 'class="form-control"');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->aim;?></th>
|
||||
<td><?php echo html::input('aim', $measurement->aim, 'class="form-control"');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->definition;?></th>
|
||||
<td><?php echo html::input('definition', '', 'class="form-control" readonly placeholder="'.$lang->measurement->selectFormula.'"');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->analyst;?></th>
|
||||
<td><?php echo html::select('analyst', $users, $measurement->analyst, 'class="form-control chosen"');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->analysisMethod;?></th>
|
||||
<td><?php echo html::input('analysisMethod', $measurement->analysisMethod, 'class="form-control"');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php include './editcollectconf.html.php';?>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->noticeScope;?></th>
|
||||
<td><?php echo html::input('scope', $measurement->scope, 'class="form-control"');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class='form-actions text-center'>
|
||||
<td colspan='3'><?php echo html::submitButton();echo html::backButton();?></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<?php echo html::hidden('measurementID', $measurement->id);?>
|
||||
<?php echo html::hidden('definitionMethods', $measurement->definition, 'autocomplete="off"');?>
|
||||
</form>
|
||||
<?php include './definition.html.php';?>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('#subNavbar ul li[data-id="settips"]').removeClass('active');
|
||||
$('#subNavbar ul li[data-id="template"]').removeClass('active');
|
||||
</script>
|
||||
<?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
|
||||
<?php include $app->getModuleRoot() . 'common/view/kindeditor.html.php';?>
|
||||
<div id="mainContent" class="main-content fade">
|
||||
<div class="center-block">
|
||||
<div class="main-header">
|
||||
<h2><?php echo $lang->measurement->editTemplate;?></h2>
|
||||
</div>
|
||||
<form class="load-indicator main-form form-ajax" method='post' enctype='multipart/form-data' id='dataform'>
|
||||
<table class="table table-form">
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->name;?></th>
|
||||
<td><?php echo html::input('name', $template->name, "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->measurement->content;?></th>
|
||||
<td colspan='2' class='tips'>
|
||||
<?php echo html::textarea('content', $template->content, "class='form-control'");?>
|
||||
<i class="icon icon-exclamation-sign icon-rotate-180"></i>
|
||||
<?php echo $lang->measurement->tips->click2InsertData;?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='3' class='form-actions text-center'><?php echo html::submitButton() . html::backButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php include './holdermodal.html.php';?>
|
||||
<?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,51 @@
|
||||
<table class='table active-disabled'>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='w-110px'><?php echo $lang->measurement->param->varName?></th>
|
||||
<th class='w-200px'><?php echo $lang->measurement->param->showName?></th>
|
||||
<th><?php echo $lang->measurement->param->varType?></th>
|
||||
<th class='w-300px'><?php echo $lang->measurement->param->defaultValue?></th>
|
||||
<th class='w-300px'><?php echo $lang->measurement->param->queryValue?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class='text-center'>
|
||||
<?php $index = 0;?>
|
||||
<?php foreach($params as $param):?>
|
||||
<?php if($param['varType'] == '' and $param['varName'] == '$program'):?>
|
||||
<?php $param['varType'] = 'select';?>
|
||||
<?php $param['showName'] = $lang->measurement->buildinParams->program;?>
|
||||
<?php endif;?>
|
||||
<?php if($param['varType'] == '' and stripos($param['varName'], 'date') !== false):?>
|
||||
<?php $param['varType'] = 'date';?>
|
||||
<?php $param['showName'] = $lang->measurement->buildinParams->day;?>
|
||||
<?php $value = $lang->measurement->buildinParams->day;?>
|
||||
<?php endif;?>
|
||||
<tr id='<?php echo $param['varName']?>'>
|
||||
<td><span></span><?php echo $param['varName'] . html::hidden("varName[]", $param['varName'])?></td>
|
||||
<td><?php echo html::input("showName[]", $param['showName'], "class='form-control'")?></td>
|
||||
<td>
|
||||
<div class='col-md-6'>
|
||||
<?php echo html::select("varType", $lang->measurement->param->typeList, $param['varType'], "class='form-control chosen' onchange='toggleSelectList(this)'")?>
|
||||
</div>
|
||||
<div class='col-md-6'>
|
||||
<?php
|
||||
$hidden = ($param['varType'] == 'select') ? '' : 'hidden';
|
||||
echo html::select("options[]", $lang->measurement->param->options, $param['options'], "class='form-control $hidden' onchange='togglParamList(this)'");
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
<td><?php echo $this->measurement->buildParamControl('defaultValue', $param['varType'], $param['defaultValue'], $param['options']);?></td>
|
||||
<td><?php echo $this->measurement->buildParamControl('queryValue', $param['varType'], $param['queryValue'], $param['options']);?></td>
|
||||
</tr>
|
||||
<?php $index ++;?>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="responseBox" class='alter'></div>
|
||||
<div class='panel-body'>
|
||||
<input type='button' value='<?php echo $lang->measurement->test;?>' id='testBtn' class='btn btn-success' onclick='submitForm("test")'/>
|
||||
<input type='button' value='<?php echo $lang->save;?>' id='submit' class='btn' disabled onclick='submitForm("submit")'/>
|
||||
</div>
|
||||
<script>
|
||||
$('[name^=varType]').change();
|
||||
</script>
|
||||
@@ -0,0 +1,144 @@
|
||||
<style>
|
||||
.ke-icon-holder {width: 20px; background: none; text-align: center; background-color: #0C64EB; line-height: 14px;border-radius:4px;}
|
||||
.ke-icon-holder:before {content: 'M'; font-size: 13px; font-weight: normal; color: #fff;}
|
||||
</style>
|
||||
<div class="modal fade" id="holderModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span><span class="sr-only"><?php $lang->close;?></span>
|
||||
</button>
|
||||
<h4 class="modal-title" id='holderModalTitle'><?php echo $lang->measurement->addMeas;?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->measurement->type;?></th>
|
||||
<td><?php echo html::select('type', $lang->measurement->sysData, '', "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr id='basicMeasBox'>
|
||||
<th class='w-100px'><?php echo $lang->measurement->measList;?></th>
|
||||
<td><?php echo html::select('basicMeas', $basicMeases, '', "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr id='reportBox' class='hidden'>
|
||||
<th class='w-100px'><?php echo $lang->measurement->reportList;?></th>
|
||||
<td><?php echo html::select('report', $reports, '', "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='from-actions text-center'>
|
||||
<button type="button" class="btn btn-primary" id='holderSaveBtn'><?php echo $lang->save;?></button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="form-group hidden">
|
||||
<input id="holderText" type="text" class="form-control">
|
||||
</div>
|
||||
<div class="form-group hidden">
|
||||
<textarea class="form-control" name="holderValue" id="holderValue" cols="30" rows="2" readonly=true></textarea>
|
||||
</div>
|
||||
<div class="form-group hidden">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" id="holderAsBlock">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function afterHolderShow(value)
|
||||
{
|
||||
if(typeof(window.holder) == 'undefined') window.holder = {};
|
||||
|
||||
if(value.indexOf('measurement') == 1)
|
||||
{
|
||||
params = value.split(':');
|
||||
params = params[1].split('.');
|
||||
type = params[0];
|
||||
window.holder.measurement = params[1].split('}')[0];
|
||||
}
|
||||
|
||||
if(value.indexOf('report') == 1)
|
||||
{
|
||||
type = 'report';
|
||||
params = value.split(':');
|
||||
params = params[1].split('.');
|
||||
window.holder.reportType = params[0];
|
||||
window.holder.reportID = params[1].split('}')[0];
|
||||
}
|
||||
|
||||
if(value)
|
||||
{
|
||||
$('#type').val(type).change();
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#type').val('basic').change().trigger('chosen:updated');
|
||||
$('#basicMeas').val('').change().trigger('chosen:updated');
|
||||
}
|
||||
}
|
||||
$(document).on('change', '#type', function()
|
||||
{
|
||||
var type = $('#type').val();
|
||||
if(type == 'basic')
|
||||
{
|
||||
$('#basicMeasBox').removeClass('hidden');
|
||||
$('#reportBox').addClass('hidden');
|
||||
//$('#holderAsBlock').prop('checked', false);
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#basicMeasBox').addClass('hidden');
|
||||
$('#reportBox').removeClass('hidden');
|
||||
//$('#holderAsBlock').prop('checked', true);
|
||||
}
|
||||
|
||||
if(typeof(window.holder.measurement) != 'undefined')
|
||||
{
|
||||
if(type == 'basic') $('#basicMeas').val(window.holder.measurement).change().trigger('chosen:updated');
|
||||
}
|
||||
})
|
||||
|
||||
$(document).on('change', '#basicMeas, #report', function()
|
||||
{
|
||||
var holderText = $(this).find('option:selected').text();
|
||||
if(holderText)
|
||||
{
|
||||
var type = $('#type').val();
|
||||
var uniqid = getUniqid(8);
|
||||
|
||||
if(type == 'basic')
|
||||
{
|
||||
var measurement = $(this).val();
|
||||
var holderValue = '{measurement_' + uniqid + ':' + type + '.' + measurement + '}';
|
||||
}
|
||||
else
|
||||
{
|
||||
var reportType = 'cmmi';
|
||||
var reportID = $(this).val();
|
||||
var holderValue = '{report_' + uniqid + ':' + reportType + '.' + reportID + '}';
|
||||
}
|
||||
|
||||
$('#holderText').closest('div'). removeClass('hidden');
|
||||
$('#holderValue').closest('div').removeClass('hidden');
|
||||
$('#holderText').val(holderText);
|
||||
$('#holderValue').val(holderValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#holderText').val('');
|
||||
$('#holderValue').val('');
|
||||
$('#holderText').closest('div'). addClass('hidden');
|
||||
$('#holderValue').closest('div').addClass('hidden');
|
||||
}
|
||||
})
|
||||
|
||||
function getUniqid(length)
|
||||
{
|
||||
return Number(Math.random().toString().substr(3,length) + Date.now()).toString(36);
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
$this->app->loadLang('measurement');
|
||||
js::set('methodName', $this->app->methodName);
|
||||
?>
|
||||
<?php if(common::hasPriv('measurement', 'settips')) echo html::a($this->createLink('measurement', 'settips'), '<span class="text">' . $lang->measurement->setTips . '</span>', '', "class='btn btn-link settipsTab'");?>
|
||||
<?php if(common::hasPriv('measurement', 'browse')) echo html::a($this->createLink('measurement', 'browse'), '<span class="text">' . $lang->measurement->definition . '</span>', '', "class='btn btn-link browseTab'");?>
|
||||
<?php if(common::hasPriv('sqlbuilder', 'browseSqlView')) echo html::a($this->createLink('sqlbuilder', 'browsesqlview'), '<span class="text">' . $lang->measurement->sqlBuilder. '</span>', '', "class='btn btn-link browsesqlviewTab'");?>
|
||||
<?php if(common::hasPriv('measurement', 'template')) echo html::a($this->createLink('measurement', 'template'), '<span class="text">' . $lang->measurement->template . '</span>', '', "class='btn btn-link templateTab'");?>
|
||||
<script>
|
||||
$('#mainMenu .' + methodName + 'Tab').addClass('btn-active-text');
|
||||
</script>
|
||||
@@ -0,0 +1,104 @@
|
||||
<?php if(!$this->post->parseContent):?>
|
||||
<style>
|
||||
.holder-value {display: none!important;}
|
||||
.holder-element {border-radius: 4px; padding: 5px; position: relative; margin: 5px 2px;}
|
||||
.holder-element:before {content: attr(data-holder)}
|
||||
.holder-block {display: block; text-align: center}
|
||||
.holder-span {display: inline-block; line-height: 1}
|
||||
|
||||
.holder-element.needParams {background: #f5515f; color: #fff; border: 1px solid #e62340; cursor: pointer;}
|
||||
.holder-element.withoutParams {background: #eee; color: #3c4353; border: 1px solid #dcdcdc;}
|
||||
</style>
|
||||
<?php endif;?>
|
||||
|
||||
<div class="modal fade" id="paramFormModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only"><?php $lang->close;?></span></button>
|
||||
<h4 class="modal-title" id='holderModalTitle'><?php echo $lang->measurement->setParams?></h4>
|
||||
</div>
|
||||
<div id='paramFormBox' class="modal-body">
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?php echo $lang->close;?></button>
|
||||
<button type="button" class="btn btn-primary" id='paramFormSaveBtn'><?php echo $lang->save;?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('.holder-element').each(function()
|
||||
{
|
||||
var $that = $(this);
|
||||
var value = $that.find('.holder-value').text();
|
||||
value = value.split('{');
|
||||
value = value[1].split('}');
|
||||
value = value[0];
|
||||
value = window.btoa(value);
|
||||
|
||||
$.get(createLink('measurement', 'ajaxCheckElementNeedParams', "value=" + value), function(data)
|
||||
{
|
||||
if(data == 'no')
|
||||
{
|
||||
$that.addClass('withoutParams');
|
||||
}
|
||||
else
|
||||
{
|
||||
$that.addClass('needParams');
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
$('.holder-element').click(function()
|
||||
{
|
||||
if($(this).hasClass('withoutParams')) return;
|
||||
|
||||
value = $(this).find('.holder-value').text();
|
||||
value = value.split('{');
|
||||
value = value[1].split('}');
|
||||
value = value[0];
|
||||
value = window.btoa(value);
|
||||
|
||||
$('#paramFormBox').load(createLink('measurement', 'ajaxBuildParamForm', "value=" + value), function()
|
||||
{
|
||||
$('#paramFormBox .form-control').each(function()
|
||||
{
|
||||
var controlID = $(this).data('control');
|
||||
var paramName = $(this).data('name');
|
||||
var ID = paramName + '_' + controlID;
|
||||
|
||||
var paramControl = $('#paramValues #' + ID);
|
||||
if(paramControl.length != 0) $(this).val(paramControl.val());
|
||||
});
|
||||
$('.report-date').datepicker();
|
||||
$('#paramFormBox .chosen').chosen();
|
||||
$('#paramFormModal').modal('show');
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '#paramFormSaveBtn', function()
|
||||
{
|
||||
$('#paramFormBox .form-control').each(function()
|
||||
{
|
||||
var controlID = $(this).data('control');
|
||||
var paramName = $(this).data('name');
|
||||
var ID = paramName + '_' + controlID;
|
||||
|
||||
var paramControl = $('#paramValues #' + ID);
|
||||
if(paramControl.length == 0)
|
||||
{
|
||||
$('#paramValues').append("<input type='hidden' id='" + ID + "' name='params[" + controlID + "][" + paramName + "]' value='" + $(this).val() + "'>");
|
||||
}
|
||||
else
|
||||
{
|
||||
paramControl.val($(this).val());
|
||||
}
|
||||
$('#paramFormModal').modal('hide');
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php include $app->getModuleRoot() . 'common/view/header.lite.html.php';?>
|
||||
<style>
|
||||
body{width:100% !important;padding:0;}
|
||||
.m-measurement-viewtemplate {background-color: #fff;}
|
||||
.m-measurement-viewtemplate .panel {margin-bottom: 0;}
|
||||
</style>
|
||||
<div class="panel h-600px w-p100">
|
||||
<h2 class='text-center'><?php echo $this->post->name;?></h2>
|
||||
<div class='panel-body'>
|
||||
<?php echo $content;?>
|
||||
<?php if(common::hasPriv('measurement', 'saveReport')):?>
|
||||
<div class='panel-footer text-center'>
|
||||
<form action="<?php echo inlink('saveReport');?>" method="post" class='form-ajax' id="reportForm">
|
||||
<?php echo html::hidden('name', $this->post->name);?>
|
||||
<?php echo html::hidden('project', (int)$this->post->projectID);?>
|
||||
<?php echo html::hidden('template', $template->id);?>
|
||||
<?php echo html::textarea('content', $content, "class='hidden'");?>
|
||||
<?php echo html::hidden('params', json_encode($this->post->params));?>
|
||||
<?php echo html::submitButton($lang->measurement->saveReport, "class='btn btn-primary'");?>
|
||||
</form>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
parent.$('#reportWin').height($('.panel').outerHeight());
|
||||
</script>
|
||||
@@ -0,0 +1,78 @@
|
||||
<div id='setParams' class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title"><i class="icon-file-text"></i> <?php echo $lang->measurement->setParams?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id='paramsForm' method='post' action='<?php echo inlink('ajaxSetParams', "measurementID=$measurementID")?>' class='form-ajax'>
|
||||
<table class='table active-disabled'>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='w-110px'><?php echo $lang->measurement->param->varName?></th>
|
||||
<th class='w-120px'><?php echo $lang->measurement->param->showName?></th>
|
||||
<th class='w-p30'><?php echo $lang->measurement->param->varType?></th>
|
||||
<th class='w-200px'><?php echo $lang->measurement->param->defaultValue?></th>
|
||||
<th class='w-200px'><?php echo $lang->measurement->param->queryValue?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class='text-center'>
|
||||
<?php if($hasParams):?>
|
||||
<?php $index = 0;?>
|
||||
<?php foreach($params as $param):?>
|
||||
<tr id='<?php echo $param['varName']?>'>
|
||||
<td><span></span><?php echo $param['varName'] . html::hidden("varName[]", $param['varName'])?></td>
|
||||
<td><?php echo html::input("showName[]", $param['showName'], "class='form-control'")?></td>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon' style='text-align:left'>
|
||||
<?php echo html::radio("varType[$index]", $lang->measurement->param->typeList, $param['varType'], "onchange='toggleSelectList(this)'")?>
|
||||
</span>
|
||||
<?php
|
||||
$hidden = ($param['varType'] == 'select') ? '' : 'hidden';
|
||||
echo html::select("options[]", $lang->measurement->param->options, $param['options'], "class='form-control $hidden'");
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
<td><?php echo $this->measurement->buildParamControl('defaultValue', $param['varType'], $param['defaultValue'], $param['options']);?></td>
|
||||
<td><?php echo $this->measurement->buildParamControl('queryValue', $param['varType'], $param['queryValue'], $param['options']);?></td>
|
||||
</tr>
|
||||
<?php $index ++;?>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='5' class='text-center'><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='templateBox' class='hidden'>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr class='template'>
|
||||
<td><span></span><?php echo html::hidden('varName[]', '')?></td>
|
||||
<td><?php echo html::input('showName[]', '', "class='form-control'")?></td>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon' style='text-align:left'>
|
||||
<?php echo html::radio('varType[]', $lang->measurement->param->typeList, 'select', "onchange='toggleSelectList(this)'")?>
|
||||
</span>
|
||||
<?php echo html::select('options[]', $lang->measurement->param->options, '', "class='form-control'");?>
|
||||
</div>
|
||||
</td>
|
||||
<td><?php echo html::select('defaultValue[]', $programPairs, '', "class='form-control'")?></td>
|
||||
<td><?php echo html::select('queryValue[]', $programPairs, '', "class='form-control'")?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<table>
|
||||
</div>
|
||||
<div id='tmpDataBox' class='hidden'>
|
||||
</div>
|
||||
<?php include $app->getModuleRoot() . 'common/view/datepicker.html.php';?>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
|
||||
<?php include $app->getModuleRoot() . 'common/view/datepicker.html.php';?>
|
||||
<?php js::set('measurementID', $measurement->id);?>
|
||||
<div class='panel'>
|
||||
<div class='panel-heading'>
|
||||
<div class='panel-title'>
|
||||
<span class='text'><?php echo $measurement->name . " $lang->colon " . $lang->measurement->setSQL?></span>
|
||||
<?php if($measurement->deleted):?>
|
||||
<span class='label label-danger'><?php echo $lang->measurement->deleted;?></span>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<form method='post' id='sqlForm'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<td colspan="3"> <?php echo html::textarea('sql', $sql, "placeholder='{$lang->measurement->placeholder->sql}' class='form-control' rows='10'");?> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class='panel-body' id="paramBox" style='padding-top: 10px'>
|
||||
<?php if(!empty($measurement->params)):?>
|
||||
<table class='table'>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='w-110px'><?php echo $lang->measurement->param->varName?></th>
|
||||
<th class='w-150px'><?php echo $lang->measurement->param->showName?></th>
|
||||
<th class='w-200px'><?php echo $lang->measurement->param->varType?></th>
|
||||
<th class='w-250px'><?php echo $lang->measurement->param->defaultValue?></th>
|
||||
<th class='w-250px'><?php echo $lang->measurement->param->queryValue?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class='text-center'>
|
||||
<?php $index = 0;?>
|
||||
<?php foreach($params as $param):?>
|
||||
<?php $varType = zget($param, 'varType', '');?>
|
||||
<tr id='<?php echo $param['varName']?>'>
|
||||
<td><span></span><?php echo $param['varName'] . html::hidden("varName[]", $param['varName'])?></td>
|
||||
<td><?php echo html::input("showName[]", $param['showName'], "class='form-control'")?></td>
|
||||
<td>
|
||||
<div class='col-md-6'>
|
||||
<?php echo html::select("varType[]", $lang->measurement->param->typeList, zget($param, 'varType'), "class='select form-control chosen' onchange='toggleSelectList(this)'")?>
|
||||
</div>
|
||||
<div class='col-md-6'>
|
||||
<?php
|
||||
$hidden = ($varType == 'select') ? '' : 'hidden';
|
||||
echo html::select("options[]", $lang->measurement->param->options, $param['options'], "class='form-control $hidden' onchange='togglParamList(this)'");
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
<td><?php echo $this->measurement->buildParamControl('defaultValue', $varType, zget($param, 'defaultValue', ''), $param['options']);?></td>
|
||||
<td><?php echo $this->measurement->buildParamControl('queryValue', $varType, zget($param, 'queryValue', ''), $param['options']);?></td>
|
||||
</tr>
|
||||
<?php $index ++;?>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif;?>
|
||||
<div id="responseBox" class='alter'></div>
|
||||
<?php if(!$measurement->deleted):?>
|
||||
<div class='panel-body'>
|
||||
<input type='button' value='<?php echo $lang->measurement->test;?>' id='testBtn' class='btn btn-success' onclick='submitForm("test")'/>
|
||||
<input type='button' value='<?php echo $lang->save;?>' id='submit' class='btn submit' disabled onclick='submitForm("submit")'/>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php echo html::hidden('action', 'test');?>
|
||||
</form>
|
||||
</div>
|
||||
<?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,126 @@
|
||||
<?php
|
||||
$lang->custom->object = array();
|
||||
$lang->custom->system = array();
|
||||
include $app->getModuleRoot() . 'common/view/header.html.php';
|
||||
js::set('object', $object);
|
||||
?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php include './menu.html.php';?>
|
||||
</div>
|
||||
</div>
|
||||
<div id='mainContent' class='main-row'>
|
||||
<div class='side-col' id='sidebar'>
|
||||
<div class='cell'>
|
||||
<div class='list-group'>
|
||||
<?php
|
||||
foreach($lang->custom->tipProgressList as $key => $value)
|
||||
{
|
||||
echo html::a(inlink('setTips', "type=progress&object=$key"), $value, '', " id='{$key}Tab'");
|
||||
}
|
||||
foreach($lang->custom->tipCostList as $key => $value)
|
||||
{
|
||||
echo html::a(inlink('setTips', "type=cost&object=$key"), $value, '', " id='{$key}Tab'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='main-col main-content'>
|
||||
<form class="load-indicator main-form form-ajax" method='post'>
|
||||
<table class='table table-form mw-900px'>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='w-200px'><?php echo $lang->custom->region;?></th>
|
||||
<th class='w-150px'><?php echo $lang->custom->isRange;?></th>
|
||||
<th><?php echo $lang->custom->tips;?></th>
|
||||
<th class="w-90px"> <?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $i = 0;?>
|
||||
<?php if(!empty($tipsConfig)):?>
|
||||
<?php foreach($tipsConfig as $key => $tipConfig):?>
|
||||
<?php if($tipConfig->type != $object) continue;?>
|
||||
<tr class='addedItem'>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<input type='text' name='mins[]' id='maxs<?php echo $i;?>' value='<?php echo $tipConfig->min?>' class='form-control' />
|
||||
<span class='input-group-addon'><?php echo $lang->dash;?></span>
|
||||
<input type='text' name='maxs[]' id='maxs<?php echo $i;?>' value='<?php echo $tipConfig->max?>' class='form-control' />
|
||||
</div>
|
||||
</td>
|
||||
<td class='text-center'><?php echo html::radio("ranges[$i]", $lang->custom->tipRangeList, $tipConfig->range ? $tipConfig->range : 0);?></td>
|
||||
<td><input type='text' name='tips[]' id='tips<?php echo $i;?>' value='<?php echo $tipConfig->tip?>' class='form-control' /></td>
|
||||
<td class='c-actions text-center'>
|
||||
<a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
|
||||
<a href='javascript:;' onclick='deleteItem(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i ++;?>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
|
||||
<?php for($j = 0; $j < 2; $j ++):?>
|
||||
<tr class='addedItem'>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<input type='text' name='mins[]' id='maxs<?php echo $i;?>' value='' class='form-control' />
|
||||
<span class='input-group-addon'><?php echo $lang->dash;?></span>
|
||||
<input type='text' name='maxs[]' id='maxs<?php echo $i;?>' value='' class='form-control' />
|
||||
</div>
|
||||
</td>
|
||||
<td class='text-center'><?php echo html::radio("ranges[$i]", $lang->custom->tipRangeList, 0);?></td>
|
||||
<td><input type='text' name='tips[]' id='tips<?php echo $i;?>' value='' class='form-control' /></td>
|
||||
<td class='c-actions text-center'>
|
||||
<a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
|
||||
<a href='javascript:;' onclick='deleteItem(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i ++;?>
|
||||
<?php endfor;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='3' class='text-center'><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<?php js::set('i', $i);?>
|
||||
</form>
|
||||
|
||||
<?php $i = '%i%';?>
|
||||
<table class='hidden'>
|
||||
<tr id='addItem' class='hidden'>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<input type='text' name='mins[]' id='mins<?php echo $i;?>' class='form-control' />
|
||||
<span class='input-group-addon'><?php echo $lang->dash;?></span>
|
||||
<input type='text' name='maxs[]' id='maxs<?php echo $i;?>' class='form-control' />
|
||||
</div>
|
||||
</td>
|
||||
<td class='text-center'><?php echo html::radio("ranges[$i]", $lang->custom->tipRangeList, 0);?></td>
|
||||
<td><input type='text' name='tips[]' id='tips<?php echo $i;?>' class='form-control' /></td>
|
||||
<td class='c-actions text-center'>
|
||||
<a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
|
||||
<a href='javascript:;' onclick='deleteItem(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('#' + object + 'Tab').addClass('active');
|
||||
function addItem(obj)
|
||||
{
|
||||
var item = $('#addItem').html().replace(/%i%/g, i);
|
||||
$(obj).closest('tr').after('<tr class="addedItem">' + item + '</tr>');
|
||||
i ++;
|
||||
}
|
||||
|
||||
function deleteItem(obj)
|
||||
{
|
||||
$(obj).closest('tr').remove();
|
||||
}
|
||||
</script>
|
||||
<?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php include $app->getModuleRoot() . 'common/view/datepicker.html.php';?>
|
||||
<?php foreach($params as $varName => $param):?>
|
||||
<?php echo html::hidden('params[]', json_encode($param));?>
|
||||
<div class='col-md-3 col-sm-6' style='width:220px'>
|
||||
<div class='input-group'>
|
||||
<?php $paramName = isset($param['showName']) ? $param['showName'] : $varName?>
|
||||
<span class='input-group-addon text-ellipsis' style='max-width: 140px' title='<?php echo $paramName;?>'><?php echo $paramName;?></span>
|
||||
<?php
|
||||
$defaultValue = isset($param['defaultValue']) ? $param['defaultValue'] : '';
|
||||
$value = zget($param, 'queryValue', $defaultValue);
|
||||
echo $this->measurement->buildParamControl('vars', $param['varType'], $value, $param['options']);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('input').attr('readonly', 'readonly');
|
||||
$('select').attr('disabled', 'disabled');
|
||||
</script>
|
||||
<?php endforeach;?>
|
||||
@@ -0,0 +1,43 @@
|
||||
<div class='main-col'>
|
||||
<div class='main-table' >
|
||||
<table class='table'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-50px'><?php echo $lang->meastemplate->id?></th>
|
||||
<th width='160'><?php echo $lang->meastemplate->name?></th>
|
||||
<th><?php echo $lang->meastemplate->desc?></th>
|
||||
<th class='w-130px'><?php echo $lang->actions?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class='text-center'>
|
||||
<?php foreach($templates as $report):?>
|
||||
<tr>
|
||||
<td><?php echo $report->id;?></td>
|
||||
<td class='text-left'>
|
||||
<?php
|
||||
$name = json_decode($report->name, true);
|
||||
if(empty($name)) $name[$this->app->getClientLang()] = $report->name;
|
||||
echo zget($name, $this->app->getClientLang(), '');
|
||||
?>
|
||||
</td>
|
||||
<?php
|
||||
$desc = json_decode($report->desc, true);
|
||||
$desc = zget($desc, $this->app->getClientLang(), '');
|
||||
?>
|
||||
<td class='text-left' title='<?php echo $desc?>'><?php echo $desc;?></td>
|
||||
<td>
|
||||
<?php
|
||||
if(common::hasPriv('report', 'useReport')) echo html::a($this->createLink('report', 'useReport', "reportID=$report->id&from=cmmi"), $lang->report->useReport, '', "data-type='iframe' data-toggle='modal'");
|
||||
if(common::hasPriv('report', 'editReport')) echo html::a($this->createLink('report', 'editReport', "reportID=$report->id&from=cmmi"), $lang->report->editReport, '', "data-type='iframe' data-toggle='modal'");
|
||||
if(common::hasPriv('report', 'deleteReport')) echo html::a($this->createLink('report', 'deleteReport', "reportID=$report->id&confirm=no&from=cmmi"), $lang->delete, 'hiddenwin');
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php include './menu.html.php';?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if($type == 'complex') common::printLink('measurement', 'createTemplate', "", "<i class='icon icon-plus'></i>" . $lang->measurement->createTemplate, '', "class='btn btn-primary'");?>
|
||||
<?php if($type == 'single') common::printLink('report', 'custom', "step=0&reportID=0&from=cmmi", "<i class='icon icon-plus'></i>" . $lang->measurement->createSingle, '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainContent" class="main-row fade">
|
||||
<div class='side-col'>
|
||||
<div class='panel'>
|
||||
<div class='panel-body'>
|
||||
<div class='list-group'>
|
||||
<?php $singleActive = $type == 'single' ? 'selected' : '';?>
|
||||
<?php $complexActive = $type == 'complex' ? 'selected' : '';?>
|
||||
<?php echo html::a($this->createLink('measurement','template', "type=complex"), '<span class="text">' . $lang->meastemplate->complex . '</span>', '', "class='$complexActive'");?>
|
||||
<?php echo html::a($this->createLink('measurement','template', "type=single"), '<span class="text">' . $lang->meastemplate->single . '</span>', '', "class='$singleActive'");?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main-col">
|
||||
<?php if(empty($templates)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p><span class="text-muted"><?php echo $lang->noData;?></span></p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<?php if($type == 'single') include './singletemplate.html.php';?>
|
||||
<?php if($type == 'complex') include './complextemplate.html.php';?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
|
||||
<?php $disablePgm = $projectID ? 'readonly' : '';?>
|
||||
<div class="col-md-3">
|
||||
<div class="panel">
|
||||
<div class="panel-heading">
|
||||
<h4><?php echo $lang->measurement->params;?></h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form class="load-indicator main-form form-horizontal" id="paramsForm" target='reportWin' method='post'>
|
||||
<div class="form-group">
|
||||
<label class='col-md-3'><?php echo $this->lang->measurement->report->name?></label>
|
||||
<div class="col-md-9">
|
||||
<?php echo html::input('name', $template->name, "class='form-control'");?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class='col-md-3'><?php echo $this->lang->measurement->report->program?></label>
|
||||
<div class="col-md-9">
|
||||
<?php if(!$projectID) echo html::select('projectID', $projectPairs, $projectID, "$disablePgm class='form-control chosen'");?>
|
||||
<?php if($projectID) echo html::hidden('projectID', $projectID);?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo $this->measurement->buildTemplateForm($components);?>
|
||||
<div class="form-group text-center">
|
||||
<?php echo html::hidden('parseContent', 'yes') . html::submitButton($lang->measurement->tips->view, "", "btn btn-secondary");?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<iframe id='reportWin' name='reportWin' frameborder='0' scrolling='yes' class='w-p100' height="700"></iframe>
|
||||
</div>
|
||||
<?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>
|
||||
Reference in New Issue
Block a user