- [refac] Remove useless code and files about duckdb.
This commit is contained in:
@@ -471,54 +471,4 @@ class install extends control
|
||||
$this->view->sendEventLink = $sendEventLink;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* 安装DuckDB引擎界面。
|
||||
* Install duckdb.
|
||||
*
|
||||
* @param int $download
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function installDuckdb()
|
||||
{
|
||||
$this->loadModel('bi');
|
||||
$this->bi->updateDownloadingTagFile('file', 'remove');
|
||||
$this->bi->updateDownloadingTagFile('extension_dm', 'remove');
|
||||
$this->bi->updateDownloadingTagFile('extension_mysql', 'remove');
|
||||
|
||||
$this->view->title = $this->lang->install->installDuckdb;
|
||||
$this->view->duckdb = 'loading';
|
||||
$this->view->ext_dm = 'loading';
|
||||
$this->view->ext_mysql = 'loading';
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* 安装DuckDB引擎。
|
||||
* AJAX: Install duckdb.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxInstallDuckdb()
|
||||
{
|
||||
ignore_user_abort(true);
|
||||
set_time_limit(0);
|
||||
session_write_close();
|
||||
$this->loadModel('bi')->downloadDuckdb();
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查duckdb文件是否下载完成。
|
||||
* AJAX: Check duckdb.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxCheckDuckdb()
|
||||
{
|
||||
$check = $this->loadModel('bi')->checkDuckdbInstall();
|
||||
echo(json_encode($check));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
$(document).ready(function()
|
||||
{
|
||||
ajaxInstallDuckdb();
|
||||
setTimeout(() => {ajaxCheckDuckdb()}, 1000);
|
||||
});
|
||||
|
||||
/**
|
||||
* 安装duckdb。
|
||||
* Ajax install duckdb.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function ajaxInstallDuckdb()
|
||||
{
|
||||
let url = $.createLink('install', 'ajaxInstallDuckdb');
|
||||
$.get(url);
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查duckdb。
|
||||
* Ajax check duckdb.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function ajaxCheckDuckdb()
|
||||
{
|
||||
let url = $.createLink('install', 'ajaxCheckDuckdb');
|
||||
$.get(url, function(resp)
|
||||
{
|
||||
resp = JSON.parse(resp);
|
||||
const {loading, ok, fail, duckdb, ext_dm, ext_mysql} = resp;
|
||||
if(loading) setTimeout(() => {ajaxCheckDuckdb()}, 500);
|
||||
|
||||
$('#installDuckdb p').addClass('hidden');
|
||||
$('#installDuckdb p.duckdb-' + duckdb).removeClass('hidden');
|
||||
$('#installDuckdb p.ext_dm-' + ext_dm).removeClass('hidden');
|
||||
$('#installDuckdb p.ext_mysql-' + ext_mysql).removeClass('hidden');
|
||||
|
||||
if(fail) $('#installDuckdb .help').removeClass('hidden');
|
||||
});
|
||||
}
|
||||
@@ -118,16 +118,6 @@ $lang->install->mkdirWin = '<p>%s Verzeichnis muss erstellt werden.<br /> B
|
||||
$lang->install->chmodWin = ' "%s" Berechtigung muss geändert werden.';
|
||||
$lang->install->mkdirLinux = '<p>%s Verzeichnis muss erstellt werden.<br /> Befehl <code>mkdir -p %s</code> zur Erstellung.</p>';
|
||||
$lang->install->chmodLinux = ' "%s" Berechtigung muss geändert werden.<br /> Befehl <code>chmod 777 -R %s</code> für die Anpassung.';
|
||||
$lang->install->duckdb = 'DuckDB Engine';
|
||||
$lang->install->duckdbLoading = 'Installing, please wait...';
|
||||
$lang->install->duckdbFail = 'The duckdb engine failed to install. Please refer to the manual for manual installation.';
|
||||
|
||||
$lang->install->installDuckdb = 'Installing DuckDB';
|
||||
$lang->install->installingDuckdb = 'Installing duckdb engine...';
|
||||
$lang->install->installedDuckdb = 'Duckdb engine installed successfully!';
|
||||
$lang->install->installingExtension = 'Installing the duckdb Engine extension [%s]...';
|
||||
$lang->install->installedExtension = 'Duckdb Engine extension [%s] installed!';
|
||||
$lang->install->installedFail = '[%s] Installation failed';
|
||||
|
||||
$lang->install->timezone = 'Set Timezone';
|
||||
$lang->install->defaultLang = 'Standard Sprache';
|
||||
|
||||
@@ -118,16 +118,6 @@ $lang->install->mkdirWin = '<p>%s directory has to be created.<br /> Run <c
|
||||
$lang->install->chmodWin = ' "%s" privilege has to be changed.';
|
||||
$lang->install->mkdirLinux = '<p>%s directory has to be created.<br /> Run <code>mkdir -p %s</code> to create it.</p>';
|
||||
$lang->install->chmodLinux = ' "%s" permison has to be changed.<br /> Run <code>chmod 777 -R %s</code> to change it.';
|
||||
$lang->install->duckdb = 'DuckDB Engine';
|
||||
$lang->install->duckdbLoading = 'Installing, please wait...';
|
||||
$lang->install->duckdbFail = 'The duckdb engine failed to install. Please refer to the manual for manual installation.';
|
||||
|
||||
$lang->install->installDuckdb = 'Installing DuckDB';
|
||||
$lang->install->installingDuckdb = 'Installing duckdb engine...';
|
||||
$lang->install->installedDuckdb = 'Duckdb engine installed successfully!';
|
||||
$lang->install->installingExtension = 'Installing the duckdb Engine extension [%s]...';
|
||||
$lang->install->installedExtension = 'Duckdb Engine extension [%s] installed!';
|
||||
$lang->install->installedFail = '[%s] Installation failed';
|
||||
|
||||
$lang->install->timezone = 'Set Timezone';
|
||||
$lang->install->defaultLang = 'Default Language';
|
||||
|
||||
@@ -118,16 +118,6 @@ $lang->install->mkdirWin = '<p>Le répertoire %s doit être créé.<br /> E
|
||||
$lang->install->chmodWin = ' "%s" privilege has to be changed.';
|
||||
$lang->install->mkdirLinux = '<p>Le répertoire %s doit être créé.<br /> Exécutez <code>mkdir -p %s</code> pour le créer.</p>';
|
||||
$lang->install->chmodLinux = 'Les permission de "%s" doivent être modifiées.<br /> Exécutez <code>chmod 777 -R %s</code> pour les changer.';
|
||||
$lang->install->duckdb = 'DuckDB Engine';
|
||||
$lang->install->duckdbLoading = 'Installing, please wait...';
|
||||
$lang->install->duckdbFail = 'The duckdb engine failed to install. Please refer to the manual for manual installation.';
|
||||
|
||||
$lang->install->installDuckdb = 'Installing DuckDB';
|
||||
$lang->install->installingDuckdb = 'Installing duckdb engine...';
|
||||
$lang->install->installedDuckdb = 'Duckdb engine installed successfully!';
|
||||
$lang->install->installingExtension = 'Installing the duckdb Engine extension [%s]...';
|
||||
$lang->install->installedExtension = 'Duckdb Engine extension [%s] installed!';
|
||||
$lang->install->installedFail = '[%s] Installation failed';
|
||||
|
||||
$lang->install->timezone = 'Set Timezone';
|
||||
$lang->install->defaultLang = 'Langue par défaut';
|
||||
|
||||
@@ -118,16 +118,6 @@ $lang->install->mkdirWin = '<p>需要创建目录%s。命令为:<br /> mk
|
||||
$lang->install->chmodWin = '需要修改目录 "%s" 的权限。';
|
||||
$lang->install->mkdirLinux = '<p>需要创建目录%s。<br /> 命令为:<br /> mkdir -p %s</p>';
|
||||
$lang->install->chmodLinux = '需要修改目录 "%s" 的权限。<br />命令为:<br />chmod 777 -R %s';
|
||||
$lang->install->duckdb = 'DuckDB引擎';
|
||||
$lang->install->duckdbLoading = '正在安装中,请稍后...';
|
||||
$lang->install->duckdbFail = '安装duckdb引擎失败,请参考手册进行手动安装。';
|
||||
|
||||
$lang->install->installDuckdb = '安装DuckDB';
|
||||
$lang->install->installingDuckdb = '正在安装duckdb引擎...';
|
||||
$lang->install->installedDuckdb = '安装duckdb引擎成功!';
|
||||
$lang->install->installingExtension = '正在安装duckdb引擎扩展[%s]...';
|
||||
$lang->install->installedExtension = '安装duckdb引擎扩展[%s]成功!';
|
||||
$lang->install->installedFail = '[%s]安装失败';
|
||||
|
||||
$lang->install->timezone = '时区设置';
|
||||
$lang->install->defaultLang = '默认语言';
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* The install duckdb view file of install 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 Yanyi Cao <caoyanyi@easycorp.ltd>
|
||||
* @package install
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
namespace zin;
|
||||
|
||||
$icons = array
|
||||
(
|
||||
'loading' => 'spinner-indicator',
|
||||
'ok' => 'check-circle',
|
||||
'fail' => 'close'
|
||||
);
|
||||
|
||||
$iconClass = array
|
||||
(
|
||||
'loading' => 'spin',
|
||||
'ok' => 'text-success',
|
||||
'fail' => 'text-danger'
|
||||
);
|
||||
|
||||
$duckdbLang = array
|
||||
(
|
||||
'loading' => $lang->install->installingDuckdb,
|
||||
'ok' => $lang->install->installedDuckdb,
|
||||
'fail' => $lang->install->installedFail,
|
||||
);
|
||||
|
||||
$extLang = array
|
||||
(
|
||||
'loading' => $lang->install->installingExtension,
|
||||
'ok' => $lang->install->installedExtension,
|
||||
'fail' => $lang->install->installedFail,
|
||||
);
|
||||
|
||||
$fnGenerateInfo = function($type, $stus, $show = false) use ($lang, $icons, $iconClass, $duckdbLang, $extLang)
|
||||
{
|
||||
return p
|
||||
(
|
||||
setClass("$type-$stus" . ($show ? '' : ' hidden')),
|
||||
icon
|
||||
(
|
||||
setClass($iconClass[$stus]),
|
||||
$icons[$stus]
|
||||
),
|
||||
$type == 'duckdb' ? sprintf($duckdbLang[$stus], $lang->install->duckdb) : null,
|
||||
$type == 'ext_dm' || $type == 'ext_mysql' ? sprintf($extLang[$stus], $type) : null,
|
||||
);
|
||||
};
|
||||
|
||||
$fnGenerateItems = function() use ($icons, $fnGenerateInfo, $duckdb, $ext_dm, $ext_mysql)
|
||||
{
|
||||
$items = array();
|
||||
foreach(array_keys($icons) as $stus)
|
||||
{
|
||||
$items[] = $fnGenerateInfo('duckdb', $stus, $stus == $duckdb);
|
||||
$items[] = $fnGenerateInfo('ext_dm', $stus, $stus == $ext_dm);
|
||||
$items[] = $fnGenerateInfo('ext_mysql', $stus, $stus == $ext_mysql);
|
||||
}
|
||||
|
||||
return $items;
|
||||
};
|
||||
|
||||
div
|
||||
(
|
||||
setID('installDuckdb'),
|
||||
$fnGenerateItems(),
|
||||
span
|
||||
(
|
||||
setClass('help text-warning hidden'),
|
||||
$lang->install->duckdbFail,
|
||||
btn
|
||||
(
|
||||
set::type('link'),
|
||||
set::url($config->bi->duckdbHelp),
|
||||
set::target('blank'),
|
||||
$config->bi->duckdbHelp
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -1703,6 +1703,8 @@ $config->delete['21_7_6'][] = 'extension/ipd/chart/ext/js/create';
|
||||
$config->delete['21_7_7'][] = 'extension/biz/dashboard';
|
||||
$config->delete['21_7_7'][] = 'extension/max/dashboard';
|
||||
$config->delete['21_7_7'][] = 'extension/ipd/dashboard';
|
||||
$config->delete['21_7_7'][] = 'module/install/js/installduckdb.ui.js';
|
||||
$config->delete['21_7_7'][] = 'module/install/ui/installduckdb.html.php';
|
||||
|
||||
$config->upgrade->openModules = array('action', 'admin', 'ai', 'bi', 'aiapp', 'api', 'automation', 'backup', 'block', 'branch', 'budget', 'bug', 'build', 'cache', 'caselib', 'chart', 'ci', 'client', 'common', 'company', 'compile', 'convert', 'cron', 'custom', 'datatable', 'dataview', 'dept', 'design', 'dev', 'dimension', 'doc', 'durationestimation', 'entry', 'execution', 'extension', 'file', 'git', 'gitlab', 'group', 'holiday', 'im', 'index', 'index.html', 'install', 'issue', 'jenkins', 'job', 'kanban', 'license', 'mail', 'message', 'metric', 'misc', 'mr', 'my', 'personnel', 'pipeline', 'product', 'productplan', 'productset', 'program', 'programplan', 'project', 'projectbuild', 'projectplan', 'projectrelease', 'projectstory', 'pivot', 'qa', 'release', 'repo', 'report', 'risk', 'score', 'screen', 'search', 'setting', 'sonarqube', 'sso', 'stage', 'stakeholder', 'story', 'subject', 'svn', 'task', 'testcase', 'testreport', 'testsuite', 'testtask', 'todo', 'tree', 'tutorial', 'upgrade', 'user', 'webhook', 'weekly', 'workestimation', 'gitea', 'gogs', 'transfer', 'zahost', 'zanode', 'editor', 'charter', 'roadmap', 'account', 'cne', 'host', 'instance', 'ops', 'serverroom', 'space', 'store', 'system', 'solution', 'demand', 'gitfox', 'epic', 'requirement', 'mark', 'zai');
|
||||
$config->upgrade->unsetModules = array('design', 'program', 'programplan', 'projectbuild', 'projectrelease', 'stage', 'stakeholder', 'product', 'branch', 'productplan', 'release', 'build', 'qa', 'bug', 'testcase', 'testtask', 'testreport', 'testsuite', 'caselib', 'automation', 'repo', 'ci', 'compile', 'jenkins', 'job', 'svn', 'gitlab', 'sonarqube', 'mr', 'git', 'report', 'sqlbuilder', 'feedback', 'faq', 'attend', 'holiday', 'leave', 'makeup', 'overtime', 'lieu', 'ops', 'host', 'serverroom', 'account', 'domain', 'service', 'deploy', 'conference', 'traincourse', 'pssp', 'baseline', 'classify', 'cm', 'cmcl', 'auditcl', 'reviewcl', 'process', 'activity', 'zoutput', 'auditplan', 'nc', 'subject', 'weekly', 'workestimation', 'issue', 'durationestimation', 'risk', 'opportunity', 'trainplan', 'gapanalysis', 'researchplan', 'researchreport', 'meeting', 'meetingroom', 'budget', 'reviewissue', 'reviewsetting', 'review', 'milestone', 'measurement', 'measrecord', 'assetlib', 'setting', 'im', 'client', 'ldap', 'dev', 'api', 'gitea', 'gogs', 'zanode', 'zahost');
|
||||
|
||||
@@ -831,36 +831,6 @@ class upgrade extends control
|
||||
echo 'ok';
|
||||
}
|
||||
|
||||
/**
|
||||
* 安装DuckDB引擎。
|
||||
* AJAX: Install duckdb.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxInstallDuckdb()
|
||||
{
|
||||
$this->loadModel('bi');
|
||||
ignore_user_abort(true);
|
||||
set_time_limit(0);
|
||||
session_write_close();
|
||||
$this->bi->downloadDuckdb();
|
||||
echo 'success';
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查duckdb文件是否下载完成。
|
||||
* AJAX: Check duckdb.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxCheckDuckdb()
|
||||
{
|
||||
$check = $this->loadModel('bi')->checkDuckdbInstall();
|
||||
echo json_encode($check);
|
||||
}
|
||||
|
||||
/**
|
||||
* 定时任务:处理内置关联关系。
|
||||
* AJAX: Process object relation.
|
||||
|
||||
@@ -11,74 +11,3 @@ window.submitConfirm = function(event)
|
||||
updateProgressInterval();
|
||||
updateProgress();
|
||||
}
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
if(typeof result != 'undefined' && result == 'duckdbFail')
|
||||
{
|
||||
$('#duckdbInfo').append($('#installDuckdb'));
|
||||
initStatus();
|
||||
ajaxInstallDuckdb();
|
||||
setTimeout(() => {ajaxCheckDuckdb()}, 1000);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* 初始化状态。
|
||||
* Init status.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function initStatus()
|
||||
{
|
||||
$('#refreshBtn').addClass('hidden');
|
||||
$('#installDuckdb p').addClass('hidden');
|
||||
$('#installDuckdb p.duckdb-' + duckdb).removeClass('hidden');
|
||||
$('#installDuckdb p.ext_dm-' + ext_dm).removeClass('hidden');
|
||||
$('#installDuckdb p.ext_mysql-' + ext_mysql).removeClass('hidden');
|
||||
}
|
||||
|
||||
/**
|
||||
* 安装duckdb。
|
||||
* Ajax install duckdb.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function ajaxInstallDuckdb()
|
||||
{
|
||||
let url = $.createLink('upgrade', 'ajaxInstallDuckdb');
|
||||
$.get(url);
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查duckdb。
|
||||
* Ajax check duckdb.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function ajaxCheckDuckdb()
|
||||
{
|
||||
let url = $.createLink('upgrade', 'ajaxCheckDuckdb');
|
||||
$.get(url, function(resp)
|
||||
{
|
||||
resp = JSON.parse(resp);
|
||||
const {loading, ok, fail, duckdb, ext_dm, ext_mysql} = resp;
|
||||
if(loading) setTimeout(() => {ajaxCheckDuckdb()}, 500);
|
||||
|
||||
if(!loading)
|
||||
{
|
||||
$('#refreshBtn').removeClass('hidden');
|
||||
$('.after-duckdb').addClass('hidden');
|
||||
}
|
||||
|
||||
$('#installDuckdb p').addClass('hidden');
|
||||
$('#installDuckdb p.duckdb-' + duckdb).removeClass('hidden');
|
||||
$('#installDuckdb p.ext_dm-' + ext_dm).removeClass('hidden');
|
||||
$('#installDuckdb p.ext_mysql-' + ext_mysql).removeClass('hidden');
|
||||
|
||||
if(fail) $('#installDuckdb .help').removeClass('hidden');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -73,7 +73,6 @@ $lang->upgrade->showSQLLog = 'Your database is inconsistent with the standard
|
||||
$lang->upgrade->noticeErrSQL = 'Your database is inconsistent with the standard and it failed to fix it. Please run the following SQL and refresh.';
|
||||
$lang->upgrade->execCommand = 'Bitte führen Sie den obigen Befehl auf dem Server aus und aktualisieren Sie die Seite nach der Ausführung.';
|
||||
$lang->upgrade->afterExec = 'Please manually modify the database according to the above error information, and refresh after modifiy!';
|
||||
$lang->upgrade->afterDuckdb = 'Please wait for Duckdb engine to install.';
|
||||
$lang->upgrade->mergeProgram = 'Data Merge';
|
||||
$lang->upgrade->mergeTips = 'Data Migration Tips';
|
||||
$lang->upgrade->toPMS15Guide = 'ZenTao open source version 15 upgrade';
|
||||
|
||||
@@ -79,7 +79,6 @@ $lang->upgrade->showSQLLog = 'Your database is inconsistent with the standard
|
||||
$lang->upgrade->noticeErrSQL = 'Your database is inconsistent with the standard and it failed to fix it. Please run the following SQL and refresh.';
|
||||
$lang->upgrade->execCommand = 'Please execute the above command on the server and refresh the page after execution.';
|
||||
$lang->upgrade->afterExec = 'Please manually modify the database based on the above error message, and then refresh the page.';
|
||||
$lang->upgrade->afterDuckdb = 'Please wait for Duckdb engine to install.';
|
||||
$lang->upgrade->mergeProgram = 'Data Merge';
|
||||
$lang->upgrade->mergeTips = 'Data Migration Tips';
|
||||
$lang->upgrade->toPMS15Guide = 'ZenTao open source version 15 upgrade';
|
||||
|
||||
@@ -73,7 +73,6 @@ $lang->upgrade->showSQLLog = 'Your database is inconsistent with the standard
|
||||
$lang->upgrade->noticeErrSQL = 'Votre base de donnée est inconsistente avec le standard et il y a eu un échec pour la corriger. Exécutez la commande SQL suivante et rafraichissez.';
|
||||
$lang->upgrade->afterDeleted = "Veuillez exécuter la commande ci-dessus sur le serveur et actualiser la page après exécution.";
|
||||
$lang->upgrade->afterExec = 'Please modify the database manually according to the above error information, and refresh after the modification!';
|
||||
$lang->upgrade->afterDuckdb = 'Please wait for Duckdb engine to install.';
|
||||
$lang->upgrade->mergeProgram = 'Data Merge';
|
||||
$lang->upgrade->mergeTips = 'Data Migration Tips';
|
||||
$lang->upgrade->toPMS15Guide = 'ZenTao open source version 15 upgrade';
|
||||
|
||||
@@ -79,7 +79,6 @@ $lang->upgrade->showSQLLog = '检查到你的数据库跟标准不一致,
|
||||
$lang->upgrade->noticeErrSQL = '检查到你的数据库跟标准不一致,尝试修复失败。请手动执行以下SQL语句,再刷新页面检查。';
|
||||
$lang->upgrade->execCommand = '请在服务器上执行上述命令,执行后刷新页面。';
|
||||
$lang->upgrade->afterExec = '请根据以上报错信息手动修改数据库,修改后刷新页面。';
|
||||
$lang->upgrade->afterDuckdb = '请等待安装Duckdb引擎。';
|
||||
$lang->upgrade->mergeProgram = '数据迁移';
|
||||
$lang->upgrade->mergeTips = '数据迁移提示';
|
||||
$lang->upgrade->toPMS15Guide = '禅道开源版15版本升级';
|
||||
|
||||
Reference in New Issue
Block a user