Merge pull request #510 from merico-dev/update-config-ui-docker-build
fix: docker build and update placeholder text
diff --git a/config-ui/Dockerfile b/config-ui/Dockerfile
index 8fccf35..f9c5970 100644
--- a/config-ui/Dockerfile
+++ b/config-ui/Dockerfile
@@ -1,15 +1,11 @@
FROM node:14-alpine
-ARG REGISTRY=https://registry.npmjs.org/
-COPY ./server/package.json /src/package.json
-
+COPY package.json /src/package.json
WORKDIR /src
+RUN npm i
-RUN npm i --registry=${REGISTRY}
+COPY . /src
-COPY out .
-COPY ./server/server.js .
-
-CMD ["npm", "run", "server"]
+CMD ["npm", "run", "dev"]
EXPOSE 4000
diff --git a/config-ui/pages/plugins/jira/MappingTag.jsx b/config-ui/pages/plugins/jira/MappingTag.jsx
index 7205433..ffae5c4 100644
--- a/config-ui/pages/plugins/jira/MappingTag.jsx
+++ b/config-ui/pages/plugins/jira/MappingTag.jsx
@@ -1,7 +1,7 @@
import { Tooltip, Position, FormGroup, Label, Tag, TagInput } from '@blueprintjs/core'
import styles from '../../../styles/Home.module.css'
-const MappingTag = ({labelIntent, labelName, onChange, rightElement, helperText, typeOrStatus, values}) => {
+const MappingTag = ({labelIntent, labelName, onChange, rightElement, helperText, typeOrStatus, values, placeholderText}) => {
return <>
<p>Issue {typeOrStatus === 'type' ? 'types' : 'statuses' } mapped to <Tag intent={labelIntent}>{labelName}</Tag></p>
@@ -16,7 +16,7 @@
<Tooltip content={`Map custom Jira types to main ${labelName} status`} position={Position.TOP}>
<Label>
<TagInput
- placeholder="Add Tags..."
+ placeholder={placeholderText}
values={values || []}
fill={true}
onChange={value => setTimeout(() => onChange([...new Set(value)]), 0)}
diff --git a/config-ui/pages/plugins/jira/MappingTagStatus.jsx b/config-ui/pages/plugins/jira/MappingTagStatus.jsx
index 59673ae..76feff1 100644
--- a/config-ui/pages/plugins/jira/MappingTagStatus.jsx
+++ b/config-ui/pages/plugins/jira/MappingTagStatus.jsx
@@ -5,6 +5,7 @@
<MappingTag
labelName="Rejected"
labelIntent="danger"
+ placeholderText="Add Issue Statuses..."
values={reqValue}
helperText={envName}
rightElement={clearBtnReq}
@@ -13,6 +14,7 @@
<MappingTag
labelName="Resolved"
labelIntent="success"
+ placeholderText="Add Issue Statuses..."
values={resValue}
helperText={envName}
rightElement={clearBtnRes}
diff --git a/config-ui/pages/plugins/jira/index.page.jsx b/config-ui/pages/plugins/jira/index.page.jsx
index d5424d6..0275da7 100644
--- a/config-ui/pages/plugins/jira/index.page.jsx
+++ b/config-ui/pages/plugins/jira/index.page.jsx
@@ -225,6 +225,7 @@
labelName="Bug"
labelIntent="danger"
typeOrStatus="type"
+ placeholderText="Add Issue Types..."
values={typeMappingBug}
helperText="JIRA_ISSUE_TYPE_MAPPING"
rightElement={<ClearButton onClick={() => setTypeMappingBug([])} />}
@@ -235,6 +236,7 @@
labelName="Incident"
labelIntent="warning"
typeOrStatus="type"
+ placeholderText="Add Issue Types..."
values={typeMappingIncident}
helperText="JIRA_ISSUE_TYPE_MAPPING"
rightElement={<ClearButton onClick={() => setTypeMappingIncident([])} />}
@@ -245,6 +247,7 @@
labelName="Requirement"
labelIntent="primary"
typeOrStatus="type"
+ placeholderText="Add Issue Types..."
values={typeMappingRequirement}
helperText="JIRA_ISSUE_TYPE_MAPPING"
rightElement={<ClearButton onClick={() => setTypeMappingRequirement([])} />}