diff --git a/db/update15.2.sql b/db/update15.2.sql new file mode 100644 index 0000000000..59b2d09522 --- /dev/null +++ b/db/update15.2.sql @@ -0,0 +1,5 @@ +ALTER TABLE `zt_job` +ADD `engine` varchar(20) NOT NULL AFTER `frame`, +CHANGE `jkHost` `server` mediumint(0) UNSIGNED NOT NULL AFTER `frame`, +CHANGE `jkJob` `pipeline` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `server`; + diff --git a/module/compile/lang/zh-cn.php b/module/compile/lang/zh-cn.php index 4814769834..7f9395de3c 100644 --- a/module/compile/lang/zh-cn.php +++ b/module/compile/lang/zh-cn.php @@ -3,11 +3,12 @@ $lang->compile->common = '构建'; $lang->compile->browse = '构建历史'; $lang->compile->logs = '构建日志'; -$lang->compile->id = 'ID'; -$lang->compile->name = '构建名称'; -$lang->compile->status = '构建状态'; -$lang->compile->time = '构建时间'; -$lang->compile->result = '构建结果'; +$lang->compile->id = 'ID'; +$lang->compile->name = '构建名称'; +$lang->compile->buildType = '构建引擎'; +$lang->compile->status = '构建状态'; +$lang->compile->time = '构建时间'; +$lang->compile->result = '构建结果'; $lang->compile->statusList['success'] = '成功'; $lang->compile->statusList['failure'] = '失败'; diff --git a/module/compile/model.php b/module/compile/model.php index b03b2b7036..d18c4a10a7 100644 --- a/module/compile/model.php +++ b/module/compile/model.php @@ -34,7 +34,7 @@ class compileModel extends model */ public function getList($jobID, $orderBy = 'id_desc', $pager = null) { - return $this->dao->select('t1.id, t1.name, t1.job, t1.status, t1.createdDate,t1.testtask, t2.pipeline,t2.triggerType,t2.comment,t2.atDay,t2.atTime, t3.name as repoName, t4.name as jenkinsName')->from(TABLE_COMPILE)->alias('t1') + return $this->dao->select('t1.id, t1.name, t1.job, t1.status, t1.createdDate, t1.testtask, t2.pipeline, t2.triggerType, t2.comment, t2.atDay, t2.atTime, t2.engine, t3.name as repoName, t4.name as jenkinsName')->from(TABLE_COMPILE)->alias('t1') ->leftJoin(TABLE_JOB)->alias('t2')->on('t1.job=t2.id') ->leftJoin(TABLE_REPO)->alias('t3')->on('t2.repo=t3.id') ->leftJoin(TABLE_PIPELINE)->alias('t4')->on('t2.server=t4.id') diff --git a/module/compile/view/browse.html.php b/module/compile/view/browse.html.php index 0f8820e775..3407431d45 100644 --- a/module/compile/view/browse.html.php +++ b/module/compile/view/browse.html.php @@ -28,8 +28,8 @@ recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?> compile->id);?> compile->name);?> + compile->buildType;?> job->repo;?> - job->jenkins;?> job->triggerType;?> compile->status);?> compile->time);?> @@ -41,9 +41,9 @@ createLink('job', 'view', "jobID={$build->job}&compileID={$build->id}", 'html', true), $build->name, '', "class='iframe' data-width='90%'") : $build->name;?> + engine;?> repoName;?> pipeline) . '@' . $build->jenkinsName;?> - loadModel('job')->getTriggerConfig($build);?> compile->statusList, $build->status);?> diff --git a/module/doc/css/objectlibs.css b/module/doc/css/objectlibs.css index 3b408371a6..7b016bd863 100644 --- a/module/doc/css/objectlibs.css +++ b/module/doc/css/objectlibs.css @@ -18,9 +18,14 @@ #sidebar {width: 275px;} #sidebar>.cell {width: 100%;} #sidebar>.sidebar-toggle {left: 3px; right: auto;} -#title {font-size: 15px; font-weight: 600;} +#project, #product, #custom, #book {min-height: 160px;} +#title .menu-title {font-size: 15px; font-weight: 600; position: relative; padding: 2px 0 2px 15px;list-style: none;} +#title .dropdown-menu-book {left: -67px; top: 38px;} +#title .dropdown-menu-doc {left: -80px; top: 38px;} .hide-sidebar #sidebar>.cell {left: -270px;} .hide-sidebar #sidebar>.sidebar-toggle>.icon:before {content: "\e314";} .detail.empty {line-height: 200px;} .main-col+.side-col {padding-left: 16px;} .main-col iframe {min-height: 380px;} +.menu-actions {position: absolute; top: 0; right: 0; padding: 7px 8px;} +.menu-actions i {font-size: 15px; color: #8c8c8c;} diff --git a/module/doc/js/objectlibs.js b/module/doc/js/objectlibs.js index db5256d142..78ada9cc4c 100644 --- a/module/doc/js/objectlibs.js +++ b/module/doc/js/objectlibs.js @@ -1,3 +1,8 @@ +$(function() +{ + if($.cookie('isFullScreen') == 1) fullScreen(); +}) + /** * Ajax delete doc. * @@ -45,25 +50,32 @@ function fullScreen() { $('#content .actions').addClass('hidden'); requestMethod.call(element); + $.cookie('isFullScreen', 1); } } +function exitFullScreen() +{ + $('#content .actions').removeClass('hidden'); + $.cookie('isFullScreen', 0); +} + document.addEventListener("fullscreenchange", function (e) { - if(!document.fullscreenElement) $('#content .actions').removeClass('hidden'); + if(!document.fullscreenElement) exitFullScreen(); }) document.addEventListener("webkitfullscreenchange", function (e) { - if(!document.webkitFullscreenElement) $('#content .actions').removeClass('hidden'); + if(!document.webkitFullscreenElement) exitFullScreen(); }) document.addEventListener("mozfullscreenchange", function (e) { - if(!document.mozFullScreenElement) $('#content .actions').removeClass('hidden'); + if(!document.mozFullScreenElement) exitFullScreen(); }) document.addEventListener("msfullscreenChange", function (e) { - if(!document.msfullscreenElement) $('#content .actions').removeClass('hidden'); + if(!document.msfullscreenElement) exitFullScreen(); }) diff --git a/module/doc/model.php b/module/doc/model.php index a6a571246c..50c9137d81 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -1823,19 +1823,43 @@ class docModel extends model { if($type != 'custom' and $type != 'book' and empty($objects)) return ''; - $output = ''; + $output = ''; + $closedProjectsHtml = ''; + $clseedProjects = array(); + $maxHeight = ($type == 'project' and $this->app->openApp == 'doc') ? '260px' : '290px'; + $class = ($type == 'project' and $this->app->openApp == 'doc') ? 'col-left' : ''; if($this->app->openApp == 'doc' and $type != 'custom' and $type != 'book') { - $output = "
"; } - $output .= ""; } if(!empty($libs)) @@ -1908,8 +1932,7 @@ class docModel extends model if(empty($treeMenu)) return ''; - $menu = ""; - $menu .= "'; + $menu = "'; return $menu; } diff --git a/module/doc/view/side.html.php b/module/doc/view/side.html.php index 7c34571ec3..61ed8775a4 100644 --- a/module/doc/view/side.html.php +++ b/module/doc/view/side.html.php @@ -16,6 +16,40 @@ $sideWidth = common::checkNotCN() ? '270' : '238'; ?>
+
+ + "; + echo html::a('javascript:;', "", '', "data-toggle='dropdown' class='btn btn-link'"); + echo "
'; + } + + if($type == 'book' and ($canEditLib or $canManageBook)) + { + echo "'; + } + ?> +

@@ -28,22 +62,6 @@ $sideWidth = common::checkNotCN() ? '270' : '238'; -
- doc->editBook, '', "class='btn btn-info btn-wide iframe'", '', true); - common::printLink('doc', 'manageBook', "bookID=$libID", $lang->doc->manageBook, '', "class='btn btn-info btn-wide'"); - } - else - { - common::printLink('tree', 'browse', "rootID=$libID&view=doc", $lang->doc->manageType, '', "class='btn btn-info btn-wide iframe'", '', true); - common::printLink('doc', 'editLib', "rootID=$libID", $lang->doc->editLib, '', "class='btn btn-info btn-wide iframe'", '', true); - common::printLink('doc', 'deleteLib', "rootID=$libID", $lang->doc->deleteLib, 'hiddenwin', "class='btn btn-info btn-wide'"); - } - ?> -
-