Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    
    <title id="title">Splout SQL Panel - Deployments</title>
    
    <script src="js/jquery.js"></script>
    <script src="js/jquery-jtemplates.js"></script>
    <script src="js/panel.js"></script>
    <!-- Bootstrap -->
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <script src="js/bootstrap.min.js"></script>
    <style>
      body {
        padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
      }
    </style>
    
    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    
    <!-- <link rel=stylesheet href="style.css" type="text/css" media=screen> -->
     
    <script>
    	$("#title").html("Splout SQL Panel - Deployments");
    	
    	$.getJSON('/api/deployments',
      			function(data) {
   			    	$('#ongoingDeployments').setTemplateElement("deploymentsTemplate");
   			 		$('#ongoingDeployments').setParam("id", "ongoing");
   			    	$('#ongoingDeployments').processTemplate(data.ongoingDeployments);
   			    	
   			    	$('#finishedDeployments').setTemplateElement("deploymentsTemplate");
   			 		$('#finishedDeployments').setParam("id", "finished");
   			    	$('#finishedDeployments').processTemplate(data.finishedDeployments);
   			    	
   			    	$('#failedDeployments').setTemplateElement("deploymentsTemplate");
   			 		$('#failedDeployments').setParam("id", "failed");
   			    	$('#failedDeployments').processTemplate(data.failedDeployments);
      			}
      		);
    </script>
  </head>
  <body> 
  
	  <!-- Deployments Accordion TEMPLATE -->
		<textarea id="deploymentsTemplate" style="display:none">		
			<div class="accordion" id="deployments{$P.id}">
			{#foreach $T as deployment}
			<div class="accordion-group">
			<div class="accordion-heading">
			<a class="accordion-toggle collapsed" data-toggle="collapse"
							data-parent="#deployments{$P.id}" href="#deploymentsCollapse{$T.deployment$index}{$P.id}">
							{$T.deployment.date} - {$T.deployment.tablespacesDeployed}</a>
					</div>
					<div id="deploymentsCollapse{$T.deployment$index}{$P.id}" class="accordion-body collapse"
						style="height: 0px;">
						<div class="accordion-inner">
							<dl class="dl-horizontal well">
								<dt>Deployed tablespaces:<dt>
								<dd>{$T.deployment.tablespacesDeployed}</dd>
								<dt>Data URIs:</dt>
								<dd>{$T.deployment.dataURIs}</dd>
							</dl>
							
							<h4>Messages</h4>
							<table class="table table-striped table-condensed table-bordered">
								<tbody>
									{#foreach $T.deployment.logMessages as logline}								
									<tr>
										<td style="text-align: left;">{$T.logline}</td>
									</tr>
									{#/for}
								</tbody>
							</table>														
						</div>
					</div>
				</div>
				{#/for}
			</div>				
		</textarea>
  
    <div class="navbar navbar-inverse navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container">
          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </a>
          <div class="brand">Splout SQL Panel</div>
          <div class="nav-collapse collapse">
            <ul class="nav">
              <li><a href="/">Status & Stats</a></li>
              <li><a href="console.html">Query Console</a></li>
              <li><a href="deployments.html">Deployments</a></li>
              <li><a href="tables.html">Tablespace tables</a></li>
            </ul>
           	<p class="navbar-text pull-right"><a href="javascript:history.go(0)" rel="tooltip" title="Refresh page"><i class="icon-refresh"></i></a></p>
          </div><!--/.nav-collapse -->
        </div>
      </div>
    </div>
  
  	<div class="container">
  	  <div class="page-header"><div id="versionTitle"></div></div>  	   	   	 
			
			<div class="row">					
				<!--  Deployments accordion -->
				<div class="span12">
					<h3>Ongoing deployments</h3>
					<div id="ongoingDeployments">
					</div>				

					<h3>Finished deployments</h3>
					<div id="finishedDeployments">
					</div>				

					<h3>Failed deployments</h3>
					<div id="failedDeployments">
					</div>				
				</div>				
			</div>
			
			<div id="footer"><hr />Splout SQL 0.2</div>
			
		</div>
  </body>
</html>
New to GrepCode? Check out our FAQ X