combine repo, ci and jenkins modules under same top module

This commit is contained in:
aaronchen2k
2020-01-23 16:43:28 +08:00
parent b32e37edd1
commit deb95b1927
15 changed files with 28 additions and 91 deletions
+1 -5
View File
@@ -10,13 +10,9 @@
* @link http://www.zentao.net
*/
?>
<?php include '../../ci/lang/zh-cn.php'; ?>
<?php include '../../ci/view/header.html.php'; ?>
<?php include '../../common/view/header.html.php'; ?>
<div id='mainContent' class='main-row'>
<div class='side-col' id='sidebar'>
<?php include '../../ci/view/menu.html.php'; ?>
</div>
<div class='main-col main-content'>
<form class='main-table' id='ajaxForm' method='post'>
<table id='buildList' class='table has-sort-head table-fixed'>
+1 -6
View File
@@ -10,14 +10,9 @@
* @link http://www.zentao.net
*/
?>
<?php include '../../ci/lang/zh-cn.php'; ?>
<?php include '../../ci/view/header.html.php'; ?>
<?php include '../../common/view/form.html.php'; ?>
<?php include '../../common/view/header.html.php'; ?>
<div id='mainContent' class='main-row'>
<div class='side-col' id='sidebar'>
<?php include '../../ci/view/menu.html.php'; ?>
</div>
<div class='main-col main-content'>
<div class='center-block'>
<div class='main-header'>
+1 -6
View File
@@ -10,16 +10,11 @@
* @link http://www.zentao.net
*/
?>
<?php include '../../ci/lang/zh-cn.php'; ?>
<?php include '../../ci/view/header.html.php'; ?>
<?php include '../../common/view/form.html.php'; ?>
<?php include '../../common/view/header.html.php'; ?>
<?php js::set('triggerType', $citask->triggerType)?>
<div id='mainContent' class='main-row'>
<div class='side-col' id='sidebar'>
<?php include '../../ci/view/menu.html.php'; ?>
</div>
<div class='main-col main-content'>
<div class='center-block'>
<div class='main-header'>
-31
View File
@@ -1,31 +0,0 @@
<?php
/**
* The header view file of credentials module of ZenTaoPMS.
*
* @copyright Copyright 2009-2017 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Gang Liu <liugang@cnezsoft.com>
* @package credentials
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include 'header.html.php';?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'><?php common::printAdminSubMenu('sso');?></div>
<div class='btn-toolbar pull-right'>
<div class='btn-group'>
<div class='btn-group' id='createActionMenu'>
<?php
if($this->methodName !== 'browsebranch' && $this->methodName !== 'browsebuild' &&
strpos($this->methodName,'browse') > -1 && common::hasPriv($module, 'create')) {
echo html::a(inlink('create'), "<i class='icon-plus'></i> {$lang->ci->create}",
'', "class='btn btn-primary'");
} else if($this->methodName == 'browsebranch' || $this->methodName == 'browsebuild' || $this->methodName == 'viewbuildlogs') {
echo html::backButton();
}
?>
</div>
</div>
</div>
</div>
+1 -4
View File
@@ -3,12 +3,9 @@
* The index view file of ci module of ZenTaoPMS.
*/
?>
<?php include 'header.html.php'; ?>
<?php include '../../common/view/header.html.php'; ?>
<div id='mainContent' class='main-row'>
<div class='side-col' id='sidebar'>
<?php include 'menu.html.php'; ?>
</div>
<div class='main-col main-content'></div>
</div>
+1 -5
View File
@@ -10,13 +10,9 @@
* @link http://www.zentao.net
*/
?>
<?php include '../../ci/lang/zh-cn.php'; ?>
<?php include '../../ci/view/header.html.php'; ?>
<?php include '../../common/view/header.html.php'; ?>
<div id='mainContent' class='main-row'>
<div class='side-col' id='sidebar'>
<?php include '../../ci/view/menu.html.php'; ?>
</div>
<div class='main-col main-content'>
<?php echo $logs; ?>
</div>
+4 -3
View File
@@ -123,7 +123,7 @@ $lang->menu->my = '<span> 我的地盘</span>|my|index';
$lang->menu->product = $lang->productCommon . '|product|index|locate=no';
$lang->menu->project = $lang->projectCommon . '|project|index|locate=no';
$lang->menu->qa = '测试|qa|index';
$lang->menu->devops = array('link' => '持续集成|repo|browse', 'subModule' => 'repo,ci');
$lang->menu->devops = array('link' => '持续集成|repo|browse', 'subModule' => 'repo,ci,jenkins');
$lang->menu->doc = '文档|doc|index';
$lang->menu->report = '统计|report|index';
$lang->menu->company = '组织|company|index';
@@ -340,8 +340,9 @@ $lang->repo->menu->maintain = array('link' =>'代码库|repo|maintain', 'alias'
$lang->repo->menu->job = array('link' =>'构建|ci|browsejob', 'alias' => 'createjob,editjob,browsebuild,viewbuildlogs');
$lang->repo->menu->jenkins = array('link' =>'Jenkins|jenkins|browse', 'alias' => 'create,edit');
$lang->ci = new stdclass();
$lang->ci->menu = $lang->repo->menu;
$lang->ci = new stdclass();
$lang->ci->menu = $lang->repo->menu;
$lang->jenkins->menu = $lang->repo->menu;
/* 文档视图菜单设置。*/
$lang->doc = new stdclass();
+14 -11
View File
@@ -1,7 +1,7 @@
<?php
/**
* The control file of cijenkins module of ZenTaoPMS.
* The control file of jenkins module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
@@ -13,14 +13,17 @@
class jenkins extends control
{
/**
* cijenkins constructor.
* jenkins constructor.
* @param string $moduleName
* @param string $methodName
*/
public function __construct($moduleName = '', $methodName = '')
{
parent::__construct($moduleName, $methodName);
$this->app->loadLang('ci');
if(common::hasPriv('jenkins', 'create') and strpos(',browsejob,', $this->methodName) > -1) {
$this->lang->modulePageActions = html::a(helper::createLink('jenkins', 'create'), "<i class='icon icon-plus text-muted'></i> " . $this->lang->jenkins->create, '', "class='btn'");
}
}
/**
@@ -38,7 +41,7 @@ class jenkins extends control
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
$this->view->jenkinsList = $this->cijenkins->listAll($orderBy, $pager);
$this->view->jenkinsList = $this->jenkins->listAll($orderBy, $pager);
$this->view->title = $this->lang->ci->jenkins . $this->lang->colon . $this->lang->ci->browse;
@@ -48,7 +51,7 @@ class jenkins extends control
$this->view->orderBy = $orderBy;
$this->view->pager = $pager;
$this->view->module = 'cijenkins';
$this->view->module = 'jenkins';
$this->display();
}
@@ -62,7 +65,7 @@ class jenkins extends control
{
if($_POST)
{
$this->cijenkins->create();
$this->jenkins->create();
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browse')));
}
@@ -75,7 +78,7 @@ class jenkins extends control
$this->view->position[] = $this->lang->ci->create;
$this->view->credentialsList = $this->loadModel('cicredentials')->listForSelection("type='token' or type='account'");
$this->view->module = 'cijenkins';
$this->view->module = 'jenkins';
$this->display();
}
@@ -89,10 +92,10 @@ class jenkins extends control
*/
public function edit($id)
{
$jenkins = $this->cijenkins->getByID($id);
$jenkins = $this->jenkins->getByID($id);
if($_POST)
{
$this->cijenkins->update($id);
$this->jenkins->update($id);
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browse')));
}
@@ -107,7 +110,7 @@ class jenkins extends control
$this->view->jenkins = $jenkins;
$this->view->credentialsList = $this->loadModel('cicredentials')->listForSelection("type='token' or type='account'");
$this->view->module = 'cijenkins';
$this->view->module = 'jenkins';
$this->display();
}
@@ -120,7 +123,7 @@ class jenkins extends control
*/
public function delete($id)
{
$this->cijenkins->delete(TABLE_JENKINS, $id);
$this->jenkins->delete(TABLE_JENKINS, $id);
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->send(array('result' => 'success'));
+1 -1
View File
@@ -1,4 +1,4 @@
$(function()
{
$('#' + module + 'Tab').addClass('btn-active-text');
})
-1
View File
@@ -1,4 +1,3 @@
$(function()
{
$('#' + module + 'Tab').addClass('btn-active-text');
});
-1
View File
@@ -1,4 +1,3 @@
$(function()
{
$('#' + module + 'Tab').addClass('btn-active-text');
});
+1
View File
@@ -1,4 +1,5 @@
<?php
$lang->jenkins->create = '创建Jenkins';
$lang->jenkins->delete = '删除Jenkins';
$lang->jenkins->confirmDelete = '确认删除该Jenkins吗?';
+1 -5
View File
@@ -10,14 +10,10 @@
* @link http://www.zentao.net
*/
?>
<?php include '../../ci/lang/zh-cn.php'; ?>
<?php include '../../ci/view/header.html.php'; ?>
<?php include '../../common/view/header.html.php'; ?>
<?php js::set('confirmDelete', $lang->jenkins->confirmDelete); ?>
<div id='mainContent' class='main-row'>
<div class='side-col' id='sidebar'>
<?php include '../../ci/view/menu.html.php'; ?>
</div>
<div class='main-col main-content'>
<form class='main-table' id='ajaxForm' method='post'>
<table id='jenkinsList' class='table has-sort-head table-fixed'>
+1 -6
View File
@@ -10,14 +10,9 @@
* @link http://www.zentao.net
*/
?>
<?php include '../../ci/lang/zh-cn.php'; ?>
<?php include '../../ci/view/header.html.php'; ?>
<?php include '../../common/view/form.html.php'; ?>
<?php include '../../common/view/header.html.php'; ?>
<div id='mainContent' class='main-row'>
<div class='side-col' id='sidebar'>
<?php include '../../ci/view/menu.html.php'; ?>
</div>
<div class='main-col main-content'>
<div class='center-block'>
<div class='main-header'>
+1 -6
View File
@@ -10,14 +10,9 @@
* @link http://www.zentao.net
*/
?>
<?php include '../../ci/lang/zh-cn.php'; ?>
<?php include '../../ci/view/header.html.php'; ?>
<?php include '../../common/view/form.html.php'; ?>
<?php include '../../common/view/header.html.php'; ?>
<div id='mainContent' class='main-row'>
<div class='side-col' id='sidebar'>
<?php include '../../ci/view/menu.html.php'; ?>
</div>
<div class='main-col main-content'>
<div class='center-block'>
<div class='main-header'>