mirror-management/mirrors/templates/mirror edit_mirror.kid, NONE, 1.1 edit_mirror_releases.kid, NONE, 1.1 edit_rsync_ips.kid, NONE, 1.1 list_mirrors.kid, NONE, 1.1 my_mirrors.kid, NONE, 1.1 new_mirror.kid, NONE, 1.1 view_mirror.kid, NONE, 1.1

Farshad Khoshkhui (farshad) fedora-extras-commits at redhat.com
Tue Jan 2 08:32:38 UTC 2007


Author: farshad

Update of /cvs/fedora/mirror-management/mirrors/templates/mirror
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31057/mirrors/templates/mirror

Added Files:
	edit_mirror.kid edit_mirror_releases.kid edit_rsync_ips.kid 
	list_mirrors.kid my_mirrors.kid new_mirror.kid view_mirror.kid 
Log Message:
Added Rest of files



--- NEW FILE edit_mirror.kid ---
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
    py:extends="'../master.kid'">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
<title>Edit Mirror ${mirror.hostname}</title>
</head>
<body>
<form action="updateMirror" method="post">
<input type="hidden" name="old_hostname" value="${mirror.hostname}" />

<fieldset >
<legend>Edit Mirror ${mirror.hostname}</legend>
<div>
	<label for="hostname">Host Name: </label>
	<span><input id="hostname" name="hostname" value="${mirror.hostname}" /></span>
</div>

<div>
	<label for="user_active">Mirror Is Active:</label>
	<span><input id="user_active" name="user_active" type="checkbox" checked="${(None, '') [mirror.user_active==True]}" /></span>
</div>

<div >
	<label for="comment" class="textarea">Comment:</label>
	<span><textarea id="comment" name="comment" ><span py:replace="mirror.comment" py:strip="True">Comment</span></textarea></span>
</div>


<div>
	Selected Protocols:
	<ul>
	<li py:for="i,protocol in enumerate(protocols)">
		<label for="protocol_${i}">${protocol.name}</label>
		<span><input type="checkbox" name="protocol_${i}" id="protocol_${i}" value="${protocol.name}" checked="${(None, '') [protocol in mirror.protocols]}" /></span>
	</li>
	</ul>
</div>

<div py:if="'admin' in tg.identity.groups">
	<div>
		<label for="admin_active">Mirror Is Administratively Active:</label>
		<span><input id="admin_active" name="admin_active" type="checkbox" checked="${(None, '') [mirror.admin_active==True]}" /></span>	
	</div>

	<div>
		<label for="private">Mirror Is Private:</label>
		<span><input id="private" name="private" type="checkbox" checked="${(None, '') [mirror.private==True]}" /></span>	
	</div>

	<div>
		<label for="minimum_uptime_percentage">Minimum Uptime Percentage:</label>
		<span><input id="minimum_uptime_percentage" name="minimum_uptime_percentage" value="${mirror.minimum_uptime_percentage}" /></span>
	</div>
</div>

<div>
	<button> Update </button>
</div>

</fieldset>
</form>

</body>
</html>


--- NEW FILE edit_mirror_releases.kid ---
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
    py:extends="'../master.kid'">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
<title>Edit Mirror ${mirror.hostname} Releases</title>
<script type="text/javascript">
	function toggleDisableRelease(id, force_disable)
	{
		nodeWalk(getElement("release_"+id), function (node)
												{
													if (node.tagName == "INPUT")
													{
														if ( !node.disabled || force_disable )
															node.disabled = true;
														else
															node.disabled = false;
													}
													
													return node.childNodes;
												});
	}	

</script>

</head>
<body>
<form action="updateMirrorReleases" method="post">
<input type="hidden" name="hostname" value="${mirror.hostname}" />

<div class="head">
	Mirror Hostname: ${mirror.hostname}
</div>

<fieldset py:for="i,release in enumerate(releases)" >
<legend>Release ${release.name}</legend>

<div>
	<label for="has_release_${i}">Has Release:</label>
	<span><input id="has_release_${i}" name="has_release_${i}" type="checkbox" value="${release.name}" checked="${(None, '') [release_to_mirror_release.has_key(release)]}" /></span>
</div>

<div id="release_${i}">
	<div>
		<label for="release_path_${i}">Release Path: </label>
		<?python
	#use default path, if it's first time we don't have this release
	if release_to_mirror_release.has_key(release):
		value = release_to_mirror_release[release][0].release_path
	else:
		value = release.default_path
		?>
		<span><input id="release_path_${i}" name="release_path_${i}" value="${value}" /></span>
	</div>
	
	<div>
		Architectures:
		<ul py:for="j,arch in enumerate(release.archs)">
			<li>
				<label for="release_arch_${i}_${j}">${arch.name} </label> 
				<?python
checked = False
if release_to_mirror_release.has_key(release) and arch in release_to_mirror_release[release][1]:
	checked = True
				?>
				<span><input type="checkbox" id="release_arch_${i}_${j}" name="release_arch_${i}_${j}" value="${arch.name}" checked="${(None,'')[checked]}" /></span> 
			</li>
		</ul>
	</div>
	<script>
	if(${('true', 'false')[release_to_mirror_release.has_key(release)]})
		toggleDisableRelease(${i}, true);
	
	connect('has_release_${i}', 'onclick', function(event) {logDebug("Called");toggleDisableRelease(${i}); });
	</script>
	
</div>

</fieldset>

<div>
	<button style="left:-100px"> Update </button>
</div>
</form>

</body>
</html>


--- NEW FILE edit_rsync_ips.kid ---
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
    py:extends="'../master.kid'">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
<title>New Mirror</title>
<script>
	function addNewRsyncIP()
	{
		ip_id = 0;
		if(window.last_ip_id != undefined)
		{
			if(!getElement('rsync_ip_' + window.last_ip_id).value)
				return;

			ip_id = window.last_ip_id + 1;
		}
		
		window.last_ip_id = ip_id;
		var obj = LI(null, INPUT({'type':'text', 'name':'rsync_ip_'+ip_id, 'id':'rsync_ip_'+ip_id}));
		appendChildNodes('rsync_ips', obj);
	}
</script>
</head>
<body>
<form action="updateRsyncIPs" method="post">
<input name="hostname" value="${mirror.hostname}" type="hidden" />

<fieldset >
<legend>Update Mirror Rsync IPs</legend>
<div>
	<label>Host Name: </label>
	<span>${mirror.hostname}</span>
</div>
	<div>
		<div class="label">
			Rsync Downloader IPs:
		</div>
		
		<div class="value">

			<ul id="rsync_ips">
				<li py:for="ip_id,ip in enumerate(mirror.ips)">
					<input type="text" name="rsync_ip_${ip_id}" id="rsync_ip_${ip_id}" value="${ip.ip_addr}" />

					<span py:if="ip_id == len(mirror.ips)-1">
						<script>
							window.last_ip_id=${ip_id};
						</script>	
					</span>
				</li>
			</ul>
			<a href="#" onclick="addNewRsyncIP(); return false;">+</a>
		</div>
	</div>

<div>
	<button> Update </button>
</div>

</fieldset>
</form>

</body>
</html>


--- NEW FILE list_mirrors.kid ---
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
    py:extends="'../master.kid'">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
<title>List Releases</title>
</head>
<body>
	<table class="list">
		<thead>
			<tr>
				<th>
					Row
				</th>
				<th>
					Name
				</th>
				<th>
					Canonical URL
				</th>
				<th>
					Default Path
				</th>
				<th>
					Comment
				</th>
				<th>
					Architectures
				</th>
				<th>
					Update Architectures
				</th>
				<th>
					Edit
				</th>
				<th>
					Delete
				</th>
			</tr>		
		</thead>
		<tr py:for="i,release in enumerate(releases)" class="${i%2 and 'odd' or 'even'}">
			<td>
				${i+1}
			</td>
			<td>
				${release.name}
			</td>
			<td>
				${release.canonical}
			</td>			
			<td>
				${release.default_path}
			</td>
			<td>
				${release.comment}
			</td>
			<td>
				<ul>
					<li py:for="arch in release.archs">
						${arch.name}
					</li>
				</ul>
			</td>
			<td>
				<a href="${tg.url('/release/editReleaseArchs', release_name=release.name)}">
					U
				</a>
			</td>
			<td>
				<a href="${tg.url('/release/editRelease', release_name=release.name)}">
					E
				</a>
			</td>
			<td>
				<a href="${tg.url('/release/deleteRelease', release_name=release.name)}" class="delete_link">
					D
				</a>
			</td>
		</tr>
	</table>
	<div class="links">
		<ul>
			<li> 
				<a href="${tg.url('/release/newRelease')}"> New Release </a>
			</li>
			<li> 
				<a href="${tg.url('/arch/listArchs')}"> List Architectures </a>
			</li>
		</ul>
	</div>

</body>
</html>


--- NEW FILE my_mirrors.kid ---
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
    py:extends="'../master.kid'">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
<title>My Mirrors</title>
</head>
<body>
	<table class="list">
		<thead>
			<tr>
				<th>
					Row
				</th>
				<th>
					Hostname
				</th>
				<th>
					Comment
				</th>
				<th>
					System Active
				</th>
				<th>
					User Active
				</th>
				<th>
					Admin Active
				</th>
				<th>
					Uptime Percentage
				</th>
				<th>
					Min Uptime Percentage
				</th>
				<th>
					Private
				</th>
				<th>
					Releases
				</th>
				<th>
					Protocols
				</th>
				<th>
					View
				</th>
			</tr>		
		</thead>
		<tr py:for="i,mirror in enumerate(mirrors)" class="${i%2 and 'odd' or 'even'}">
			<td>
				${i+1}
			</td>
			<td>
				${mirror.hostname}
			</td>
			<td>
				${mirror.comment}
			</td>			
			<td>
				${mirror.active}
			</td>			
			<td>
				${mirror.user_active}
			</td>			
			<td>
				${mirror.admin_active}
			</td>			
			<td>
				${mirror.uptime_percentage}
			</td>			
			<td>
				${mirror.minimum_uptime_percentage}
			</td>			
			<td>
				${mirror.private}
			</td>			
			<td>
				<ul>
					<li py:for="mirror_release in mirror.mirror_releases">
						${mirror_release.release.name}
					</li>
				</ul>
			</td>
			<td>
				<ul>
					<li py:for="protocol in mirror.protocols">
						${protocol.name}
					</li>
				</ul>
			</td>
			<td>
				<a href="${tg.url('/mirror/viewMirror', hostname=mirror.hostname)}">
					V
				</a>
			</td>
		</tr>
	</table>
	<div class="links">
		<ul>
			<li> 
				<a href="${tg.url('/mirror/newMirror')}"> New Mirror </a>
			</li>
		</ul>
	</div>

</body>
</html>


--- NEW FILE new_mirror.kid ---
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
    py:extends="'../master.kid'">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
<title>New Mirror</title>
</head>
<body>
<form action="addMirror" method="post">

<fieldset >
<legend>Add New Mirror</legend>
<div>
	<label for="hostname">Host Name: </label>
	<span><input id="hostname" name="hostname" value="${hostname}" /></span>
</div>

<div>
	<label for="user_active">Mirror Is Active:</label>
	<span><input id="user_active" name="user_active" type="checkbox" checked="${(None, '') [user_active==True]}" /></span>
</div>

<div>
	<label for="comment" class="textarea">Comment:</label>
	<span><textarea id="comment" name="comment" ><span py:replace="comment" py:strip="True">Comment</span></textarea></span>
</div>

<div>
	Selected Protocols: ${input_values}
	<ul>
	<li py:for="i,protocol in enumerate(protocols)">
		<label for="protocol_${protocol.name}">${protocol.name}</label>
		<span><input type="checkbox" name="protocol_${protocol.name}" id="protocol_${protocol.name}" value="${protocol.name}" 
					checked="${(None, '') ['protocol_%s'%protocol.name in input_values]}" /></span>
	</li>
	</ul>
</div>

<div>
	<button> Add </button>
</div>

</fieldset>
</form>

</body>
</html>


--- NEW FILE view_mirror.kid ---
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
    py:extends="'../master.kid'">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
<title>View Mirror</title>
</head>
<body>

<fieldset >
<legend>Mirror ${mirror.hostname}</legend>
	<div>
		<div class="label">
			HostName:
		</div>
		
		<div class="value">
			${mirror.hostname}
		</div>
	</div>

	<div>
		<div class="label">
			Owner User:
		</div>
		
		<div class="value">
			${mirror.user.user_name}
		</div>
	</div>
		
	<div>
		<div class="label">
			Comment:
		</div>
		
		<div class="value">
			${mirror.comment}
		</div>
	</div>
	
	<div>
		<div class="label">
			System Active Status:
		</div>
		
		<div class="value">
			${mirror.active}
		</div>
	</div>
	
	<div>
		<div class="label">
			User Active Status:
		</div>
		
		<div class="value">
			${mirror.user_active}
		</div>
	</div>
	
	<div>
		<div class="label">
			Admin Active Status:
		</div>
		
		<div class="value">
			${mirror.admin_active}
		</div>
	</div>
	
	<div>
		<div class="label">
			Private:
		</div>
		
		<div class="value">
			${mirror.private}
		</div>
	</div>

	<div>
		<div class="label">
			Uptime Percentage:
		</div>
		
		<div class="value">
			${mirror.uptime_percentage}
		</div>
	</div>
	
	<div>
		<div class="label">
			Minimum Uptime Percentage:
		</div>
		
		<div class="value">
			${mirror.minimum_uptime_percentage}
		</div>
	</div>	
	
	<div>
		<div class="label">
			Releases:
		</div>
		
		<div class="value">
			<ul>
				<li py:for="mirror_release in mirror.mirror_releases">
						${mirror_release.release.name} 
						<div>
							<div class="label">path:</div> 
							<div class="value">${mirror_release.release_path}</div>
						</div>
						<div>
							<div class="label">Architectures:</div> 
						</div>
						<ul>
							<li py:for="mirror_arch in mirror_release.mirror_archs">
								${mirror_arch.arch.name}
								<div>
									<div class="label">Is Up To Date:</div>
									<div class="value">${mirror_arch.is_uptodate}</div>
								</div>
								
								<div>
									<div class="label">Last Failure:</div>
									<div class="value">${mirror_arch.last_failure}</div>
								</div>

								<div>
									<div class="label">Last Failure Reason:</div>
									<div class="value">${mirror_arch.last_failure_reason}</div>
								</div>
							</li>
						</ul>
				</li>
			</ul>
		</div>
	</div>
	
	<div>
		<div class="label">
			Protocols:
		</div>
		
		<div class="value">
			<ul>
				<li py:for="protocol in mirror.protocols">
					${protocol.name}
				</li>
			</ul>
		</div>
	</div>
	
	<div>
		<div class="label">
			Rsync Downloader IPs:
		</div>
		
		<div class="value">
			<ul>
				<li py:for="ip in mirror.ips">
					${ip.ip_addr}
				</li>
			</ul>
		</div>
	</div>

</fieldset>

<div class="links">
	<ul>
		<li> 
			<a href="${tg.url('/mirror/editMirror', hostname=mirror.hostname)}"> Edit Mirror </a>
		</li>
		<li> 
			<a href="${tg.url('/mirror/editMirrorReleases', hostname=mirror.hostname)}"> Update Releases </a>
		</li>
		<li> 
			<a href="${tg.url('/mirror/editRsyncIPs', hostname=mirror.hostname)}"> Update Rsync IPs </a>
		</li>
		<li> 
			<a href="${tg.url('/mirror/deleteMirror', hostname=mirror.hostname)}" class="delete_link"> Delete Mirror </a>
		</li>		
	</ul>
</div>

</body>
</html>




More information about the scm-commits mailing list