<html lang="en">
<head>
<meta charset="utf-8" />
<title>EMS - New TS80 - BTG Pactual</title>
<link href="/ems/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<script src="/ems/Scripts/jquery-1.7.2.js"></script>
<script src="/ems/Scripts/jquery-ui-1.8.20.js"></script>
<script src="/ems/Scripts/jquery.unobtrusive-ajax.js"></script>
<script src="/ems/Scripts/jquery.validate.js"></script>
<script src="/ems/Scripts/jquery.validate.unobtrusive.js"></script>
<link href="/ems/Content/Site.css" rel="stylesheet"/>
<link href="/ems/Content/bootstrap.css" rel="stylesheet"/>
<link href="/ems/Content/modal.css" rel="stylesheet"/>
<link href="/ems/Content/rodrigo.css" rel="stylesheet"/>
<link href="/ems/Content/skin.css" rel="stylesheet"/>
<link href="/ems/Content/style.css" rel="stylesheet"/>
<link href="/ems/Content/themes/base/jquery-ui.css" rel="stylesheet"/>
<link href="/ems/Content/themes/base/jquery.ui.core.css" rel="stylesheet"/>
<link href="/ems/Content/themes/base/jquery.ui.resizable.css" rel="stylesheet"/>
<link href="/ems/Content/themes/base/jquery.ui.selectable.css" rel="stylesheet"/>
<link href="/ems/Content/themes/base/jquery.ui.accordion.css" rel="stylesheet"/>
<link href="/ems/Content/themes/base/jquery.ui.autocomplete.css" rel="stylesheet"/>
<link href="/ems/Content/themes/base/jquery.ui.button.css" rel="stylesheet"/>
<link href="/ems/Content/themes/base/jquery.ui.dialog.css" rel="stylesheet"/>
<link href="/ems/Content/themes/base/jquery.ui.slider.css" rel="stylesheet"/>
<link href="/ems/Content/themes/base/jquery.ui.tabs.css" rel="stylesheet"/>
<link href="/ems/Content/themes/base/jquery.ui.datepicker.css" rel="stylesheet"/>
<link href="/ems/Content/themes/base/jquery.ui.progressbar.css" rel="stylesheet"/>
<link href="/ems/Content/themes/base/jquery.ui.theme.css" rel="stylesheet"/>
</head>
<body>
<div id="content-wrapper">
<div id="Painel-superior">
<!-- Logo -->
<div id="logo-BTG-Pactual">
<a href="#"><img alt="logo BTGPACTUAL" id="Image1" src="/ems/Images/BTG-Pactual-Logo.jpg" /></a><br />
<span style="position:relative;" class="titulo-content-padrao-bold">Request Form Environment System</span>
</div>
<!-- Bandeiras -->
<div id="bandeiras-categorizada-topo"></div>
<div class="clear-both"></div>
<!-- Usuário Logado -->
<div class="clear-both" style="float:right; margin-top:-19px; border-style:solid; border-color:#E2E2E2; padding: 8px; border-width:1px; border-bottom-width :0px;">
<span style="font-weight:bold"> USER:</span> guerrajo
<span style="font-weight:bold"> PROFILE:</span> Admin
</div>
<!-- Olhar Arquivo master do gpis -->
</div>
<!-- Menu -->
<div id="Menu-Horizontal">
<ul>
<li class="link1-menu"><a href="/ems/ts80">TS80</a></li>
<li class="link1-menu"><a href="/ems/Dashboard">Dashboard</a></li>
</ul>
</div>
<div class="clear-both"></div>
<div id="content-armored">
<script src="/ems/Scripts/jquery-1.7.2.js"></script>
<script src="/ems/Scripts/jquery-ui-1.8.20.js"></script>
<script src="/ems/Scripts/jquery.unobtrusive-ajax.js"></script>
<script src="/ems/Scripts/jquery.validate.js"></script>
<script src="/ems/Scripts/jquery.validate.unobtrusive.js"></script>
<h2 class="titulo-content-padrao-bold">TS80 - Request Form Environment</h2>
<hr />
<form action="/ems/ts80/Create" method="post"> <fieldset>
<div class="validation-summary-valid" data-valmsg-summary="true"><span>Error while saving TS80, please check the following red alerts:</span>
<ul><li style="display:none"></li>
</ul></div>
<input id="solicitacao_ST_PROJETO" name="solicitacao.ST_PROJETO" type="hidden" value="" />
<h1></h1>
<div class="editor-label">
<label for="solicitacao_ID_RRF">RRF/SDG</label>
</div>
<div class="editor-field" title="Request identification ( RRF or SDG )">
<input class="text-box single-line" data-val="true" data-val-number="The field RRF/SDG must be a number." data-val-range="invalid RRF/SDG number" data-val-range-max="2147483647" data-val-range-min="1" data-val-required="The RRF/SDG field is required." id="solicitacao_ID_RRF" name="solicitacao.ID_RRF" type="number" value="1" />
<span class="field-validation-valid" data-valmsg-for="solicitacao.ID_RRF" data-valmsg-replace="true"></span>
</div>
<div class="editor-label" >
<label for="solicitacao_NM_RESPOSAVEL">Responsable</label>
</div>
<div class="editor-field" title="Name of the responsible">
<input Value="guerrajo" data-val="true" data-val-length="Name cannot be longer than 50 characters." data-val-length-max="50" data-val-required="The Responsable field is required." id="solicitacao_NM_RESPOSAVEL" maxlength="50" name="solicitacao.NM_RESPOSAVEL" type="text" value="" />
<span class="field-validation-valid" data-valmsg-for="solicitacao.NM_RESPOSAVEL" data-valmsg-replace="true"></span>
</div>
<div class="editor-label">
<label for="solicitacao_DS_PROJETO">Project Description</label>
</div>
<div class="editor-field" title="Project description">
<textarea cols="20" data-val="true" data-val-length="Project Description cannot be longer than 100 characters." data-val-length-max="100" data-val-required="The Project Description field is required." id="solicitacao_DS_PROJETO" name="solicitacao.DS_PROJETO" rows="2" style="width:50%;">
</textarea>
<span class="field-validation-valid" data-valmsg-for="solicitacao.DS_PROJETO" data-valmsg-replace="true"></span>
</div>
<div class="editor-label">
<label for="solicitacao_TB_CLASS">Demand Classification</label>
</div>
<div class="editor-field" title="Demand Classification">
<select data-val="true" data-val-required="The Demand Classification field is required." id="solicitacao_TB_CLASS" name="solicitacao.TB_CLASS"><option value="">Select...</option>
<option value="F">Fast Track</option>
<option value="R">Reduced</option>
<option value="M">Mid</option>
<option value="C">Complete</option>
</select>
<span class="field-validation-valid" data-valmsg-for="solicitacao.TB_CLASS" data-valmsg-replace="true"></span>
</div>
<hr style="clear:both;" />
<div>
<div class="formDisplay480">
<div class="editor-label ">
<label for="solicitacao_TP_DEVELOP">Development</label>
</div>
<div class="editor-field" title="Development type">
<select class="reuse" data-val="true" data-val-required="The Development field is required." id="solicitacao_TP_DEVELOP" name="solicitacao.TP_DEVELOP"><option value="">Select...</option>
<option value="I">Internal</option>
<option value="E">External</option>
<option value="A">Internal/External</option>
</select>
<span class="field-validation-valid" data-valmsg-for="solicitacao.TP_DEVELOP" data-valmsg-replace="true"></span>
</div>
</div>
<div class="formDisplay480">
<div class="editor-label">
<label for="solicitacao_NM_FABRICA">Factory Name</label>
</div>
<div class="editor-field" title="Factory name">
<input data-val="true" data-val-length="Factory Name cannot be longer than 30 characters." data-val-length-max="30" data-val-required="The Factory Name field is required." id="solicitacao_NM_FABRICA" name="solicitacao.NM_FABRICA" readonly="readonly" type="text" value="N/A" />
<span class="field-validation-valid" data-valmsg-for="solicitacao.NM_FABRICA" data-valmsg-replace="true"></span>
</div>
</div>
</div>
<div class="editor-label">
<label for="solicitacao_TP_AMBIENTE">Environment</label>
</div>
<div class="editor-field" title="Environment type ( Development, UAT,...)">
<select data-val="true" data-val-required="The Environment field is required." id="solicitacao_TP_AMBIENTE" name="solicitacao.TP_AMBIENTE"><option value="">Select...</option>
<option value="D">Development</option>
<option value="T">Test</option>
<option value="U">UAT</option>
</select>
<span class="field-validation-valid" data-valmsg-for="solicitacao.TP_AMBIENTE" data-valmsg-replace="true"></span>
</div>
<div class="editor-label">
<label for="solicitacao_TP_SERVER">Server Type</label>
</div>
<div class="editor-field" title="Server type">
<select data-val="true" data-val-required="The Server Type field is required." id="solicitacao_TP_SERVER" name="solicitacao.TP_SERVER"><option value="">Select...</option>
<option value="V">Virtual</option>
<option value="F">Physical</option>
</select>
<span class="field-validation-valid" data-valmsg-for="solicitacao.TP_SERVER" data-valmsg-replace="true"></span>
</div>
<div>
<div class="formDisplay480">
<div class="editor-label">
<label for="solicitacao_BD_ATUAL">Database</label>
</div>
<div class="editor-field" title="Need a new database?">
<select class="reuse" data-val="true" data-val-required="The Database field is required." id="solicitacao_BD_ATUAL" name="solicitacao.BD_ATUAL"><option value="">Select...</option>
<option value="P">Same as Prodution</option>
<option value="N">New</option>
</select>
<span class="field-validation-valid" data-valmsg-for="solicitacao.BD_ATUAL" data-valmsg-replace="true"></span>
</div>
</div>
<div class="formDisplay480">
<div class="editor-label">
<label for="solicitacao_BD_DESCRICAO">Database Description</label>
</div>
<div class="editor-field" title="Database description">
<input class="reuseDesc" data-val="true" data-val-length="Database Description Name cannot be longer than 30 characters." data-val-length-max="30" data-val-required="The Database Description field is required." id="solicitacao_BD_DESCRICAO" name="solicitacao.BD_DESCRICAO" readonly="readonly" type="text" value="N/A" />
<span class="field-validation-valid" data-valmsg-for="solicitacao.BD_DESCRICAO" data-valmsg-replace="true"></span>
</div>
</div>
</div>
<div>
<div class="formDisplay480">
<div class="editor-label">
<label for="solicitacao_WS_ATUAL">Web Server</label>
</div>
<div class="editor-field" title="Need a new web server?">
<select class="reuse" data-val="true" data-val-required="The Web Server field is required." id="solicitacao_WS_ATUAL" name="solicitacao.WS_ATUAL"><option value="">Select...</option>
<option value="P">Same as Prodution</option>
<option value="N">New</option>
</select>
<span class="field-validation-valid" data-valmsg-for="solicitacao.WS_ATUAL" data-valmsg-replace="true"></span>
</div>
</div>
<div class="formDisplay480">
<div class="editor-label">
<label for="solicitacao_WS_DESCRICAO">Web Server Description</label>
</div>
<div class="editor-field" title="New web server description">
<input class="reuseDesc" data-val="true" data-val-length="Web Server Description Name cannot be longer than 30 characters." data-val-length-max="30" data-val-required="The Web Server Description field is required." id="solicitacao_WS_DESCRICAO" name="solicitacao.WS_DESCRICAO" readonly="readonly" type="text" value="N/A" />
<span class="field-validation-valid" data-valmsg-for="solicitacao.WS_DESCRICAO" data-valmsg-replace="true"></span>
</div>
</div>
</div>
<div>
<div class="formDisplay480">
<div class="editor-label">
<label for="solicitacao_AP_ATUAL">App. Server</label>
</div>
<div class="editor-field" title="Need a new application server?">
<select class="reuse" data-val="true" data-val-required="The App. Server field is required." id="solicitacao_AP_ATUAL" name="solicitacao.AP_ATUAL"><option value="">Select...</option>
<option value="P">Same as Prodution</option>
<option value="N">New</option>
</select>
<span class="field-validation-valid" data-valmsg-for="solicitacao.AP_ATUAL" data-valmsg-replace="true"></span>
</div>
</div>
<div class="formDisplay480">
<div class="editor-label">
<label for="solicitacao_AP_DESCRICAO">App. Server Description</label>
</div>
<div class="editor-field" title="New application server description">
<input class="reuseDesc" data-val="true" data-val-length="App. Server Description Name cannot be longer than 30 characters." data-val-length-max="30" data-val-required="The App. Server Description field is required." id="solicitacao_AP_DESCRICAO" name="solicitacao.AP_DESCRICAO" readonly="readonly" type="text" value="N/A" />
<span class="field-validation-valid" data-valmsg-for="solicitacao.AP_DESCRICAO" data-valmsg-replace="true"></span>
</div>
</div>
</div>
<div>
<div class="formDisplay480">
<div class="editor-label">
<label for="solicitacao_NV_ATUAL">Web Browser</label>
</div>
<div class="editor-field" title="Need some specific web browser ?">
<select class="reuse" data-val="true" data-val-required="The Web Browser field is required." id="solicitacao_NV_ATUAL" name="solicitacao.NV_ATUAL"><option value="">Select...</option>
<option value="P">Same as Prodution</option>
<option value="N">New</option>
</select>
<span class="field-validation-valid" data-valmsg-for="solicitacao.NV_ATUAL" data-valmsg-replace="true"></span>
</div>
</div>
<div class="formDisplay480">
<div class="editor-label">
<label for="solicitacao_NV_DESCRICAO">Web Browser Description</label>
</div>
<div class="editor-field" title="Web browser description">
<input class="reuseDesc" data-val="true" data-val-length="Web Browser Description Name cannot be longer than 30 characters." data-val-length-max="30" data-val-required="The Web Browser Description field is required." id="solicitacao_NV_DESCRICAO" name="solicitacao.NV_DESCRICAO" readonly="readonly" type="text" value="N/A" />
<span class="field-validation-valid" data-valmsg-for="solicitacao.NV_DESCRICAO" data-valmsg-replace="true"></span>
</div>
</div>
</div>
<div>
<div class="formDisplay480">
<div class="editor-label">
<label for="solicitacao_SW_ATUAL">Software</label>
</div>
<div class="editor-field" title="Needs some specific software ?">
<select class="reuse" data-val="true" data-val-required="The Software field is required." id="solicitacao_SW_ATUAL" name="solicitacao.SW_ATUAL"><option value="">Select...</option>
<option value="P">Same as Prodution</option>
<option value="N">New</option>
</select>
<span class="field-validation-valid" data-valmsg-for="solicitacao.SW_ATUAL" data-valmsg-replace="true"></span>
</div>
</div>
<div class="formDisplay480">
<div class="editor-label">
<label for="solicitacao_SW_DESCRICAO">Software Description</label>
</div>
<div class="editor-field" title="Software description">
<input class="reuseDesc" data-val="true" data-val-length="Software Description Name cannot be longer than 60 characters." data-val-length-max="60" data-val-required="The Software Description field is required." id="solicitacao_SW_DESCRICAO" name="solicitacao.SW_DESCRICAO" readonly="readonly" type="text" value="N/A" />
<span class="field-validation-valid" data-valmsg-for="solicitacao.SW_DESCRICAO" data-valmsg-replace="true"></span>
</div>
</div>
</div>
<div class="editor-label">
<label for="solicitacao_RP_AMBIENTE">replicated environment</label>
</div>
<div class="editor-field" title="Need a replicated SQL server?">
<select data-val="true" data-val-required="The replicated environment field is required." id="solicitacao_RP_AMBIENTE" name="solicitacao.RP_AMBIENTE"><option value="">Select...</option>
<option value="Y">Yes</option>
<option value="N">No</option>
</select>
<span class="field-validation-valid" data-valmsg-for="solicitacao.RP_AMBIENTE" data-valmsg-replace="true"></span>
</div>
<div class="editor-label">
<label for="solicitacao_DT_IDEALSTART">Ideal Start Date</label>
</div>
<div class="editor-field" title="Ideal start date for the requirement, click here...">
<input class="text-box single-line" data-val="true" data-val-date="The field Ideal Start Date must be a date." data-val-required="The Ideal Start Date field is required." id="solicitacao_DT_IDEALSTART" name="solicitacao.DT_IDEALSTART" type="datetime" value="18/06/2014 00:00:00" />
<span class="field-validation-valid" data-valmsg-for="solicitacao.DT_IDEALSTART" data-valmsg-replace="true"></span>
</div>
<div class="editor-label">
<label for="solicitacao_DT_DAYS">Duration (Days)</label>
</div>
<div class="editor-field" title="Duration of the utilization of the environment">
<input class="text-box single-line" data-val="true" data-val-number="The field Duration (Days) must be a number." data-val-required="The Duration (Days) field is required." id="solicitacao_DT_DAYS" name="solicitacao.DT_DAYS" type="number" value="1" />
<span class="field-validation-valid" data-valmsg-for="solicitacao.DT_DAYS" data-valmsg-replace="true"></span>
</div>
<br />
<fieldset>
<h2 class="titulo-content-padrao-bold"> Database <br />
<span>To add a new database, click "Add Database", choose an origin server (Production), a database and choose if its gonna be a primary ou secundary source . You should repeat this for each database needed by the project. </span>
</h2> <hr />
<div id="incluiBD" style="float:left; width:26%; border-right:1px solid grey;">
<table>
<tbody>
<tr>
<td>Sever</td>
<td><select data-val="true" data-val-number="The field ID_SERVIDOR must be a number." id="servidorBDTemp_ID_SERVIDOR" name="servidorBDTemp.ID_SERVIDOR" onchange="ts80ControlerRetornaListaDeBases(this.value);"><option value="">Select Server...</option>
<option value="1">PACTUAL7</option>
<option value="8">SRVSQLINTPRO</option>
<option value="11">PACTUAL8</option>
<option value="12">PACTUAL9</option>
<option value="14">SAO_PAULO4</option>
<option value="17">SRVSQLINTER</option>
<option value="91">NRIO0181PSQ</option>
<option value="99">NRIO0203PSQ</option>
<option value="111">NSAPC015PSQ1</option>
<option value="128">NRIO023PSQL</option>
<option value="132">NRIOC024PSQ1</option>
<option value="139">NRIOC025PSQ1</option>
<option value="141">NRIOC036PSQ1</option>
<option value="152">NSAPC064PSQ1</option>
<option value="154">NRIO070PSQL</option>
<option value="187">NRIOC109PSQ1</option>
<option value="219">NRIO060PSQL</option>
<option value="221">NRIO140PSQL</option>
<option value="222">NRIO160PSQL</option>
<option value="223">NRIOC080PSQ1</option>
<option value="224">NRIOC148PSQ1</option>
<option value="230">NRIOC100PN3</option>
<option value="239">NRIOC283PSQ1</option>
<option value="242">NRIO281FSAS</option>
<option value="253">NRIOC287PSQ1</option>
<option value="1392">XRIOC322POR2-SCAN</option>
<option value="1399">NRIO271PSQ1</option>
<option value="1402">NSAP474PSSM</option>
<option value="2130">XRIO186PORA</option>
<option value="2423">XRIOC101POR1-SCAN</option>
<option value="2424">XSAPC465POR1-SCAN</option>
<option value="2425">XRIOC398POR1-SCAN</option>
<option value="2426">XRIOC291POR1-SCAN</option>
<option value="2427">XRIOC242POR3-SCAN</option>
<option value="2428">XSAPC491POR1-SCAN</option>
</select></td>
</tr>
<tr>
<td>Database</td>
<td id="selectDeBases"><select data-val="true" data-val-number="The field ID_SERVIDOR_BD must be a number." disabled="disabled" id="servidorBDTemp_ID_SERVIDOR_BD" name="servidorBDTemp.ID_SERVIDOR_BD"><option value="">Select Database...</option>
</select></td>
</tr>
<tr>
<td>Usage</td>
<td><select disabled="disabled" id="servidorBDTemp_ST_SERVIDOR" name="servidorBDTemp.ST_SERVIDOR" onchange="liberaBotaoIncluirDatabase();"><option value="">Select...</option>
<option value="P">Primary</option>
<option value="S">Secundary</option>
</select></td>
</tr>
<tr>
<td><input type="button" value="Add Database" onclick="ts80IncluiBaseDeDados();" disabled ="disabled" id="botaoIncluirDatabase"/></td>
</tr>
</tbody>
</table>
</div>
<div id="gridServidoresBD" style="float:left;width:71%; margin-left:28px;">
<table id="tbServidorBD">
<thead>
<tr>
<th>Server</th>
<th>Database</th>
<th>Usage</th>
<th></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</fieldset> <br />
<fieldset>
<h2 class="titulo-content-padrao-bold"> Components and interfaces <br />
<span>To add a component, click "Add Component/Interface", choose an origin server (Production), a component or an interface choose if its gonna be a primary ou secundary source . You should repeat this for each component/interface needed by the project.</span>
</h2> <hr />
<div id="incluiCM" style="float:left; width:26%; border-right:1px solid grey;">
<table>
<tbody>
<tr>
<td>Server</td>
<td><select data-val="true" data-val-number="The field ID_SERVIDOR must be a number." id="servidorCMTemp_ID_SERVIDOR" name="servidorCMTemp.ID_SERVIDOR" onchange="ts80ControlerRetornaListaDeComponentes(this.value);"><option value="">Select Server...</option>
<option value="108">NRIO0209PCO</option>
<option value="110">NRIO0263PCO</option>
<option value="161">NRIOC038PN1</option>
<option value="171">NRIO0179PAP</option>
<option value="192">SRVCOMPPROD</option>
<option value="199">SRVCOMPPROD1</option>
<option value="247">NRIO0004PAP</option>
</select></td>
</tr>
<tr>
<td>Component/Interface</td>
<td id="selectDeComponentes"><select data-val="true" data-val-number="The field ID_SERVIDOR_COMPONENTE must be a number." disabled="disabled" id="servidorCMTemp_ID_SERVIDOR_COMPONENTE" name="servidorCMTemp.ID_SERVIDOR_COMPONENTE"><option value="">Select Component...</option>
</select></td>
</tr>
<tr>
<td>Usage</td>
<td><select disabled="disabled" id="servidorCMTemp_ST_SERVIDOR" name="servidorCMTemp.ST_SERVIDOR" onchange="liberaBotaoIncluirComponente();"><option value="">Select...</option>
<option value="P">Primary</option>
<option value="S">Secundary</option>
</select></td>
</tr>
<tr>
<td><input type="button" value="Add Component" onclick="ts80IncluiComponente();" disabled ="disabled" id="botaoIncluirComponente"/></td>
</tr>
</tbody>
</table>
</div> <br />
<div id="gridServidoresComponente" style="float:left;width:71%; margin-left:28px;">
<table id="tbServidorComponente">
<thead>
<tr>
<th>Server</th>
<th>Component/Interface</th>
<th>Usage</th>
<th></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</fieldset> <br /> <br /> <br />
<script type="text/javascript">
//debugger;
//Retorna conteudo do servidor de banco de dados
function ts80ControlerRetornaListaDeBases(idServidorBDProd) {
$.ajax({
url: "/ems/ts80/RetornaListaDeBases",
data: { idServidorBDProd: idServidorBDProd },
success: function (bases) {
$("#selectDeBases").html(bases);
}
});
}
//Retorna conteudo do servidor de componentes
function ts80ControlerRetornaListaDeComponentes(idServidorCMProd) {
$.ajax({
url: "/ems/ts80/RetornaListaDeComponentes",
data: { idServidorCMProd: idServidorCMProd },
success: function (componentes) {
$("#selectDeComponentes").html(componentes);
}
});
}
//Libera o selectlist de utilizaçao
function liberaPrioridadeBase() {
$('#servidorBDTemp_ST_SERVIDOR').prop('disabled', false);
}
//Libera o selectlist de utilizaçao
function liberaPrioridadeComponente() {
$('#servidorCMTemp_ST_SERVIDOR').prop('disabled', false);
}
//Libera o botao incluir Database
function liberaBotaoIncluirDatabase() {
$('#botaoIncluirDatabase').prop('disabled', false);
}
//Libera o botao incluir Componente
function liberaBotaoIncluirComponente() {
$('#botaoIncluirComponente').prop('disabled', false);
}
//Busca no banco de dados as bases presentes naquele servidor
function ts80IncluiBaseDeDados() {
var idServidorBDProd = $('#servidorBDTemp_ID_SERVIDOR').val();
var nmServidorBDProd = $('#servidorBDTemp_ID_SERVIDOR option:selected').text();
var idServidorBD = $('#servidorBDTemp_ID_SERVIDOR_BD').val();
var nmServidorBD = $('#servidorBDTemp_ID_SERVIDOR_BD option:selected').text();
var utilizacao = $('#servidorBDTemp_ST_SERVIDOR').val();
if ($('#tbServidorBD tbody tr').length === 0) {
var posicaoTabela = -1;
} else {
var posicaoTabela = $('#tbServidorBD tbody tr:last').attr('id').replace('linha', '');
}
//Requisicao ajax que busca no banco de dados as informaçoes das bases. Caso tenha sucesso, adiciona na lista a base escolhida
$.ajax({
url: "/ems/ts80/IncluiServidorBDLista",
data: { idServidorBDProd: idServidorBDProd, nmServidorBDProd: nmServidorBDProd, idServidorBD: idServidorBD, nmServidorBD: nmServidorBD, utilizacao: utilizacao, posicaoTabela: posicaoTabela },
success: function (novoControleBD) {
$("#tbServidorBD tbody").append(novoControleBD);
$("#servidorBDTemp_ID_SERVIDOR").val("");
$("#servidorBDTemp_ID_SERVIDOR_BD").prop('disabled', true);
$('#servidorBDTemp_ST_SERVIDOR').val("");
$('#servidorBDTemp_ST_SERVIDOR').prop('disabled', true);
$('#botaoIncluirDatabase').prop('disabled', true);
},
error: function () {
alert("Erro ao Incluir Base de Dados");
}
});
}
//Busca no banco de dados os componentes presentes naquele servidor
function ts80IncluiComponente() {
var idServidorCMProd = $('#servidorCMTemp_ID_SERVIDOR').val();
var nmServidorCMProd = $('#servidorCMTemp_ID_SERVIDOR option:selected').text();
var idServidorCM = $('#servidorCMTemp_ID_SERVIDOR_COMPONENTE').val();
var nmServidorCM = $('#servidorCMTemp_ID_SERVIDOR_COMPONENTE option:selected').text();
var utilizacao = $('#servidorCMTemp_ST_SERVIDOR').val();
if ($('#tbServidorComponente tbody tr').length === 0) {
var posicaoTabela = -1;
} else {
var posicaoTabela = $('#tbServidorComponente tbody tr:last').attr('id').replace('linhaC', '');
}
//Requisicao ajax que busca no banco de dados as informacoes dos compontes. Caso tenha sucesso, adiciona na lista o componente escolhido
$.ajax({
url: "/ems/ts80/IncluiServidorCMLista",
data: { idServidorCMProd: idServidorCMProd, nmServidorCMProd: nmServidorCMProd, idServidorCM: idServidorCM, nmServidorCM: nmServidorCM, utilizacao: utilizacao, posicaoTabela: posicaoTabela },
success: function (novoControleCM) {
$("#tbServidorComponente tbody").append(novoControleCM);
$("#servidorCMTemp_ID_SERVIDOR").val("");
$("#servidorCMTemp_ID_SERVIDOR_COMPONENTE").val("");
$("#servidorCMTemp_ID_SERVIDOR_COMPONENTE").prop('disabled', true);
$("#botaoIncluirComponente").prop('disabled', true);
$('#servidorCMTemp_ST_SERVIDOR').val("");
$('#servidorCMTemp_ST_SERVIDOR').prop('disabled', true);
},
error: function () {
alert("Erro ao Incluir Componente");
}
});
}
// Exclui Linha de componente
function ts80ExcluiComponente(linha) {
$('#tbServidorComponente tbody #linhaC' + linha).remove();
if (linha != $('#tbServidorComponente tbody tr').length) {
linha++;
//percorre todos os elementos para renomears os ids e names para ser reconhecido pelo controller
$('tr', $('#tbServidorComponente tbody tr').parent()).each(function () {
$(this).attr('id', this.id.replace(linha, linha - 1));
$('input', this).each(function () {
$(this).attr('id', this.id.replace(linha, linha - 1));
$(this).attr('name', this.name.replace(linha, linha - 1));
});
$('#botaoRemoverComponente', this).attr('onclick', $('#botaoRemoverComponente', this).attr('onclick').replace(linha, linha - 1));
linha++;
});
}
}
// Exclui Linha de banco de dados
function ts80ExcluiBaseDeDados(linha) {
$('#tbServidorBD tbody #linha' + linha).remove();
if (linha != $('#tbServidorBD tbody tr').length) {
linha++;
//percorre todos os elementos para renomears os ids e names para ser reconhecido pelo controller
$('tr', $('#tbServidorBD tbody tr').parent()).each(function () {
$(this).attr('id', this.id.replace(linha, linha - 1));
$('input', this).each(function () {
$(this).attr('id', this.id.replace(linha, linha - 1));
$(this).attr('name', this.name.replace(linha, linha - 1));
});
$('#botaoRemoverDatabase', this).attr('onclick', $('#botaoRemoverDatabase', this).attr('onclick').replace(linha, linha - 1));
linha++;
});
}
}
$(document).ready(function () {
jQuery.validator.methods["date"] = function (value, element) { return true; }
// inicia o calendário
$("#solicitacao_DT_IDEALSTART").datepicker({dateFormat: "dd/mm/yy" ,numberOfMonths: [1, 2], minDate: 2 });
//completa as combos de descricao quando escolhida a opção "Same as Production" ou "Internal"
$(".reuse").on('change', function () {
var div = $(this).parent().parent().next();
// testa o valor "I" para o campo "tipo desenvolvimento.". para os demais, testa "P" para "same as production"
if ($(this).val() == "P" || $(this).val() == "I") {
$('input', div).val("N/A");
$('input', div).prop('readonly', true);
} else {
$('input', div).val("");
$('input', div).removeAttr("readonly");
}
});
//Ativa os campos "destivados" para serem reconhecidos pelo modelo ao enviar o formulario.
$('form').submit(function () {
$('input').each(function () {
$(this).removeAttr("readonly");
$(this).removeAttr("disabled");
});
$('.reuseDesc input').each(function () {
$(this).removeAttr("readonly");
$(this).removeAttr("disabled");
});
});
});
</script>
<p>
<input type="submit" value="Save/Send" class="btn" />
<a class="btn" href="/ems/ts80">Back</a>
</p>
</fieldset>
</form>
</div>
</div>
</body>
</html>
Output
You can jump to the latest bin by adding /latest
to your URL
Keyboard Shortcuts
Shortcut | Action |
---|---|
ctrl + [num] | Toggle nth panel |
ctrl + 0 | Close focused panel |
ctrl + enter | Re-render output. If console visible: run JS in console |
Ctrl + l | Clear the console |
ctrl + / | Toggle comment on selected lines |
ctrl + ] | Indents selected lines |
ctrl + [ | Unindents selected lines |
tab | Code complete & Emmet expand |
ctrl + shift + L | Beautify code in active panel |
ctrl + s | Save & lock current Bin from further changes |
ctrl + shift + s | Open the share options |
ctrl + y | Archive Bin |
Complete list of JS Bin shortcuts |
JS Bin URLs
URL | Action |
---|---|
/ | Show the full rendered output. This content will update in real time as it's updated from the /edit url. |
/edit | Edit the current bin |
/watch | Follow a Code Casting session |
/embed | Create an embeddable version of the bin |
/latest | Load the very latest bin (/latest goes in place of the revision) |
/[username]/last | View the last edited bin for this user |
/[username]/last/edit | Edit the last edited bin for this user |
/[username]/last/watch | Follow the Code Casting session for the latest bin for this user |
/quiet | Remove analytics and edit button from rendered output |
.js | Load only the JavaScript for a bin |
.css | Load only the CSS for a bin |
Except for username prefixed urls, the url may start with http://jsbin.com/abc and the url fragments can be added to the url to view it differently. |