Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
|
||
<script language="JavaScript" type="text/javascript" src="/js/jquery.min.js"></script> | ||
|
||
<script language="JavaScript" type="text/javascript"> | ||
|
||
function listFiles(group) { | ||
$("#links").html("Loading..."); | ||
$.getJSON("/Content/GetFileList", { StorageGroup: group }, function(data) { | ||
$("#links").html(""); | ||
$.each(data.QStringList, function(i, value) { | ||
$("#links").append("<a href='/Content/GetFile?StorageGroup=" + group + "&FileName=" + value + "'>" + value + "</a><br>"); | ||
}); | ||
}); | ||
} | ||
</script> | ||
|
||
<h3>Sample Storage Group browser</h3> | ||
<div> | ||
Storage Group: | ||
<select id="sgName"> | ||
<% | ||
var myth = new Myth(); | ||
|
||
var hostName = myth.GetHostName(); | ||
var list = myth.GetStorageGroupDirs("", ""); | ||
var seenHosts = new Array(); | ||
|
||
for (var nIdx=0; nIdx < list.StorageGroupDirs.length; nIdx++) | ||
{ | ||
var sgDir = list.StorageGroupDirs[nIdx]; | ||
if (!seenHosts[sgDir.GroupName]) | ||
{ | ||
seenHosts[sgDir.GroupName] = 1; | ||
%> | ||
<option value="<%= sgDir.GroupName %>"><%=sgDir.GroupName%></option> | ||
<% | ||
} | ||
} | ||
%> | ||
</select> | ||
<input type='button' onClick='javascript:listFiles($("#sgName").val())' value='List Files'> | ||
</div> | ||
<br> | ||
<div id="links"></div> |