This is an automated email from the ASF dual-hosted git repository. mintsweet pushed a commit to branch feat-issue-trace in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
commit 59c2b762721726b1657a24bdc270f6fefa069625 Author: mintsweet <[email protected]> AuthorDate: Fri Jun 14 18:53:54 2024 +1200 feat: add issue trace configuration for project --- .../src/routes/project/detail/settings-panel.tsx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/config-ui/src/routes/project/detail/settings-panel.tsx b/config-ui/src/routes/project/detail/settings-panel.tsx index 2de91701d..4cb096a27 100644 --- a/config-ui/src/routes/project/detail/settings-panel.tsx +++ b/config-ui/src/routes/project/detail/settings-panel.tsx @@ -46,6 +46,9 @@ export const SettingsPanel = ({ project, onRefresh }: Props) => { enable: false, prToIssueRegexp: '', }); + const [issueTrace, setIssueTrace] = useState({ + enable: false, + }); const [operating, setOperating] = useState(false); const [open, setOpen] = useState(false); @@ -54,6 +57,7 @@ export const SettingsPanel = ({ project, onRefresh }: Props) => { useEffect(() => { const dora = project.metrics.find((ms) => ms.pluginName === 'dora'); const linker = project.metrics.find((ms) => ms.pluginName === 'linker'); + const issueTrace = project.metrics.find((ms) => ms.pluginName === 'issue_trace'); setName(project.name); setDora({ @@ -63,6 +67,9 @@ export const SettingsPanel = ({ project, onRefresh }: Props) => { enable: linker?.enable ?? false, prToIssueRegexp: linker?.pluginOption?.prToIssueRegexp ?? RegexPrIssueDefaultValue, }); + setIssueTrace({ + enable: issueTrace?.enable ?? false, + }); }, [project]); const handleUpdate = async () => { @@ -89,6 +96,11 @@ export const SettingsPanel = ({ project, onRefresh }: Props) => { }, enable: linker.enable, }, + { + pluginName: 'issue_trace', + pluginOption: {}, + enable: issueTrace.enable, + }, ], }), { @@ -174,6 +186,14 @@ export const SettingsPanel = ({ project, onRefresh }: Props) => { /> )} </Block> + <Block + title={ + <Checkbox checked={issueTrace.enable} onChange={(e) => setIssueTrace({ enable: e.target.checked })}> + Enable Issue Trace + </Checkbox> + } + description="" + /> <Block> <Button type="primary" loading={operating} disabled={!name} onClick={handleUpdate}> Save
