<?php
$config->host->create->requiredFields = 'CD,name';
$config->host->edit->requiredFields   = 'CD,name';

$config->host->apiError = array();
$config->host->apiError[] = '/已存在的主机名称【(.+)】/';
$config->host->apiError[] = 'Exception: 连接主机超时，请检查网络';
$config->host->apiError[] = 'Exception: 密码连接认证失败，请检查密码是否正确';
$config->host->apiError[] = '/Exception: \[Errno None\] Unable to connect to port (.+) on (.+)/';
$config->host->apiError[] = '/执行模板【(.+)】关联了该主机，请解除关联后再尝试删除该主机/';
$config->host->apiError[] = '/应用【(.+)】在【(.+)】的发布配置关联了该主机，请解除关联后再尝试删除该主机/';
$config->host->apiError[] = "/Cannot add or update a child row/";

$config->host->dtable->fieldList['CD']['title']    = $lang->host->CD;
$config->host->dtable->fieldList['CD']['name']     = 'CD';
$config->host->dtable->fieldList['CD']['type']     = 'text';
$config->host->dtable->fieldList['CD']['sortType'] = true;
$config->host->dtable->fieldList['CD']['minWidth'] = '50';
$config->host->dtable->fieldList['CD']['map']      = $lang->host->CDlist;
$config->host->dtable->fieldList['CD']['show']     = true;
$config->host->dtable->fieldList['CD']['order']    = 100;

$config->host->form->create['CD']       = array('type' => 'string', 'required' => true, 'default' => 'manual');
$config->host->form->create['intranet'] = array('type' => 'string', 'required' => false, 'default' => '');
$config->host->form->create['extranet'] = array('type' => 'string', 'required' => false, 'default' => '');
$config->host->form->create['remoteIP'] = array('type' => 'string', 'required' => false, 'default' => '');
$config->host->form->create['sshPort']  = array('type' => 'int', 'required' => false, 'default' => 0);
$config->host->form->create['password'] = array('type' => 'string', 'required' => false, 'default' => '');
$config->host->form->create['admin']    = array('type' => 'string', 'required' => false, 'default' => '');

$config->host->form->edit['CD']       = array('type' => 'string', 'required' => true, 'default' => 'manual');
$config->host->form->edit['intranet'] = array('type' => 'string', 'required' => false, 'default' => '');
$config->host->form->edit['extranet'] = array('type' => 'string', 'required' => false, 'default' => '');
$config->host->form->edit['sshPort']  = array('type' => 'int', 'required' => false, 'default' => 0);
$config->host->form->edit['password'] = array('type' => 'string', 'required' => false, 'default' => '');
$config->host->form->edit['admin']    = array('type' => 'string', 'required' => false, 'default' => '');
