Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
@@ -2,6 +2,8 @@ ALTER TABLE `zt_storyspec` CHANGE `title` `title` varchar(255) NOT NULL;
|
||||
update `zt_todo` set assignedTo = 'closed', assignedDate = closedDate where status = 'closed';
|
||||
DROP TABLE IF EXISTS `zt_webhookdatas`;
|
||||
|
||||
ALTER TABLE `zt_webhook` ADD `domain` varchar(255) NOT NULL AFTER `url`;
|
||||
|
||||
ALTER TABLE `zt_action` DROP INDEX `action`;
|
||||
ALTER TABLE `zt_action` ADD INDEX `date` (`date`);
|
||||
ALTER TABLE `zt_action` ADD INDEX `actor` (`actor`);
|
||||
|
||||
@@ -896,6 +896,7 @@ CREATE TABLE IF NOT EXISTS `zt_webhook` (
|
||||
`type` varchar(10) NOT NULL DEFAULT 'default',
|
||||
`name` varchar(50) NOT NULL,
|
||||
`url` varchar(255) NOT NULL,
|
||||
`domain` varchar(255) NOT NULL,
|
||||
`contentType` varchar(30) NOT NULL DEFAULT 'application/json',
|
||||
`sendType` enum('sync','async') NOT NULL DEFAULT 'sync',
|
||||
`products` text NOT NULL,
|
||||
|
||||
@@ -16,6 +16,7 @@ $lang->webhook->id = 'ID';
|
||||
$lang->webhook->type = 'Type';
|
||||
$lang->webhook->name = 'Name';
|
||||
$lang->webhook->url = 'Webhook Address';
|
||||
$lang->webhook->domain = 'Zentao Domain';
|
||||
$lang->webhook->contentType = 'Content Type';
|
||||
$lang->webhook->sendType = 'Send Type';
|
||||
$lang->webhook->product = "{$lang->productCommon}";
|
||||
|
||||
@@ -16,6 +16,7 @@ $lang->webhook->id = 'ID';
|
||||
$lang->webhook->type = '类型';
|
||||
$lang->webhook->name = '名称';
|
||||
$lang->webhook->url = 'Hook地址';
|
||||
$lang->webhook->domain = '禅道域名';
|
||||
$lang->webhook->contentType = '内容类型';
|
||||
$lang->webhook->sendType = '发送方式';
|
||||
$lang->webhook->product = "关联{$lang->productCommon}";
|
||||
|
||||
@@ -220,7 +220,7 @@ class webhookModel extends model
|
||||
|
||||
$object = $this->dao->select('*')->from($this->config->objectTables[$objectType])->where('id')->eq($objectID)->fetch();
|
||||
$field = $this->config->action->objectNameFields[$objectType];
|
||||
$host = common::getSysURL();
|
||||
$host = empty($webhook->domain) ? common::getSysURL() : $webhook->domain;
|
||||
$viewLink = $this->getViewLink($objectType, $objectID);
|
||||
$title = $this->app->user->realname . $this->lang->action->label->$actionType . $this->lang->action->objectTypes[$objectType];
|
||||
$text = $title . ' ' . "[#{$objectID}::{$object->$field}](" . $host . $viewLink . ")";
|
||||
|
||||
@@ -35,6 +35,11 @@
|
||||
<td><?php echo html::input('url', '', "class='form-control'");?></td>
|
||||
<td id='urlNote'><?php echo $lang->webhook->note->typeList['default'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->webhook->domain;?></th>
|
||||
<td><?php echo html::input('domain', common::getSysURL(), "class='form-control'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr id='sendTypeTR'>
|
||||
<th><?php echo $lang->webhook->sendType;?></th>
|
||||
<td><?php echo html::select('sendType', $lang->webhook->sendTypeList, '', "class='form-control'");?></td>
|
||||
|
||||
@@ -34,6 +34,11 @@
|
||||
<td><?php echo html::input('url', $webhook->url, "class='form-control'");?></td>
|
||||
<td><?php echo zget($lang->webhook->note->typeList, $webhook->type);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->webhook->domain;?></th>
|
||||
<td><?php echo html::input('domain', $webhook->domain, "class='form-control'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php if($webhook->type != 'dingding'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->webhook->sendType;?></th>
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user