replaced yaml editor
This commit is contained in:
1 parent
44c4ac12dd
commit
3b7b17021f
4 files changed
+25
-18
No files matched your search
+9
-7
@@ -1,11 +1,17 @@
|
||||
# <--- Build Args -->
|
||||
# <--- Pre-Build Args -->
|
||||
ARG BUILD_ARCH
|
||||
ARG BUILD_VERSION
|
||||
|
||||
# <--- Image Setup -->
|
||||
FROM homeassistant/${BUILD_ARCH}-base-python:3.9-alpine3.14
|
||||
WORKDIR /app
|
||||
|
||||
# <--- Post-Build Args -->
|
||||
ARG BUILD_VERSION
|
||||
|
||||
# <--- Environment Variables -->
|
||||
ENV HASSIO_TOKEN ""
|
||||
ENV BUILD_VERSION $BUILD_VERSION
|
||||
|
||||
# <--- System Wide Dependencies -->
|
||||
ENV LANG C.UTF-8
|
||||
RUN apk add --no-cache \
|
||||
@@ -23,7 +29,7 @@ RUN pip install . /app
|
||||
# <--- Webapp Build -->
|
||||
COPY webapp/ /app/web-builder
|
||||
RUN cd /app/web-builder && \
|
||||
echo "REACT_APP_BUILD_VERSION=${BUILD_VERSION} >> /app/web-builder/.env.production" \
|
||||
echo "REACT_APP_BUILD_VERSION=${BUILD_VERSION}" > /app/web-builder/.env.production && \
|
||||
yarn && \
|
||||
yarn build && \
|
||||
cp -r /app/web-builder/build /app/web && \
|
||||
@@ -34,10 +40,6 @@ COPY api/src /app/src
|
||||
COPY run.sh /app/run.sh
|
||||
RUN chmod +x /app/run.sh
|
||||
|
||||
# <--- Environment Variables -->
|
||||
ENV HASSIO_TOKEN ""
|
||||
ENV BUILD_VERSION $BUILD_VERSION
|
||||
|
||||
# <--- Ports -->
|
||||
EXPOSE 8000
|
||||
|
||||
|
||||
@@ -6,4 +6,5 @@ services:
|
||||
context: "./"
|
||||
dockerfile: "./Dockerfile"
|
||||
args:
|
||||
- BUILD_ARCH=${ARCH:-amd64}
|
||||
BUILD_ARCH: ${ARCH:-amd64}
|
||||
BUILD_VERSION: ${BUILD_TAG:-latest}
|
||||
@@ -3,11 +3,11 @@ import { AutomationCondition, LogicCondition, NumericCondition, StateCondition,
|
||||
import { getDescriptionFromAutomationNode } from "utils/formatting";
|
||||
import InputNumber from "components/Inputs/InputNumber";
|
||||
import InputText from "components/Inputs/InputText";
|
||||
import InputTextArea from "components/Inputs/InputTextArea";
|
||||
import { InputEntity } from "components/Inputs/InputTextBubble";
|
||||
import { ConditionNode } from "./ConditionNode";
|
||||
import { genUpdateMethods } from "./nestedUpdater";
|
||||
import InputTime from "components/Inputs/InputTime";
|
||||
import InputYaml from "components/Inputs/InputYaml";
|
||||
|
||||
|
||||
interface Editor<C extends AutomationCondition> extends FC<{
|
||||
@@ -50,10 +50,10 @@ export const TemplateEditor: Editor<TemplateCondition> = ({
|
||||
...condition,
|
||||
alias
|
||||
})} />
|
||||
<InputTextArea label="Template" value={condition.value_template} onChange={value_template => onChange({
|
||||
<InputYaml label="Template" value={condition.value_template} onChange={value_template => onChange({
|
||||
...condition,
|
||||
value_template
|
||||
})} resizable />
|
||||
})} />
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -94,10 +94,10 @@ export const NumericStateEditor: Editor<NumericCondition> = ({
|
||||
below: below ? String(below) : undefined,
|
||||
})}
|
||||
/>
|
||||
<InputTextArea label="Template" value={condition.value_template ?? ""} onChange={value_template => onChange({
|
||||
<InputYaml label="Template" value={condition.value_template ?? ""} onChange={value_template => onChange({
|
||||
...condition,
|
||||
value_template
|
||||
})} resizable />
|
||||
})} />
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ import { AutomationTriggerNumericState } from 'types/automations/triggers';
|
||||
import InputText from 'components/Inputs/InputText';
|
||||
import { InputEntity } from 'components/Inputs/InputTextBubble';
|
||||
import InputNumber from 'components/Inputs/InputNumber';
|
||||
import InputTextArea from 'components/Inputs/InputTextArea';
|
||||
import InputTime from 'components/Inputs/InputTime';
|
||||
import InputYaml from 'components/Inputs/InputYaml';
|
||||
|
||||
|
||||
export const TriggerNumericState: OptionManager<AutomationTriggerNumericState> = {
|
||||
@@ -45,10 +45,14 @@ export const TriggerNumericState: OptionManager<AutomationTriggerNumericState> =
|
||||
below: below ? String(below) : undefined,
|
||||
})}
|
||||
/>
|
||||
<InputTextArea label="Template" value={state.value_template ?? ""} onChange={value_template => setState({
|
||||
...state,
|
||||
value_template
|
||||
})} resizable />
|
||||
<InputYaml
|
||||
label="Template"
|
||||
value={state.value_template ?? ""}
|
||||
onChange={value_template => setState({
|
||||
...state,
|
||||
value_template
|
||||
})}
|
||||
/>
|
||||
<InputTime
|
||||
label="For"
|
||||
value={state.for}
|
||||
|
||||
Reference in new issue
Block a user