fixed 节点增加属性,节点名称带上id

This commit is contained in:
2024-12-10 09:36:49 +08:00
parent 35c0ac4eec
commit 28f3395b05
5 changed files with 33 additions and 6 deletions

View File

@@ -11,7 +11,7 @@
<!-- </div>-->
<%# end %>
<div class="form-group ">
<label for="status">类</label>
<label for="status">节点分类:</label>
<%= form.select :action_node_types_id, options_for_select(Action::NodeType.all.map { |key| [key.name, key.id]}, node.action_node_types_id), {}, class: "form-control" %>
</div>
<div class="field">
@@ -26,6 +26,22 @@
<%= form.label :full_name, "节点全名" %>
<%= form.text_field :full_name %>
</div>
<div class="form-group ">
<label for="status">类型:</label>
<% node_type_options = [['action节点', 'step' ], ['启动', 'start' ], ['任务', 'job']] %>
<%= form.select :node_type, options_for_select(node_type_options, node.node_type), {}, class: "form-control" %>
</div>
<div class="form-group ">
<label for="status">是否支持分支:</label>
<% is_mutil_link_options = [['否', false ], ['是', true]] %>
<%= form.select :is_mutil_link, options_for_select(is_mutil_link_options, node.is_mutil_link), {}, class: "form-control" %>
</div>
<div class="form-group ">
<label for="status">可连接到类型:</label>
<% link_type_options = [Action::Node.new(name: "job", label: "任务"), Action::Node.new(name: "step", label: "action节点")] %>
<%= collection_check_boxes(:node, :link_type_array, link_type_options, :name, :label) %>
</div>
<div class="field">
<%= form.label :description, "描述" %>

View File

@@ -1,7 +1,7 @@
json.status 0
json.message "success"
json.extract! @node, :id, :name, :full_name, :description, :action_node_types_id, :is_local, :local_url, :yaml, :sort_no, :use_count
json.extract! @node, :id, :name, :full_name, :description, :action_node_types_id, :is_local, :local_url, :yaml, :sort_no, :use_count, :node_type, :is_mutil_link, :link_type
json.inputs @node.action_node_inputs do |node_input|
json.partial! "node_input", locals: { node_input: node_input, node: @node }
end