@model AppDeployNode
@using NewLife.Cube.ViewModels
@using Stardust.Data.Deployment;
@using NewLife;
@using NewLife.Web;
@using XCode;
@using XCode.Configuration;
@using XCode.Membership;
@using NewLife.Cube;
@using Stardust.Web.Models;
@{
    var entity = Model;
    var fields = ViewBag.Fields as FieldCollection;
    var isNew = (entity as IEntity).IsNullKey;

    var set = NewLife.Cube.Setting.Current;
    var cls = set.FormGroupClass;
    if (cls.IsNullOrEmpty()) { cls = "form-group col-xs-12 col-sm-6 col-lg-4"; }
}
@foreach (var item in fields)
{
    if (!item.Field.IsIdentity)
    {
        if (item.Name == "NodeName")
        {
            <div class="@cls">
                <label class="control-label col-xs-3 col-sm-3">节点</label>
                <div class="input-group col-xs-9 col-sm-9">
                    @await Html.PartialAsync("_SelectNode", new SelectNodeModel { Id = "nodeId", NodeId = entity.NodeId })
                </div>
            </div>
        }
        else
        {
            @await Html.PartialAsync("_Form_Group", new ValueTuple<IEntity, DataField>(entity, item))
        }
    }
}
@*@await Html.PartialAsync("_Form_Footer", entity)
@await Html.PartialAsync("_Form_Action", entity)*@