Skip to content

Commit def9acc

Browse files
committed
Initial commit
0 parents  commit def9acc

File tree

295 files changed

+175919
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

295 files changed

+175919
-0
lines changed

admin/add.asp

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
<!-------#include file="header.inc"---------->
2+
<!-------#include file="x-utilities.js"------>
3+
<!-------#include file="x-upload.js"--------->
4+
<!-------#include file="connection.js"------->
5+
6+
<div id="title">Uploading Tasks</div>
7+
<div id="transp">
8+
<table BORDER=0 WIDTH="640" cellpadding=4 cellspacing=10>
9+
<%
10+
//==============================================================
11+
12+
var dbg = 0;
13+
var count = 0;
14+
var xid = "";
15+
var dataset = "";
16+
var xtype = "";
17+
var xroot = "";
18+
var user = "";
19+
var comment = "";
20+
var path = "";
21+
var datapath = "";
22+
23+
var sep = "\\";
24+
25+
26+
// read in query if given by forms
27+
28+
xid = Request.Form("xid");
29+
dataset = Request.Form("dataset");
30+
xtype = Request.Form("xtype");
31+
xroot = Request.Form("xroot");
32+
user = Request.Form("user");
33+
comment = Request.Form("comment");
34+
datapath = Request.Form("taskdatapath");
35+
36+
//read query if given by query string
37+
38+
var key = new String();
39+
for(var i=0; i<Request.QueryString.Count;i++) {
40+
key = Request.QueryString.Key(i+1);
41+
key = key.toLowerCase();
42+
if(key=="xid") xid = String(Request.QueryString(key));
43+
if(key=="dataset") dataset = String(Request.QueryString(key));
44+
if(key=="xtype") xtype = String(Request.QueryString(key));
45+
if(key=="xroot") xroot = String(Request.QueryString(key));
46+
if(key=="user") user = String(Request.QueryString(key));
47+
if(key=="comment") comment = String(Request.QueryString(key));
48+
if(key=="taskdatapath") datapath = String(Request.QueryString(key));
49+
}
50+
51+
// change the /characters to \ in the host and path, if any
52+
xroot = String(xroot).replace(/\//g,"\\");
53+
xtype = xtype.toLowerCase();
54+
55+
if (xtype.match(/^(best|target|runs)$/) != null)
56+
path = xroot+ "phCSV"+sep+xtype+sep+xid+sep;
57+
if (xtype=="plates" || xtype=="galspec")
58+
path = xroot+ "spCSV"+sep+xtype+sep+xid+sep;
59+
if (xtype=="galprod")
60+
path = xroot+ "gpCSV"+sep+xtype+sep+xid+sep;
61+
if (xtype=="tiles")
62+
path = xroot+ "tiCSV"+sep+xtype+sep+xid+sep;
63+
if (xtype=="window")
64+
path = xroot+ "wiCSV"+sep+xtype+sep+xid+sep;
65+
if (xtype=="wise")
66+
path = xroot+ "wsCSV"+sep+xtype+sep+xid+sep;
67+
if (xtype=="sspp")
68+
path = xroot+ "ssppCSV"+sep+xtype+sep+xid+sep;
69+
if (xtype=="resolve")
70+
path = xroot+ "reCSV"+sep+xtype+sep+xid+sep;
71+
if (xtype=="pm")
72+
path = xroot+ "pmCSV"+sep+xtype+sep+xid+sep;
73+
if (xtype=="apogee")
74+
path = xroot+ "apCSV"+sep+xtype+sep+xid+sep;
75+
if (xtype=="finish")
76+
path = "\\\\";
77+
78+
// clean up the illegal HTML characters, if any
79+
comment = translateforbiddenchars(comment);
80+
81+
var taskid = taskExists(oCmd, xid, dataset, xtype);
82+
83+
if (taskid == 0) {
84+
var pmt = [xid,dataset,xtype,path,user,datapath,comment];
85+
86+
showLine("<tr><td><table width=640 cellpadding=2 cellspacing=2>");
87+
showTask(pmt);
88+
uploadTheTask(oCmd, pmt);
89+
showLine("</table></td></tr>");
90+
91+
92+
//uploadTheTask(oCmd, pmt);
93+
//Response.Redirect("tasklist.asp");
94+
}
95+
%>

admin/confirm-undo.asp

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<% @ LANGUAGE="JScript" %>
2+
<%
3+
//---------------------------------------------------------
4+
// setEq.asp
5+
// Alex Szalay, 12/24/01, Baltimore
6+
// enter equatorial coordinates of a PhotoObj
7+
//---------------------------------------------------------
8+
var id = "";
9+
var kill = "";
10+
var key = new String();
11+
for(var i=0; i<Request.QueryString.Count;i++) {
12+
key = Request.QueryString.Key(i+1);
13+
key = key.toLowerCase();
14+
if(key=="id") id = String(Request.QueryString(key));
15+
if(key=="kill") kill = String(Request.QueryString(key));
16+
}
17+
var str = (kill==0)? "Undo last step of Task#"+id: "Kill Task#"+kill;
18+
var link = (kill==0)? "id="+id:"kill="+kill;
19+
%>
20+
21+
<html>
22+
<head>
23+
<title>Confirm Undo</title>
24+
<link href="loadserver.css" rel="stylesheet" type="text/css">
25+
<style>
26+
.wtxt {font-family:sans-serif;font-size:9pt;color:#ccccff;}
27+
body {background-color:#bb0000;}
28+
</style>
29+
<script>
30+
31+
function press_cancel() {
32+
window.close();
33+
}
34+
35+
function press_ok(p) {
36+
document.location.href ="undostep.asp?"+p;
37+
38+
}
39+
</script>
40+
<title>Popup</title>
41+
</head>
42+
<body topmargin=20 leftmargin=2 bgcolor=red>
43+
<table width=210 border=0>
44+
<tr><td align=middle colspan=2>
45+
<%=str%>?
46+
</td></tr>
47+
<tr><td colspan=2>&nbsp;</td></tr>
48+
<tr><td align=middle>
49+
<input type="button" onClick='press_ok("<%=link%>");' value=" Ok " id=button1 name=button1>
50+
</td>
51+
<td align=middle>
52+
<input type="button" onClick="press_cancel();" value="Cancel" id=button2 name=button2>
53+
</td>
54+
</tr>
55+
</table>
56+
</body></html>

admin/connection.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<%
2+
//
3+
// the connection commands to the SkyServer database
4+
// change only this file in order to update connections
5+
//
6+
var oConn = Server.CreateObject("ADODB.Connection");
7+
var oCmd = Server.CreateObject("ADODB.Command");
8+
var strConn = "Provider=SQLOLEDB;User ID=webagent;Password=xxxxxx;";
9+
strConn += "Initial Catalog=loadsupport;Data Source=SDSSAD2";
10+
oConn.Open(strConn);
11+
oCmd.ActiveConnection = oConn;
12+
%>

admin/default.asp

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!-------#include file="header.inc"--------->
2+
<div id="title">Load Monitor</div>
3+
<div id="transp" class="med">
4+
<table width=600>
5+
<tr><td class='med'>
6+
These pages enable us to track the
7+
database loading process. It offers both
8+
browsing capabilities, accessible from anywhere
9+
and pages that help to manage and track the
10+
loading process.
11+
<p>
12+
<table>
13+
<tr>
14+
<td width=33% align='middle'><b>Functions</b></td>
15+
<td width=33% align='middle'><b>Views</b></td>
16+
<td width=33% align='middle'><b>Actions</b></td>
17+
</tr>
18+
<tr valign='top'>
19+
<td><ul>
20+
<li>Browsing/tracking
21+
<li>Management
22+
<li>Documentation
23+
</ul></td>
24+
<td><ul>
25+
<li>Active/all tasks
26+
<li>History of a task
27+
<li>Details of an event
28+
</ul></td>
29+
<td><ul>
30+
<li>Insert a new task
31+
<li>Undo last step
32+
</ul></td>
33+
</tr>
34+
</table>
35+
36+
</td></tr>
37+
</table>
38+
</div>
39+
40+
</body>
41+
</html>

admin/docs.asp

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2+
<!-------#include file="header.inc"---------><HTML><HEAD>
3+
<META http-equiv=Content-Type content="text/html; charset=unicode">
4+
<META content="MSHTML 6.00.2713.1100" name=GENERATOR></HEAD>
5+
<BODY>
6+
<div id="title">Documentation</div>
7+
<div id="transp" class="med">
8+
<table width=600>
9+
<tr><td class='med'>
10+
<h4>The loading process</h4>
11+
<p>
12+
The basic processing entity is a <b>Task</b>. A Task
13+
is started when an export block becomes available.
14+
Export blocks come converted to CSV, and are
15+
contained in a single directory. They must be
16+
registered to get in the processing queue.
17+
There are several different export types: TARGET,
18+
BEST, RUNS, PLATE and TILING. The format of the
19+
respective csv files are found <a href="das.fnal.gov">
20+
here</a>. Each task comes with a id number that is unique
21+
within its category.
22+
<p>
23+
The loading process consists of <b>Steps</b>. The
24+
first step is to <b>load</b> each block of data into a
25+
separate SQL Server database, containing only a
26+
thin set of indices. Then we <b>validate</b> the data.
27+
This includes several things: we verify that there
28+
are no primary key collisions, all foreign keys
29+
point to a valid record, and we build several
30+
ancilliary tables for spatial searches (HTM,
31+
Neighbors, etc.) After the validation step we
32+
<b>publish</b> the data: we perform a db-to-db copy,
33+
where the target is the final production database. The last step in the
34+
process is that we make a backup of the SQL block in its final stage to
35+
storage brick.</p>
36+
<p>
37+
There are codes associated with the state of the tasks.
38+
These are composed of the step name and of the
39+
40+
41+
</td></tr>
42+
43+
<tr><td class='med'>
44+
<table width=480 align=center>
45+
<tr><td>
46+
<IMG height=229 src="img/loadsteps.gif" width=480>
47+
</td></tr>
48+
<tr><td class='sml'>
49+
A state-machine representation of the loading process.
50+
Each step is a sequence of rather complex steps in itself.
51+
The yellow question marks represent a manual Undo step,
52+
which is performed as necessary.
53+
</td></tr>
54+
</table><br>
55+
</td></tr>
56+
57+
<tr><td class='med'>
58+
<h4>Tracking</h4>
59+
<p>
60+
We have set up a database to track the information about
61+
the loading. This database tracks Tasks and Events. Nothing
62+
is ever deleted from the database, we only add things. The
63+
database is visible from the outside, but its contents can
64+
only be changed (added to) from within the private network.
65+
<p>
66+
Each step generates several <b>Events</b>. An event is
67+
the start of a processing step, its success and its
68+
failure. An event is always uniquely associated with a task.
69+
It has a timestamp, indicating when the event was logged.
70+
Thus, one can estimate the time it took for a processing
71+
step from the difference between the timestamp of the
72+
completion and its start. The events can also point to a
73+
logfile, or to a set of log records in another table,
74+
which can be inspected in the case of an error condition.
75+
<p>
76+
Each action in the loadlog database is done through a
77+
small set of stored procedures, like <FONT
78+
face="Courier New">spNewTask</FONT>, or <FONT
79+
face="Courier New">spNewEvent</FONT>.</p>
80+
81+
82+
</td></tr>
83+
84+
85+
86+
</table>
87+
</div>
88+
89+
</BODY>
90+
</html>

0 commit comments

Comments
 (0)