-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NU-1806] Add action parameters #6860
base: staging
Are you sure you want to change the base?
Conversation
created: #7461 |
be0fe74
to
e0b7858
Compare
8dd895f
to
68932ac
Compare
214c008
to
6eb498d
Compare
common-api/src/main/scala/pl/touk/nussknacker/engine/api/definition/FixedExpressionValue.scala
Outdated
Show resolved
Hide resolved
...onents-api/src/main/scala/pl/touk/nussknacker/engine/api/component/NodesDeploymentData.scala
Show resolved
Hide resolved
components-api/src/main/scala/pl/touk/nussknacker/engine/api/definition/ParameterEditor.scala
Outdated
Show resolved
Hide resolved
components-api/src/main/scala/pl/touk/nussknacker/engine/api/process/Source.scala
Outdated
Show resolved
Hide resolved
import pl.touk.nussknacker.ui.uiresolving.UIProcessResolver | ||
|
||
// TODO: move to ActivityService? execute node compilation only once with ScenarioTestService? | ||
class ActivityInfoService(activityInfoProvider: ActivityInfoProvider, processResolver: UIProcessResolver) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment about naming convention: I think that in this context the name "Scenario action" should be used. Deploy/cancel and others are scenario actions, not activities from what I know. It can be especially confusing now, when ScenarioActivities exist in different context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed: activity -> action
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"activity" is still used in some contexts, such as nodeToActivityToParameters
, FE const activityParameters
, const activityNodeParameters
and possibly some more usages.
designer/server/src/main/scala/pl/touk/nussknacker/ui/api/ActivityInfoResources.scala
Outdated
Show resolved
Hide resolved
6eb498d
to
62b2354
Compare
2413cc2
to
f763629
Compare
bfe6011
to
f0db0a0
Compare
8872b48
to
43a81b6
Compare
add forceLatestRead to dev-application.conf fixed radiobutton options
cf58d86
to
cf9611b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some comments
@@ -46,6 +51,7 @@ export const FixedValuesEditor: ExtendedEditor<Props> = (props: Props) => { | |||
}; | |||
|
|||
const { expressionObj, readOnly, onValueChange, className, showValidation, editorConfig, fieldErrors } = props; | |||
const mode = FixedValuesEditorMode[editorConfig.mode || "LIST"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason for introducing editor mode concept instead of adding a new editor
@@ -23,6 +25,9 @@ export default function DeployButton(props: ToolbarButtonProps) { | |||
const capabilities = useSelector(getCapabilities); | |||
const { disabled, type } = props; | |||
|
|||
// TODO: find better place to reload activity capabilities and properties |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about this todo, will you resolve it in this pr?
Advanced parameters | ||
</Typography> | ||
) : null} | ||
{activityNodeParameters.map((anp: ActionNodeParameters) => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This acronym was a little confusing to me. I needed to go back to activityNodeParameters to understand what was going on. WDYT about renaming it to activityNodeParameter?
textDecoration: "none", | ||
})} | ||
> | ||
Advanced parameters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing i18n
import { default as EditableEditor } from "../graph/node-modal/editors/EditableEditor"; | ||
|
||
interface Props { | ||
nodeName: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it be nodeName or nodeId?
} catch (error) { | ||
setValidationError(error?.response?.data); | ||
} | ||
}, [action, comment, dispatch, processName, props]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing values dependency here
import { getProcessName, getScenarioGraph } from "../../../reducers/selectors/graph"; | ||
import { useEffect } from "react"; | ||
import { fetchActionParameters } from "../../../actions/nk"; | ||
export function useActionCapabilities() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add blank line before import?
@@ -39,7 +44,7 @@ export default function DeployButton(props: ToolbarButtonProps) { | |||
const { open } = useWindows(); | |||
|
|||
const message = t("panels.actions.deploy.dialog", "Deploy scenario {{name}}", { name: processName }); | |||
const action = (p, c) => HttpService.deploy(p, c).finally(() => dispatch(loadProcessState(processName, processVersionId))); | |||
const action = (p, c, d) => HttpService.deploy(p, c, d).finally(() => dispatch(loadProcessState(processName, processVersionId))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we find a better name for these (p, c, d) parameters?
@@ -34,7 +34,7 @@ export default function RunOffScheduleButton(props: ToolbarButtonProps) { | |||
const available = !disabled && isPossible && capabilities.deploy; | |||
|
|||
const { open } = useWindows(); | |||
const action = (p, c) => HttpService.runOffSchedule(p, c).finally(() => dispatch(loadProcessState(processName, processVersionId))); | |||
const action = (p, c, d) => HttpService.runOffSchedule(p, c).finally(() => dispatch(loadProcessState(processName, processVersionId))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we find a better name for these (p, c, d) parameters?
): Promise<{ | ||
isSuccess: boolean; | ||
}> { | ||
const runDeploymentRequest = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we just simplify it to
const runDeploymentRequest = { nodesDeploymentData, comment };
?
Undefined values will be removed automatically from a JSON.
Alternatively, if we want to do it explicitly, maybe can we use lodash?
const runDeploymentRequest = _.pickBy({comment, nodesDeploymentData});
Describe your changes
Checklist before merge