Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import GithubSettings from '@/pages/configure/settings/github'
import AzureSettings from '@/pages/configure/settings/azure'
import BitbucketSettings from '@/pages/configure/settings/bitbucket'
import GiteeSettings from '@/pages/configure/settings/gitee'
import ZentaoSettings from '@/pages/configure/settings/zentao'

// Transformation Higher-Order Component (HOC) Settings Loader
const withTransformationSettings = (
Expand Down Expand Up @@ -70,6 +71,7 @@ const ProviderTransformationSettings = (props) => {
[Providers.JIRA]: JiraSettings,
[Providers.JENKINS]: JenkinsSettings,
[Providers.TAPD]: TapdSettings,
[Providers.ZENTAO]: ZentaoSettings,
[Providers.AZURE]: AzureSettings,
[Providers.BITBUCKET]: BitbucketSettings,
[Providers.GITEE]: GiteeSettings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ const DataTransformations = (props) => {
const noTransformationsAvailable = useMemo(
() =>
[Providers.TAPD].includes(configuredConnection?.provider) ||
[Providers.ZENTAO].includes(configuredConnection?.provider) ||
([Providers.GITLAB].includes(configuredConnection?.provider) &&
dataDomainsGroup[configuredConnection?.id].every(
(e) => e.value !== DataDomainTypes.DEVOPS
Expand All @@ -86,6 +87,7 @@ const DataTransformations = (props) => {
configuredConnection?.id,
dataDomainsGroup,
Providers.TAPD,
Providers.ZENTAO,
Providers.GITLAB
]
)
Expand Down
10 changes: 10 additions & 0 deletions config-ui/src/components/menus/PipelineConfigsMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { gitextractorConfig as sampleGitextractorPipelineConfig } from '@/data/p
import { githubConfig as sampleGithubPipelineConfig } from '@/data/pipeline-config-samples/github'
import { gitlabConfig as sampleGitlabPipelineConfig } from '@/data/pipeline-config-samples/gitlab'
import { jiraConfig as sampleJiraPipelineConfig } from '@/data/pipeline-config-samples/jira'
import { zentaoConfig as sampleZentaoPipelineConfig } from '@/data/pipeline-config-samples/zentao'
import { jenkinsConfig as sampleJenkinsPipelineConfig } from '@/data/pipeline-config-samples/jenkins'
import { feishuConfig as sampleFeishuPipelineConfig } from '@/data/pipeline-config-samples/feishu'
import { dbtConfig as sampleDbtPipelineConfig } from '@/data/pipeline-config-samples/dbt'
Expand Down Expand Up @@ -137,6 +138,15 @@ const PipelineConfigsMenu = (props) => {
)
}
/>
<Menu.Item
icon='code'
text='Load Zentao Configuration'
onClick={() =>
setRawConfiguration(
JSON.stringify(sampleZentaoPipelineConfig, null, ' ')
)
}
/>
</Menu>
)
}
Expand Down
1 change: 1 addition & 0 deletions config-ui/src/components/pipelines/StageTaskName.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ const StageTaskName = (props) => {
<>{ProviderLabels.JENKINS}</>
)}
{task.plugin === Providers.TAPD && <>{ProviderLabels.TAPD}</>}
{task.plugin === Providers.ZENTAO && <>{ProviderLabels.ZENTAO}</>}
{task.plugin === Providers.JIRA && (
<>Board ID {task.options.boardId}</>
)}
Expand Down
29 changes: 28 additions & 1 deletion config-ui/src/data/Providers.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { ReactComponent as JenkinsProviderIcon } from '@/images/integrations/jen
import { ReactComponent as JiraProviderIcon } from '@/images/integrations/jira.svg'
import { ReactComponent as GitHubProviderIcon } from '@/images/integrations/github.svg'
import { ReactComponent as TapdProviderIcon } from '@/images/integrations/tapd.svg'
import { ReactComponent as ZentaoProviderIcon } from '@/images/integrations/zentao.svg'
import { ReactComponent as AzureProviderIcon } from '@/images/integrations/azure.svg'
import { ReactComponent as BitbucketProviderIcon } from '@/images/integrations/bitbucket.svg'
import { ReactComponent as GiteeProviderIcon } from '@/images/integrations/gitee.svg'
Expand Down Expand Up @@ -50,6 +51,7 @@ const Providers = {
DBT: 'dbt',
STARROCKS: 'starrocks',
TAPD: 'tapd',
ZENTAO: 'zentao',
AZURE: 'azure',
BITBUCKET: 'bitbucket',
GITEE: 'gitee',
Expand All @@ -76,7 +78,8 @@ const ProviderLabels = {
AE: 'Analysis Engine (AE)',
DBT: 'Data Build Tool (DBT)',
STARROCKS: 'StarRocks',
TAPD: 'TAPD',
TAPD: 'Tapd',
ZENTAO: 'Zentao',
AZURE: 'Azure CI',
BITBUCKET: 'BitBucket',
GITEE: 'Gitee',
Expand Down Expand Up @@ -146,6 +149,19 @@ const ProviderFormLabels = {
</>
)
},
zentao: {
name: 'Connection Name',
endpoint: 'Endpoint URL',
proxy: 'Proxy URL',
username: 'Username',
password: 'Password',
rateLimitPerHour: (
<>
Rate Limit <sup>(per hour)</sup>
<RateLimitTooltip />
</>
)
},
jira: {
name: 'Connection Name',
endpoint: 'Endpoint URL',
Expand Down Expand Up @@ -308,6 +324,14 @@ const ProviderFormPlaceholders = {
password: 'eg. ************',
rateLimitPerHour: '1000'
},
zentao: {
name: 'eg. Zentao',
endpoint: 'URL eg. http://subdomain.domain:port/api.php/v1/',
proxy: 'eg. http://proxy.localhost:8080',
username: 'eg. devlake',
password: 'eg. ************',
rateLimitPerHour: '1000'
},
jira: {
name: 'eg. JIRA',
endpoint: 'eg. https://your-domain.atlassian.net/rest/',
Expand Down Expand Up @@ -366,6 +390,9 @@ const ProviderIcons = {
[Providers.TAPD]: (w, h) => (
<TapdProviderIcon width={w || 24} height={h || 24} />
),
[Providers.ZENTAO]: (w, h) => (
<ZentaoProviderIcon width={w || 24} height={h || 24} />
),
[Providers.JIRA]: (w, h) => (
<JiraProviderIcon width={w || 24} height={h || 24} />
),
Expand Down
2 changes: 1 addition & 1 deletion config-ui/src/data/availablePlugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
* limitations under the License.
*
*/
const AVAILABLE_PLUGINS = ['gitlab', 'jira', 'jenkins', 'github', 'tapd']
const AVAILABLE_PLUGINS = ['gitlab', 'jira', 'jenkins', 'github', 'tapd', 'zentao']

module.exports = AVAILABLE_PLUGINS
22 changes: 22 additions & 0 deletions config-ui/src/data/integrations.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { ReactComponent as JenkinsProvider } from '@/images/integrations/jenkins
import { ReactComponent as JiraProvider } from '@/images/integrations/jira.svg'
import { ReactComponent as GitHubProvider } from '@/images/integrations/github.svg'
import { ReactComponent as TapdProvider } from '@/images/integrations/tapd.svg'
import { ReactComponent as ZentaoProvider } from '@/images/integrations/zentao.svg'
import { ReactComponent as AzureProvider } from '@/images/integrations/azure.svg'
import { ReactComponent as BitbucketProvider } from '@/images/integrations/bitbucket.svg'
import { ReactComponent as GiteeProvider } from '@/images/integrations/gitee.svg'
Expand Down Expand Up @@ -102,6 +103,27 @@ const integrationsData = [
// relocated to ProviderTransformationSettings since v0.12.0
settings: {}
},
{
id: Providers.ZENTAO,
type: ProviderTypes.INTEGRATION,
enabled: true,
multiConnection: true,
isBeta: true,
name: ProviderLabels.ZENTAO,
icon: (
<ZentaoProvider
className='providerIconSvg'
width='30'
height='30'
style={{ float: 'left', marginTop: '5px' }}
/>
),
iconDashboard: (
<ZentaoProvider className='providerIconSvg' width='40' height='40' />
),
// relocated to ProviderTransformationSettings since v0.12.0
settings: {}
},
{
id: Providers.JIRA,
type: ProviderTypes.INTEGRATION,
Expand Down
32 changes: 32 additions & 0 deletions config-ui/src/data/pipeline-config-samples/zentao.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
const zentaoConfig = [
[
{
plugin: 'zentao',
options: {
connectionId: 1,
productId: 1,
projectId: 1,
executionId: 1,
}
}
]
]

export { zentaoConfig }
1 change: 1 addition & 0 deletions config-ui/src/hooks/useConnectionValidation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ function useConnectionValidation({
}
break
case Providers.JIRA:
case Providers.ZENTAO:
case Providers.JENKINS:
if (!username || username.length <= 2) {
errs.push('Username is required')
Expand Down
2 changes: 2 additions & 0 deletions config-ui/src/hooks/useIntegrations.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import GitHubGraphqlPlugin from '@/registry/plugins/github_graphql.json'
import GitLabPlugin from '@/registry/plugins/gitlab.json'
import JenkinsPlugin from '@/registry/plugins/jenkins.json'
import TapdPlugin from '@/registry/plugins/tapd.json'
import ZentaoPlugin from '@/registry/plugins/zentao.json'
import AzurePlugin from '@/registry/plugins/azure.json'
import BitbucketPlugin from '@/registry/plugins/bitbucket.json'
import GiteePlugin from '@/registry/plugins/gitee.json'
Expand All @@ -51,6 +52,7 @@ function useIntegrations(
GitLabPlugin,
JenkinsPlugin,
TapdPlugin,
ZentaoPlugin,
AzurePlugin,
BitbucketPlugin,
GiteePlugin,
Expand Down
4 changes: 4 additions & 0 deletions config-ui/src/images/integrations/zentao.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions config-ui/src/pages/blueprints/blueprint-settings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,7 @@ const BlueprintSettings = (props) => {
dataDomainsGroup[configuredConnection?.id]?.length > 0
break
case Providers.TAPD:
case Providers.ZENTAO:
isValid = dataDomainsGroup[configuredConnection?.id]?.length > 0
break
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -805,6 +805,7 @@ export default function ConnectionForm(props) {
Providers.JIRA,
Providers.JENKINS,
Providers.TAPD,
Providers.ZENTAO,
Providers.AZURE,
Providers.BITBUCKET,
Providers.GITEE
Expand Down
57 changes: 57 additions & 0 deletions config-ui/src/pages/configure/settings/zentao.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
import React, { useEffect, useState } from 'react'
import { useParams, useHistory } from 'react-router-dom'
import { DataDomainTypes } from '@/data/DataDomains'

import '@/styles/integration.scss'
import '@/styles/connections.scss'

export default function ZentaoSettings(props) {
const {
provider,
connection,
dataDomains = [],
onSettingsChange = () => {}
} = props
const history = useHistory()

const cancel = () => {
history.push(`/integrations/${provider.id}`)
}

return (
<>
<div className='headlineContainer'>
<h3 className='headline'>No Additional Settings</h3>
<p className='description'>
This integration doesn’t require any configuration. You can continue
to&nbsp;
<a href='#' style={{ textDecoration: 'underline' }} onClick={cancel}>
add other data connections
</a>
&nbsp; or trigger collection at the{' '}
<a href='#' style={{ textDecoration: 'underline' }} onClick={cancel}>
previous page
</a>
.
</p>
</div>
</>
)
}
55 changes: 55 additions & 0 deletions config-ui/src/registry/plugins/zentao.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"id": "zentao",
"name": "ZENTAO",
"type": "integration",
"enabled": true,
"multiConnection": true,
"connectionLimit": 0,
"isBeta": true,
"isProvider": true,
"icon": "src/images/integrations/zentao.svg",
"private": false,
"connection": {
"authentication": "plain",
"fields": {
"name": { "enable": true, "required": true, "readonly": false },
"endpoint": { },
"proxy": { },
"username": { },
"password": { },
"rateLimitPerHour": { }
},
"labels": {
"name": "Connection Name",
"endpoint": "Endpoint URL",
"proxy": "Proxy URL",
"username": "Username",
"password": "Password",
"rateLimitPerHour": "Rate Limit (per hour)"
},
"placeholders": {
"name": "eg. Zentao",
"endpoint": "URL eg. http://subdomain.domain:port/api.php/v1/",
"proxy": "eg. http://proxy.localhost:8080",
"username": "eg. admin",
"password": "eg. ************",
"rateLimit": "1000"
},
"tooltips": {
}
},
"availableDataDomains": ["TICKET"],
"transformations": {
"scopes": {
"options": {
}
},
"default": {
"issueTypeRequirement": "",
"issueTypeBug": "",
"issueTypeIncident": "",
"productionPattern": "",
"deploymentPattern": ""
}
}
}
2 changes: 1 addition & 1 deletion plugins/dora/e2e/calculate_change_lead_time_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func TestCalculateCLTimeDataFlow(t *testing.T) {
dataflowTester.FlushTabler(&code.PullRequest{})

// import raw data table
dataflowTester.ImportCsvIntoTabler("./raw_tables/cicd_tasks_changeleadtime.csv", &devops.CICDTask{})
dataflowTester.ImportCsvIntoTabler("./raw_tables/cicd_tasks.csv", &devops.CICDTask{})
dataflowTester.ImportCsvIntoTabler("./raw_tables/pull_requests.csv", &code.PullRequest{})
dataflowTester.ImportCsvIntoTabler("./raw_tables/commits_diffs.csv", &code.CommitsDiff{})
dataflowTester.ImportCsvIntoTabler("./raw_tables/cicd_pipeline_commits.csv", &devops.CiCDPipelineCommit{})
Expand Down
2 changes: 1 addition & 1 deletion plugins/dora/e2e/connect_incident_to_deploy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func TestConnectIncidentToDeploymentDataFlow(t *testing.T) {
},
}
// import raw data table
dataflowTester.ImportCsvIntoTabler("./raw_tables/cicd_tasks_changeleadtime.csv", &devops.CICDTask{})
dataflowTester.ImportCsvIntoTabler("./raw_tables/cicd_tasks.csv", &devops.CICDTask{})
dataflowTester.ImportCsvIntoTabler("./raw_tables/project_mapping.csv", &crossdomain.ProjectMapping{})
dataflowTester.ImportCsvIntoTabler("./raw_tables/board_issues.csv", &ticket.BoardIssue{})
dataflowTester.ImportCsvIntoTabler("./raw_tables/issues.csv", &ticket.Issue{})
Expand Down
Loading