14.1.1-11 baseline
Former-commit-id:71ae71c850
[formerly70a6f1936e
[formerly c32b2b2037c84cc074e7dc5a5a13b93223640d7d]] Former-commit-id:70a6f1936e
Former-commit-id:337b138200
This commit is contained in:
parent
69cef95302
commit
401ee156b8
53 changed files with 511 additions and 220 deletions
|
@ -25,11 +25,19 @@
|
||||||
# quite finished yet - or have finished only recently.
|
# quite finished yet - or have finished only recently.
|
||||||
#
|
#
|
||||||
# 2010/04/23 ryu Initial port to AWIPS II.
|
# 2010/04/23 ryu Initial port to AWIPS II.
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# SOFTWARE HISTORY
|
||||||
|
#
|
||||||
|
# Date Ticket# Engineer Description
|
||||||
|
# ------------ ---------- ----------- --------------------------
|
||||||
|
# 11/21/13 16770 ryu Change name of temporary files
|
||||||
|
# for dual domain.
|
||||||
#
|
#
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
#
|
#
|
||||||
# Do not show this in any menu. Should only be run via runProcedure after
|
# Do not show this in any menu. Should only be run via runProcedure after
|
||||||
# putting the parms to save in /tmp/FILE (one on each line)
|
# putting the parms to save in /tmp/<siteId>_FILE (one on each line)
|
||||||
#
|
#
|
||||||
#MenuItems = ["Verify"]
|
#MenuItems = ["Verify"]
|
||||||
#
|
#
|
||||||
|
@ -84,7 +92,7 @@ class Procedure (SmartScript.SmartScript):
|
||||||
# Read the parms from the FILE file
|
# Read the parms from the FILE file
|
||||||
#
|
#
|
||||||
parmlist=[]
|
parmlist=[]
|
||||||
filename="/tmp/%s"%FILE
|
filename="/tmp/%s_%s"% (self.getSiteID(), FILE)
|
||||||
if ((os.path.exists(filename)) and (os.path.isfile(filename))):
|
if ((os.path.exists(filename)) and (os.path.isfile(filename))):
|
||||||
try:
|
try:
|
||||||
infile=file(filename,"r")
|
infile=file(filename,"r")
|
||||||
|
|
|
@ -23,10 +23,18 @@
|
||||||
# 2008/05/28 - version 2.0.5 - bugfix for basetime/starttime when an
|
# 2008/05/28 - version 2.0.5 - bugfix for basetime/starttime when an
|
||||||
# archived grid is constant.
|
# archived grid is constant.
|
||||||
#
|
#
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# SOFTWARE HISTORY
|
||||||
|
#
|
||||||
|
# Date Ticket# Engineer Description
|
||||||
|
# ------------ ---------- ----------- --------------------------
|
||||||
|
# 11/21/13 16770 ryu Change name of temporary files
|
||||||
|
# for dual domain.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
#
|
#
|
||||||
# Do not show this in any menu. Should only be run via runProcedure after
|
# Do not show this in any menu. Should only be run via runProcedure after
|
||||||
# putting the force flag and model to correct in /tmp/FILE
|
# putting the force flag and model to correct in /tmp/<siteId>_FILE
|
||||||
#
|
#
|
||||||
#MenuItems = ["Verify"]
|
#MenuItems = ["Verify"]
|
||||||
#
|
#
|
||||||
|
@ -97,7 +105,7 @@ class Procedure (SmartScript.SmartScript):
|
||||||
force="0"
|
force="0"
|
||||||
model=""
|
model=""
|
||||||
obsmodel=""
|
obsmodel=""
|
||||||
filename="/tmp/%s"%FILE
|
filename="/tmp/%s_%s"% (self.getSiteID(), FILE)
|
||||||
if ((os.path.exists(filename))and(os.path.isfile(filename))):
|
if ((os.path.exists(filename))and(os.path.isfile(filename))):
|
||||||
try:
|
try:
|
||||||
infile=file(filename,"r")
|
infile=file(filename,"r")
|
||||||
|
|
|
@ -23,10 +23,18 @@
|
||||||
# this procedure is run via runProcedure.
|
# this procedure is run via runProcedure.
|
||||||
#
|
#
|
||||||
# 2010/04/23 ryu Initial port to AWIPS II.
|
# 2010/04/23 ryu Initial port to AWIPS II.
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# SOFTWARE HISTORY
|
||||||
|
#
|
||||||
|
# Date Ticket# Engineer Description
|
||||||
|
# ------------ ---------- ----------- --------------------------
|
||||||
|
# 11/21/13 16770 ryu Change name of temporary files
|
||||||
|
# for dual domain.
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
#
|
#
|
||||||
# Do not show this in any menu. Should only be run via runProcedure after
|
# Do not show this in any menu. Should only be run via runProcedure after
|
||||||
# putting the model to save in /tmp/FILE
|
# putting the model to save in /tmp/<siteId>_FILE
|
||||||
#
|
#
|
||||||
#MenuItems = ["Verify"] # for debug
|
#MenuItems = ["Verify"] # for debug
|
||||||
#
|
#
|
||||||
|
@ -739,7 +747,7 @@ class Procedure (SmartScript.SmartScript):
|
||||||
#==================================================================
|
#==================================================================
|
||||||
#
|
#
|
||||||
# getSaveModels - get list of models to save. First try reading
|
# getSaveModels - get list of models to save. First try reading
|
||||||
# the model name from /tmp/$FILE. If not there -
|
# the model name from /tmp/<siteId>_$FILE. If not there -
|
||||||
# get list of all models in the
|
# get list of all models in the
|
||||||
# BOIVerify system except Official and ISC
|
# BOIVerify system except Official and ISC
|
||||||
#
|
#
|
||||||
|
@ -749,7 +757,7 @@ class Procedure (SmartScript.SmartScript):
|
||||||
#
|
#
|
||||||
# Read the model from the FILE file
|
# Read the model from the FILE file
|
||||||
#
|
#
|
||||||
filename="/tmp/%s"%FILE
|
filename="/tmp/%s_%s"% (self.getSiteID(), FILE)
|
||||||
if ((os.path.exists(filename))and(os.path.isfile(filename))):
|
if ((os.path.exists(filename))and(os.path.isfile(filename))):
|
||||||
try:
|
try:
|
||||||
infile=file(filename,"r")
|
infile=file(filename,"r")
|
||||||
|
|
|
@ -13,6 +13,14 @@
|
||||||
# 2007/10/x25 - version 2.0 - original implementation of this program
|
# 2007/10/x25 - version 2.0 - original implementation of this program
|
||||||
#
|
#
|
||||||
# 2010/04/23 ryu Initial port to AWIPS II.
|
# 2010/04/23 ryu Initial port to AWIPS II.
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# SOFTWARE HISTORY
|
||||||
|
#
|
||||||
|
# Date Ticket# Engineer Description
|
||||||
|
# ------------ ---------- ----------- --------------------------
|
||||||
|
# 11/21/13 16770 ryu Change name of temporary files
|
||||||
|
# for dual domain.
|
||||||
#=====================================================================
|
#=====================================================================
|
||||||
#
|
#
|
||||||
# S T A R T C O N F I G U R A T I O N S E C T I O N
|
# S T A R T C O N F I G U R A T I O N S E C T I O N
|
||||||
|
@ -56,11 +64,6 @@ MODLIST=["Official","MOSGuideBC","MOSGuide","GFS40","GFS40BC",
|
||||||
#
|
#
|
||||||
EMAIL_FROM_ADDRESS="nobody.nobody@noaa.gov"
|
EMAIL_FROM_ADDRESS="nobody.nobody@noaa.gov"
|
||||||
#
|
#
|
||||||
# Temporary file where e-mail output is kept. This is automatically
|
|
||||||
# deleted after the commands below are executed.
|
|
||||||
#
|
|
||||||
EMAIL_TEMP_FILE="/tmp/temp_email.txt"
|
|
||||||
#
|
|
||||||
# Commands to be executed to send the temporary e-mail file.
|
# Commands to be executed to send the temporary e-mail file.
|
||||||
# You probably need to reference the EMAIL_TEMP_FILE you
|
# You probably need to reference the EMAIL_TEMP_FILE you
|
||||||
# specified above. This works on a typical AWIPS setup, where it
|
# specified above. This works on a typical AWIPS setup, where it
|
||||||
|
@ -68,9 +71,9 @@ EMAIL_TEMP_FILE="/tmp/temp_email.txt"
|
||||||
# then does a sendmail command on ls1, and then deletes the temporary
|
# then does a sendmail command on ls1, and then deletes the temporary
|
||||||
# file on ls1.
|
# file on ls1.
|
||||||
#
|
#
|
||||||
EMAIL_CMDS=["scp /tmp/temp_email.txt ldad@ls1-boi:/tmp/temp_email.txt",
|
EMAIL_CMDS=["scp /tmp/{FILE} ldad@ls1:/tmp/{FILE}",
|
||||||
"ssh ldad@ls1-boi sendmail -t </tmp/temp_email.txt",
|
"ssh ldad@ls1 sendmail -t </tmp/{FILE}",
|
||||||
"ssh ldad@ls1-boi rm /tmp/temp_email.txt",
|
"ssh ldad@ls1 rm /tmp/{FILE}",
|
||||||
]
|
]
|
||||||
#
|
#
|
||||||
# Always sends summary to these addresses - even if they were not
|
# Always sends summary to these addresses - even if they were not
|
||||||
|
@ -102,10 +105,10 @@ SAVE_DIR="/tmp"
|
||||||
# output is created. You can put "{FILE}" in these and it will be
|
# output is created. You can put "{FILE}" in these and it will be
|
||||||
# replaced with the filename before execution.
|
# replaced with the filename before execution.
|
||||||
#
|
#
|
||||||
SAVE_CMDS=["scp /tmp/{FILE} ldad@ls1-boi:/tmp/{FILE}",
|
SAVE_CMDS=["scp /tmp/{FILE} ldad@ls1:/tmp/{FILE}",
|
||||||
"ssh ldad@ls1-boi chmod 666 /tmp/{FILE}",
|
"ssh ldad@ls1 chmod 666 /tmp/{FILE}",
|
||||||
"ssh ldad@ls1-boi cp /tmp/{FILE} /lanfiles/GridVer/{FILE}",
|
"ssh ldad@ls1 cp /tmp/{FILE} /lanfiles/GridVer/{FILE}",
|
||||||
"ssh ldad@ls1-boi rm /tmp/{FILE}",
|
"ssh ldad@ls1 rm /tmp/{FILE}",
|
||||||
]
|
]
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
@ -159,7 +162,7 @@ class Procedure (SmartScript.SmartScript):
|
||||||
self.obsModel=OBSMODEL
|
self.obsModel=OBSMODEL
|
||||||
grid=self._empty
|
grid=self._empty
|
||||||
#
|
#
|
||||||
# See if a time is provided in a /tmp/SumTemps.time file
|
# See if a time is provided in a /tmp/<siteId>_SumTemps.time file
|
||||||
# or otherwise get the current system time
|
# or otherwise get the current system time
|
||||||
#
|
#
|
||||||
now=self.getNow()
|
now=self.getNow()
|
||||||
|
@ -249,8 +252,8 @@ class Procedure (SmartScript.SmartScript):
|
||||||
# Save the clean output for use on webpages
|
# Save the clean output for use on webpages
|
||||||
#
|
#
|
||||||
(vyea,vmon,vday,vhou,vmin,vsec,vwda,vyda,vdst)=time.gmtime(verifday)
|
(vyea,vmon,vday,vhou,vmin,vsec,vwda,vyda,vdst)=time.gmtime(verifday)
|
||||||
outname="%4.4d%2.2d%2.2d_%s.html"%(vyea,vmon,vday,parm)
|
outname="%s_%4.4d%2.2d%2.2d_%s.html"%(self.getSiteID(),vyea,vmon,vday,parm)
|
||||||
fullname="%s/%s"%(SAVE_DIR,outname)
|
fullname="%s/%s_%s"%(SAVE_DIR, outname)
|
||||||
outfile=file(fullname,"w")
|
outfile=file(fullname,"w")
|
||||||
outfile.write(cleanoutput)
|
outfile.write(cleanoutput)
|
||||||
outfile.close()
|
outfile.close()
|
||||||
|
@ -265,7 +268,7 @@ class Procedure (SmartScript.SmartScript):
|
||||||
return
|
return
|
||||||
#==================================================================
|
#==================================================================
|
||||||
# getNow - sees if there is a specified time in the
|
# getNow - sees if there is a specified time in the
|
||||||
# /tmp/SumTemps.time file. If no file exists, or there
|
# /tmp/<siteId>_SumTemps.time file. If no file exists, or there
|
||||||
# is trouble reading file, it uses the current system
|
# is trouble reading file, it uses the current system
|
||||||
# time as 'now'.
|
# time as 'now'.
|
||||||
#
|
#
|
||||||
|
@ -277,7 +280,7 @@ class Procedure (SmartScript.SmartScript):
|
||||||
#
|
#
|
||||||
# If the file doesn't exist or isn't a real file...return
|
# If the file doesn't exist or isn't a real file...return
|
||||||
#
|
#
|
||||||
timeFile="/tmp/SumTemps.time"
|
timeFile="/tmp/%s_SumTemps.time" % self.getSiteID()
|
||||||
if not os.path.exists(timeFile):
|
if not os.path.exists(timeFile):
|
||||||
return now
|
return now
|
||||||
if not os.path.isfile(timeFile):
|
if not os.path.isfile(timeFile):
|
||||||
|
@ -363,6 +366,8 @@ class Procedure (SmartScript.SmartScript):
|
||||||
(gyea,gmon,gday,ghou,gmin,gsec,gwda,gyda,gdst)=time.gmtime(verifday)
|
(gyea,gmon,gday,ghou,gmin,gsec,gwda,gyda,gdst)=time.gmtime(verifday)
|
||||||
subject="%s verification for %s, %s %d, %4.4d"%(parm,DAYS[gwda],
|
subject="%s verification for %s, %s %d, %4.4d"%(parm,DAYS[gwda],
|
||||||
MONS[gmon-1],gday,gyea)
|
MONS[gmon-1],gday,gyea)
|
||||||
|
|
||||||
|
EMAIL_TEMP_FILE="/tmp/%s_temp_email.txt" % self.getSiteID()
|
||||||
outfile=open(EMAIL_TEMP_FILE,"w")
|
outfile=open(EMAIL_TEMP_FILE,"w")
|
||||||
outfile.write("To:%s\n"%to)
|
outfile.write("To:%s\n"%to)
|
||||||
outfile.write("From:%s\n"%EMAIL_FROM_ADDRESS)
|
outfile.write("From:%s\n"%EMAIL_FROM_ADDRESS)
|
||||||
|
@ -372,7 +377,8 @@ class Procedure (SmartScript.SmartScript):
|
||||||
outfile.close()
|
outfile.close()
|
||||||
if len(EMAIL_CMDS)>0:
|
if len(EMAIL_CMDS)>0:
|
||||||
for cmd in EMAIL_CMDS:
|
for cmd in EMAIL_CMDS:
|
||||||
os.system(cmd)
|
newcmd=cmd.replace("{FILE}", EMAIL_TEMP_FILE)
|
||||||
|
os.system(newcmd)
|
||||||
#os.system("rm %s"%EMAIL_TEMP_FILE)
|
#os.system("rm %s"%EMAIL_TEMP_FILE)
|
||||||
return
|
return
|
||||||
#==================================================================
|
#==================================================================
|
||||||
|
|
|
@ -97,7 +97,8 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||||
* invalid product Id and user want to edit it anyway.
|
* invalid product Id and user want to edit it anyway.
|
||||||
* 09/20/2012 1196 rferrel Changing dialogs being called to not block.
|
* 09/20/2012 1196 rferrel Changing dialogs being called to not block.
|
||||||
* 11/26/2012 14526 mgamazaychikov Added traverse listener for RETURN key
|
* 11/26/2012 14526 mgamazaychikov Added traverse listener for RETURN key
|
||||||
* 10/07/2012 16664 mgamazaychikov Added padProdDesignatorText method
|
* 10/07/2013 16664 mgamazaychikov Added padProdDesignatorText method
|
||||||
|
* 11/21/2013 16633 mgamazaychikov Improved consistency between AFOS PIL and WMO Heading fields.
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author lvenable
|
* @author lvenable
|
||||||
|
@ -1012,6 +1013,17 @@ public class AWIPSHeaderBlockDlg extends CaveSWTDialog implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// reset WMO Heading or AFOS PIL sections to
|
||||||
|
// make the sections consistent with each other
|
||||||
|
boolean afosReset = isAfosResetRequired();
|
||||||
|
boolean wmoidReset = isWmoidResetRequired();
|
||||||
|
if (callAfosLookup && afosReset) {
|
||||||
|
setAfosId(null);
|
||||||
|
}
|
||||||
|
if (!callAfosLookup && wmoidReset) {
|
||||||
|
setWmoId("", "");
|
||||||
|
}
|
||||||
|
|
||||||
if (!isDisposed()) {
|
if (!isDisposed()) {
|
||||||
if (tf.getCaretOffset() == tf.getTextLimit()) {
|
if (tf.getCaretOffset() == tf.getTextLimit()) {
|
||||||
nextTF.setFocus();
|
nextTF.setFocus();
|
||||||
|
@ -1051,4 +1063,31 @@ public class AWIPSHeaderBlockDlg extends CaveSWTDialog implements
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isAfosResetRequired() {
|
||||||
|
// returns true if changes are made to WMO Heading for a complete AFOS PIL
|
||||||
|
boolean wmoSectionComplete = isWmoHeadingComplete();
|
||||||
|
boolean afosPilComplete = isAfosPilComplete();
|
||||||
|
return afosPilComplete && !wmoSectionComplete && lookupAllowed;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isWmoidResetRequired() {
|
||||||
|
// returns true if changes are made to AFOS PIL for a complete WMO Heading
|
||||||
|
boolean wmoSectionComplete = isWmoHeadingComplete();
|
||||||
|
boolean afosPilComplete = isAfosPilComplete();
|
||||||
|
return !afosPilComplete && wmoSectionComplete && lookupAllowed;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isWmoHeadingComplete() {
|
||||||
|
// returns true for a complete WMO Heading
|
||||||
|
return wmoTtaaiiTF.getText().length() == wmoTtaaiiTF.getTextLimit() &&
|
||||||
|
ccccTF.getText().length() == ccccTF.getTextLimit();
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isAfosPilComplete() {
|
||||||
|
// returns true for a complete AFOS PIL
|
||||||
|
return wsfoIdTF.getText().length() == wsfoIdTF.getTextLimit() &&
|
||||||
|
prodCatTF.getText().length() == prodCatTF.getTextLimit() &&
|
||||||
|
prodDesignatorTF.getText().length() == prodDesignatorTF.getTextLimit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,6 +121,7 @@ import com.raytheon.uf.common.dataplugin.text.db.StdTextProductId;
|
||||||
import com.raytheon.uf.common.dataplugin.text.request.RemoteRetrievalRequest;
|
import com.raytheon.uf.common.dataplugin.text.request.RemoteRetrievalRequest;
|
||||||
import com.raytheon.uf.common.dataplugin.text.request.StdTextProductServerRequest;
|
import com.raytheon.uf.common.dataplugin.text.request.StdTextProductServerRequest;
|
||||||
import com.raytheon.uf.common.dataplugin.text.request.TextProductInfoCreateRequest;
|
import com.raytheon.uf.common.dataplugin.text.request.TextProductInfoCreateRequest;
|
||||||
|
import com.raytheon.uf.common.dissemination.OUPTestRequest;
|
||||||
import com.raytheon.uf.common.dissemination.OUPRequest;
|
import com.raytheon.uf.common.dissemination.OUPRequest;
|
||||||
import com.raytheon.uf.common.dissemination.OUPResponse;
|
import com.raytheon.uf.common.dissemination.OUPResponse;
|
||||||
import com.raytheon.uf.common.dissemination.OfficialUserProduct;
|
import com.raytheon.uf.common.dissemination.OfficialUserProduct;
|
||||||
|
@ -331,6 +332,7 @@ import com.raytheon.viz.ui.dialogs.SWTMessageBox;
|
||||||
* 04Sep2013 2176 jsanchez Changed the order of the QC check dialogs.
|
* 04Sep2013 2176 jsanchez Changed the order of the QC check dialogs.
|
||||||
* 12Sep2013 DR 2249 rferrel Change Time stamp in file name created by warngen to use
|
* 12Sep2013 DR 2249 rferrel Change Time stamp in file name created by warngen to use
|
||||||
* simulated time.
|
* simulated time.
|
||||||
|
* 20Nov2013 DR 16777 D. Friedman Check if OUPRequest will work before setting ETN.
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author lvenable
|
* @author lvenable
|
||||||
|
@ -4936,53 +4938,61 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
||||||
removeOptionalFields();
|
removeOptionalFields();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
/* update the vtec string in the message */
|
|
||||||
// DR14553 (make upper case in product)
|
|
||||||
if (!resend) {
|
|
||||||
body = VtecUtil.getVtec(removeSoftReturns(textEditor
|
|
||||||
.getText().toUpperCase()), true);
|
|
||||||
}
|
|
||||||
updateTextEditor(body);
|
updateTextEditor(body);
|
||||||
if ((inEditMode || resend)
|
if ((inEditMode || resend)
|
||||||
&& saveEditedProduct(false, resend, true)) {
|
&& saveEditedProduct(false, resend, true)) {
|
||||||
inEditMode = false;
|
inEditMode = false;
|
||||||
}
|
}
|
||||||
|
if (!resend) {
|
||||||
|
StdTextProduct prod = getStdTextProduct();
|
||||||
|
OUPTestRequest testReq = new OUPTestRequest();
|
||||||
|
testReq.setOupRequest(
|
||||||
|
createOUPRequest(prod, prod.getProduct()));
|
||||||
|
try {
|
||||||
|
OUPResponse checkResponse = (OUPResponse)
|
||||||
|
ThriftClient.sendRequest(testReq);
|
||||||
|
if (checkResponse.hasFailure()) {
|
||||||
|
statusHandler.handle(Priority.PROBLEM,
|
||||||
|
"Error during text product transmission check: "
|
||||||
|
+ checkResponse.getMessage());
|
||||||
|
inEditMode = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} catch (VizException e) {
|
||||||
|
statusHandler.handle(Priority.PROBLEM,
|
||||||
|
"Error during text product transmission check", e);
|
||||||
|
inEditMode = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Update the vtec string in the message. It looks wrong to
|
||||||
|
* do this after saveEditedProduct, but it works because
|
||||||
|
* for this case (isOpertional && ! resend) case, saveEditedProduct,
|
||||||
|
* does not actually save anything. */
|
||||||
|
prod.setProduct(
|
||||||
|
VtecUtil.getVtec(removeSoftReturns(prod.getProduct()), true));
|
||||||
|
/*
|
||||||
|
* This silly bit of code updates the ETN of a VTEC in the
|
||||||
|
* text pane to reflect the ETN that was actually used, but
|
||||||
|
* not update any other parts of the text even though they
|
||||||
|
* may have also been changed just before the product was
|
||||||
|
* sent.
|
||||||
|
*
|
||||||
|
* A1 works similarly.
|
||||||
|
*/
|
||||||
|
updateTextEditor(copyEtn(prod.getProduct(), body));
|
||||||
|
}
|
||||||
|
|
||||||
String product = TextDisplayModel.getInstance().getProduct(
|
String product = TextDisplayModel.getInstance().getProduct(
|
||||||
token);
|
token);
|
||||||
OUPRequest req = new OUPRequest();
|
// TODO: Should not need to call getProduct and the like twice.
|
||||||
OfficialUserProduct oup = new OfficialUserProduct();
|
StdTextProduct prod = getStdTextProduct();
|
||||||
StdTextProduct prod = getStdTextProduct(); // TODO: makes me
|
|
||||||
// nervous...
|
OUPRequest req = createOUPRequest(prod, product);
|
||||||
String awipsWanPil = prod.getSite() + prod.getNnnid()
|
|
||||||
+ prod.getXxxid();
|
|
||||||
String awipsID = prod.getNnnid() + prod.getXxxid();
|
|
||||||
|
|
||||||
if (notify != null) {
|
if (notify != null) {
|
||||||
notify.add(product);
|
notify.add(product);
|
||||||
}
|
}
|
||||||
oup.setAwipsWanPil(awipsWanPil);
|
|
||||||
oup.setNeedsWmoHeader(false);
|
|
||||||
oup.setProductText(product);
|
|
||||||
oup.setSource("TextWS");
|
|
||||||
oup.setWmoType(fixNOR(prod.getBbbid()));
|
|
||||||
oup.setUserDateTimeStamp(prod.getHdrtime());
|
|
||||||
StringBuilder fileName = new StringBuilder();
|
|
||||||
|
|
||||||
// The .wan extension followed by the 10 digit epoch seconds
|
|
||||||
// of simulated time is used in EDEX's WarningDecoder to
|
|
||||||
// determine the base time.
|
|
||||||
fileName.append(awipsID).append(".wan")
|
|
||||||
.append(TimeUtil.getUnixTime(TimeUtil.newDate()));
|
|
||||||
oup.setFilename(fileName.toString());
|
|
||||||
oup.setAddress(addressee);
|
|
||||||
if ((attachedFile != null) && (attachedFilename != null)) {
|
|
||||||
oup.setAttachedFile(attachedFile);
|
|
||||||
oup.setAttachedFilename(attachedFilename);
|
|
||||||
}
|
|
||||||
req.setCheckBBB(true);
|
|
||||||
req.setProduct(oup);
|
|
||||||
req.setUser(UserController.getUserObject());
|
|
||||||
|
|
||||||
// Code in Run statement goes here!
|
// Code in Run statement goes here!
|
||||||
new Thread(new ThriftClientRunnable(req)).start();
|
new Thread(new ThriftClientRunnable(req)).start();
|
||||||
|
@ -5034,6 +5044,51 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private OUPRequest createOUPRequest(StdTextProduct prod, String text) {
|
||||||
|
OUPRequest req = new OUPRequest();
|
||||||
|
OfficialUserProduct oup = new OfficialUserProduct();
|
||||||
|
String awipsWanPil = prod.getSite() + prod.getNnnid()
|
||||||
|
+ prod.getXxxid();
|
||||||
|
String awipsID = prod.getNnnid() + prod.getXxxid();
|
||||||
|
|
||||||
|
oup.setAwipsWanPil(awipsWanPil);
|
||||||
|
oup.setNeedsWmoHeader(false);
|
||||||
|
oup.setProductText(text);
|
||||||
|
oup.setSource("TextWS");
|
||||||
|
oup.setWmoType(fixNOR(prod.getBbbid()));
|
||||||
|
oup.setUserDateTimeStamp(prod.getHdrtime());
|
||||||
|
StringBuilder fileName = new StringBuilder();
|
||||||
|
|
||||||
|
// The .wan extension followed by the 10 digit epoch seconds
|
||||||
|
// of simulated time is used in EDEX's WarningDecoder to
|
||||||
|
// determine the base time.
|
||||||
|
fileName.append(awipsID).append(".wan")
|
||||||
|
.append(TimeUtil.getUnixTime(TimeUtil.newDate()));
|
||||||
|
oup.setFilename(fileName.toString());
|
||||||
|
oup.setAddress(addressee);
|
||||||
|
if ((attachedFile != null) && (attachedFilename != null)) {
|
||||||
|
oup.setAttachedFile(attachedFile);
|
||||||
|
oup.setAttachedFilename(attachedFilename);
|
||||||
|
}
|
||||||
|
req.setCheckBBB(true);
|
||||||
|
req.setProduct(oup);
|
||||||
|
req.setUser(UserController.getUserObject());
|
||||||
|
return req;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String copyEtn(String from, String to) {
|
||||||
|
VtecObject fromVtec = VtecUtil.parseMessage(from);
|
||||||
|
|
||||||
|
if (fromVtec != null && "NEW".equals(fromVtec.getAction())) {
|
||||||
|
VtecObject toVtec = VtecUtil.parseMessage(to);
|
||||||
|
if (toVtec != null) {
|
||||||
|
toVtec.setSequence(fromVtec.getSequence());
|
||||||
|
return VtecUtil.replaceFirstVtecString(to, fromVtec);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return to;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Recreates the original message by combining the header and the body from
|
* Recreates the original message by combining the header and the body from
|
||||||
* the edit windows.
|
* the edit windows.
|
||||||
|
|
|
@ -47,6 +47,7 @@ import com.raytheon.uf.common.status.UFStatus;
|
||||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||||
import com.raytheon.uf.common.time.ISimulatedTimeChangeListener;
|
import com.raytheon.uf.common.time.ISimulatedTimeChangeListener;
|
||||||
import com.raytheon.uf.common.time.SimulatedTime;
|
import com.raytheon.uf.common.time.SimulatedTime;
|
||||||
|
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||||
import com.raytheon.viz.core.mode.CAVEMode;
|
import com.raytheon.viz.core.mode.CAVEMode;
|
||||||
import com.raytheon.viz.ui.actions.ShowTimeDialog;
|
import com.raytheon.viz.ui.actions.ShowTimeDialog;
|
||||||
|
|
||||||
|
@ -64,6 +65,8 @@ import com.raytheon.viz.ui.actions.ShowTimeDialog;
|
||||||
* Nov 30,2007 461 bphillip Initial Creation
|
* Nov 30,2007 461 bphillip Initial Creation
|
||||||
* 09JUL2008 1234 ebabin Updates for color, and display issues.
|
* 09JUL2008 1234 ebabin Updates for color, and display issues.
|
||||||
* Jan 09, 2013 1442 rferrel Added Simulated Time Change listener.
|
* Jan 09, 2013 1442 rferrel Added Simulated Time Change listener.
|
||||||
|
* Nov 19, 2013 2439 rferrel Adjust timer schedule to update when
|
||||||
|
* DRT rolls over to the next minute.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -102,8 +105,10 @@ public class TimeDisplay extends ContributionItem {
|
||||||
td.update();
|
td.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
long t = System.currentTimeMillis() % 60000;
|
// DR 2439 schedule when simulated time minute changes.
|
||||||
this.schedule(60000 - t);
|
long t = TimeUtil.newDate().getTime()
|
||||||
|
% TimeUtil.MILLIS_PER_MINUTE;
|
||||||
|
this.schedule(TimeUtil.MILLIS_PER_MINUTE - t);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status.OK_STATUS;
|
return Status.OK_STATUS;
|
||||||
|
@ -158,7 +163,8 @@ public class TimeDisplay extends ContributionItem {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void timechanged() {
|
public void timechanged() {
|
||||||
update();
|
// Force immediate update and reschedule.
|
||||||
|
updateJob.wakeUp();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
SimulatedTime.getSystemTime().addSimulatedTimeChangeListener(
|
SimulatedTime.getSystemTime().addSimulatedTimeChangeListener(
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.raytheon.viz.warnings.rsc;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Calendar;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
@ -212,7 +213,8 @@ public abstract class AbstractWWAResource extends
|
||||||
framePeriod = new TimeRange(time.getRefTime(),
|
framePeriod = new TimeRange(time.getRefTime(),
|
||||||
frameTimes[frameIdx + 1].getRefTime());
|
frameTimes[frameIdx + 1].getRefTime());
|
||||||
} else {
|
} else {
|
||||||
framePeriod = new TimeRange(time.getRefTime(), LAST_FRAME_ADJ);
|
framePeriod = getLastFrameTimeRange(time.getRefTime());
|
||||||
|
|
||||||
lastFrame = true;
|
lastFrame = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -333,8 +335,7 @@ public abstract class AbstractWWAResource extends
|
||||||
framePeriod = new TimeRange(thisFrameTime.getRefTime(),
|
framePeriod = new TimeRange(thisFrameTime.getRefTime(),
|
||||||
frames[index + 1].getRefTime());
|
frames[index + 1].getRefTime());
|
||||||
} else {
|
} else {
|
||||||
framePeriod = new TimeRange(thisFrameTime.getRefTime(),
|
framePeriod = getLastFrameTimeRange(thisFrameTime.getRefTime());
|
||||||
LAST_FRAME_ADJ);
|
|
||||||
lastFrame = true;
|
lastFrame = true;
|
||||||
}
|
}
|
||||||
synchronized (paintLock) {
|
synchronized (paintLock) {
|
||||||
|
@ -472,15 +473,7 @@ public abstract class AbstractWWAResource extends
|
||||||
frameTime = timeToDisplay;
|
frameTime = timeToDisplay;
|
||||||
// point paint time to different time
|
// point paint time to different time
|
||||||
paintTime = new DataTime(timeToDisplay);
|
paintTime = new DataTime(timeToDisplay);
|
||||||
// point framePeriod to new frame
|
framePeriod = getLastFrameTimeRange(frameTime);
|
||||||
if (SimulatedTime.getSystemTime().isRealTime()) {
|
|
||||||
framePeriod = new TimeRange(frameTime, LAST_FRAME_ADJ);
|
|
||||||
} else {
|
|
||||||
// Prevent getting "future" records by keeping interval in the
|
|
||||||
// same minute.
|
|
||||||
framePeriod = new TimeRange(frameTime,
|
|
||||||
30 * TimeUtil.MILLIS_PER_SECOND);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if the warning is cancelled
|
// check if the warning is cancelled
|
||||||
|
@ -508,8 +501,8 @@ public abstract class AbstractWWAResource extends
|
||||||
descFrameTimes.length);
|
descFrameTimes.length);
|
||||||
for (int i = 0; i < descFrameTimes.length; i++) {
|
for (int i = 0; i < descFrameTimes.length; i++) {
|
||||||
if (i == descFrameTimes.length - 1) {
|
if (i == descFrameTimes.length - 1) {
|
||||||
framePeriods.add(new TimeRange(descFrameTimes[i].getRefTime(),
|
framePeriods.add(getLastFrameTimeRange(descFrameTimes[i]
|
||||||
LAST_FRAME_ADJ));
|
.getRefTime()));
|
||||||
} else {
|
} else {
|
||||||
framePeriods.add(new TimeRange(descFrameTimes[i].getRefTime(),
|
framePeriods.add(new TimeRange(descFrameTimes[i].getRefTime(),
|
||||||
descFrameTimes[i + 1].getRefTime()));
|
descFrameTimes[i + 1].getRefTime()));
|
||||||
|
@ -691,4 +684,27 @@ public abstract class AbstractWWAResource extends
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine time range for the last frame. When in simulated time (DRT)
|
||||||
|
* keep end of time range the start of the base time's next minute.
|
||||||
|
*
|
||||||
|
* @param baseTime
|
||||||
|
* @return timeRange
|
||||||
|
*/
|
||||||
|
private TimeRange getLastFrameTimeRange(Date baseTime) {
|
||||||
|
TimeRange timeRange = null;
|
||||||
|
if (SimulatedTime.getSystemTime().isRealTime()) {
|
||||||
|
timeRange = new TimeRange(baseTime, LAST_FRAME_ADJ);
|
||||||
|
} else {
|
||||||
|
Calendar cal = TimeUtil.newGmtCalendar();
|
||||||
|
cal.setTime(baseTime);
|
||||||
|
// Make the end time for the last frame the start of the next minute
|
||||||
|
// of the base time to prevent getting "future" warnings.
|
||||||
|
cal.add(Calendar.MINUTE, 1);
|
||||||
|
cal.set(Calendar.SECOND, 0);
|
||||||
|
cal.set(Calendar.MILLISECOND, 0);
|
||||||
|
timeRange = new TimeRange(baseTime, cal.getTime());
|
||||||
|
}
|
||||||
|
return timeRange;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -780,7 +780,7 @@ class IscMosaic:
|
||||||
if tr is not None:
|
if tr is not None:
|
||||||
try:
|
try:
|
||||||
logger.debug("Processing Blank: %s TR=%s",
|
logger.debug("Processing Blank: %s TR=%s",
|
||||||
parmName, self.__printTR(tr))
|
parmName, printTR(tr))
|
||||||
self.__processBlankTime(mGrid, tr)
|
self.__processBlankTime(mGrid, tr)
|
||||||
except:
|
except:
|
||||||
logger.exception('Failure to process grid blanking Parm=%s Time=%s',
|
logger.exception('Failure to process grid blanking Parm=%s Time=%s',
|
||||||
|
|
|
@ -74,7 +74,7 @@ import com.raytheon.uf.edex.plugin.grid.dao.GridDao;
|
||||||
* Mar 27, 2013 1821 bsteffen Reduce db and pypies requests in grid
|
* Mar 27, 2013 1821 bsteffen Reduce db and pypies requests in grid
|
||||||
* assembler.
|
* assembler.
|
||||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||||
*
|
* Nov 19, 2013 2478 rjpeter Make update process update database also.
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author bphillip
|
* @author bphillip
|
||||||
|
@ -112,8 +112,8 @@ public class EnsembleGridAssembler implements IDecoderPostProcessor {
|
||||||
FilenameFilters.ACCEPT_FILES,
|
FilenameFilters.ACCEPT_FILES,
|
||||||
FilenameFilters.byFileExtension(".xml"));
|
FilenameFilters.byFileExtension(".xml"));
|
||||||
|
|
||||||
List<File> thinnedModelFiles = FileUtil.listFiles(commonPath,
|
List<File> thinnedModelFiles = FileUtil.listFiles(commonPath, filter,
|
||||||
filter, false);
|
false);
|
||||||
|
|
||||||
for (File file : thinnedModelFiles) {
|
for (File file : thinnedModelFiles) {
|
||||||
try {
|
try {
|
||||||
|
@ -274,7 +274,7 @@ public class EnsembleGridAssembler implements IDecoderPostProcessor {
|
||||||
assembledRecord.setMessageData(rec.getFloatData());
|
assembledRecord.setMessageData(rec.getFloatData());
|
||||||
mergeData(record, assembledRecord, thinned);
|
mergeData(record, assembledRecord, thinned);
|
||||||
assembledRecord.setOverwriteAllowed(true);
|
assembledRecord.setOverwriteAllowed(true);
|
||||||
dao.persistToHDF5(assembledRecord);
|
dao.persistRecords(assembledRecord);
|
||||||
} catch (PluginException e) {
|
} catch (PluginException e) {
|
||||||
throw new GribException("Error storing assembled grid to HDF5", e);
|
throw new GribException("Error storing assembled grid to HDF5", e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
package com.raytheon.uf.common.dissemination;
|
||||||
|
|
||||||
|
import com.raytheon.uf.common.auth.req.AbstractPrivilegedRequest;
|
||||||
|
import com.raytheon.uf.common.auth.user.IUser;
|
||||||
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
|
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request to check if an OUPRequest will work
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
*
|
||||||
|
* SOFTWARE HISTORY
|
||||||
|
* Date Ticket# Engineer Description
|
||||||
|
* ------------ ---------- ----------- --------------------------
|
||||||
|
* Nov 20, 2013 DR 16777 D. Friedman Initial creation
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@DynamicSerialize
|
||||||
|
public class OUPTestRequest extends AbstractPrivilegedRequest {
|
||||||
|
|
||||||
|
@DynamicSerializeElement
|
||||||
|
OUPRequest oupRequest;
|
||||||
|
|
||||||
|
public IUser getUser() {
|
||||||
|
return oupRequest.getUser();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUser(IUser user) {
|
||||||
|
oupRequest.setUser(user);
|
||||||
|
}
|
||||||
|
|
||||||
|
public OUPRequest getOupRequest() {
|
||||||
|
return oupRequest;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOupRequest(OUPRequest oupRequest) {
|
||||||
|
this.oupRequest = oupRequest;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -7,10 +7,17 @@
|
||||||
<bean id="oupHandler" class="com.raytheon.uf.edex.dissemination.OUPHandler">
|
<bean id="oupHandler" class="com.raytheon.uf.edex.dissemination.OUPHandler">
|
||||||
<property name="ackManager" ref="oupAckMgr" />
|
<property name="ackManager" ref="oupAckMgr" />
|
||||||
</bean>
|
</bean>
|
||||||
|
<bean id="oupTestHandler" class="com.raytheon.uf.edex.dissemination.OUPTestHandler">
|
||||||
|
<property name="oupHandler" ref="oupHandler" />
|
||||||
|
</bean>
|
||||||
<bean factory-bean="handlerRegistry" factory-method="register">
|
<bean factory-bean="handlerRegistry" factory-method="register">
|
||||||
<constructor-arg value="com.raytheon.uf.common.dissemination.OUPRequest" />
|
<constructor-arg value="com.raytheon.uf.common.dissemination.OUPRequest" />
|
||||||
<constructor-arg ref="oupHandler" />
|
<constructor-arg ref="oupHandler" />
|
||||||
</bean>
|
</bean>
|
||||||
|
<bean factory-bean="handlerRegistry" factory-method="register">
|
||||||
|
<constructor-arg value="com.raytheon.uf.common.dissemination.OUPTestRequest" />
|
||||||
|
<constructor-arg ref="oupTestHandler" />
|
||||||
|
</bean>
|
||||||
|
|
||||||
<camelContext id="handleoupAckMgrContext" xmlns="http://camel.apache.org/schema/spring"
|
<camelContext id="handleoupAckMgrContext" xmlns="http://camel.apache.org/schema/spring"
|
||||||
errorHandlerRef="errorHandler">
|
errorHandlerRef="errorHandler">
|
||||||
|
|
|
@ -58,6 +58,7 @@ import com.raytheon.uf.edex.dissemination.transmitted.TransProdHeader;
|
||||||
* Oct 22, 2009 njensen Initial creation
|
* Oct 22, 2009 njensen Initial creation
|
||||||
* Oct 12, 2012 DR 15418 D. Friedman Use clustered TransmittedProductList
|
* Oct 12, 2012 DR 15418 D. Friedman Use clustered TransmittedProductList
|
||||||
* Jun 07, 2013 1981 mpduff This is now a priviledged request handler.
|
* Jun 07, 2013 1981 mpduff This is now a priviledged request handler.
|
||||||
|
# Nov 20, 2013 DR 16777 D. Friedman Add a test mode.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -76,6 +77,10 @@ public class OUPHandler extends AbstractPrivilegedRequestHandler<OUPRequest> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public OUPResponse handleRequest(OUPRequest request) throws Exception {
|
public OUPResponse handleRequest(OUPRequest request) throws Exception {
|
||||||
|
return handleOUPRequest(request, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public OUPResponse handleOUPRequest(OUPRequest request, boolean test) throws Exception {
|
||||||
OfficialUserProduct oup = request.getProduct();
|
OfficialUserProduct oup = request.getProduct();
|
||||||
OUPResponse resp = new OUPResponse();
|
OUPResponse resp = new OUPResponse();
|
||||||
boolean changedBbb = false;
|
boolean changedBbb = false;
|
||||||
|
@ -85,7 +90,7 @@ public class OUPHandler extends AbstractPrivilegedRequestHandler<OUPRequest> {
|
||||||
request = ModifyProduct.addWmoHeader(request);
|
request = ModifyProduct.addWmoHeader(request);
|
||||||
}
|
}
|
||||||
TransProdHeader header = ModifyProduct.getProductHeader(oup);
|
TransProdHeader header = ModifyProduct.getProductHeader(oup);
|
||||||
if (request.isCheckBBB()) {
|
if (request.isCheckBBB() && ! test) {
|
||||||
changedBbb = ModifyProduct.checkBBBField(oup, header);
|
changedBbb = ModifyProduct.checkBBBField(oup, header);
|
||||||
if (changedBbb) {
|
if (changedBbb) {
|
||||||
resp.setChangedBBB(request.getProduct().getWmoType());
|
resp.setChangedBBB(request.getProduct().getWmoType());
|
||||||
|
@ -104,6 +109,7 @@ public class OUPHandler extends AbstractPrivilegedRequestHandler<OUPRequest> {
|
||||||
args.put("afosID", header.getProductId());
|
args.put("afosID", header.getProductId());
|
||||||
args.put("resp", resp);
|
args.put("resp", resp);
|
||||||
args.put("ackMgr", ackManager);
|
args.put("ackMgr", ackManager);
|
||||||
|
args.put("test", test);
|
||||||
resp.setAttempted(true);
|
resp.setAttempted(true);
|
||||||
py.execute("process", args);
|
py.execute("process", args);
|
||||||
} catch (JepException e) {
|
} catch (JepException e) {
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
package com.raytheon.uf.edex.dissemination;
|
||||||
|
|
||||||
|
import com.raytheon.uf.common.auth.exception.AuthorizationException;
|
||||||
|
import com.raytheon.uf.common.auth.user.IUser;
|
||||||
|
import com.raytheon.uf.common.dissemination.OUPTestRequest;
|
||||||
|
import com.raytheon.uf.edex.auth.req.AbstractPrivilegedRequestHandler;
|
||||||
|
import com.raytheon.uf.edex.auth.resp.AuthorizationResponse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if an OUPRequest will work
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
*
|
||||||
|
* SOFTWARE HISTORY
|
||||||
|
* Date Ticket# Engineer Description
|
||||||
|
* ------------ ---------- ----------- --------------------------
|
||||||
|
* Nov 20, 2013 DR 16777 D. Friedman Initial creation
|
||||||
|
*
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class OUPTestHandler extends AbstractPrivilegedRequestHandler<OUPTestRequest> {
|
||||||
|
|
||||||
|
private OUPHandler oupHandler;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object handleRequest(OUPTestRequest request) throws Exception {
|
||||||
|
return oupHandler.handleOUPRequest(request.getOupRequest(), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AuthorizationResponse authorized(IUser user,
|
||||||
|
OUPTestRequest request) throws AuthorizationException {
|
||||||
|
return oupHandler.authorized(user, request.getOupRequest());
|
||||||
|
}
|
||||||
|
|
||||||
|
public OUPHandler getOupHandler() {
|
||||||
|
return oupHandler;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOupHandler(OUPHandler oupHandler) {
|
||||||
|
this.oupHandler = oupHandler;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -34,6 +34,7 @@
|
||||||
# 04/13/12 DR 10388 D. Friedman Correct acknowledgment handling
|
# 04/13/12 DR 10388 D. Friedman Correct acknowledgment handling
|
||||||
# 08/17/12 DR 15304 D. Friedman Use unique output file names
|
# 08/17/12 DR 15304 D. Friedman Use unique output file names
|
||||||
# 10/12/12 DR 15418 D. Friedman Use unique attachment file names
|
# 10/12/12 DR 15418 D. Friedman Use unique attachment file names
|
||||||
|
# 11/20/13 DR 16777 D. Friedman Add a test mode.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -71,7 +72,7 @@ INGEST_DIR = dataDir + 'manual'
|
||||||
INGEST_ROUTE = 'handleoupFilePush'
|
INGEST_ROUTE = 'handleoupFilePush'
|
||||||
SITE_ID = env.getEnvValue('SITENAME')
|
SITE_ID = env.getEnvValue('SITENAME')
|
||||||
|
|
||||||
def process(oup, afosID, resp, ackMgr = None):
|
def process(oup, afosID, resp, ackMgr = None, test = False):
|
||||||
_Logger.info("handleOUP.py received " + str(oup.getFilename()))
|
_Logger.info("handleOUP.py received " + str(oup.getFilename()))
|
||||||
wmoTypeString = ""
|
wmoTypeString = ""
|
||||||
userDateTimeStamp = ""
|
userDateTimeStamp = ""
|
||||||
|
@ -137,7 +138,7 @@ def process(oup, afosID, resp, ackMgr = None):
|
||||||
_Logger.debug(msg)
|
_Logger.debug(msg)
|
||||||
resp.setMessage(msg)
|
resp.setMessage(msg)
|
||||||
return
|
return
|
||||||
else:
|
elif not test:
|
||||||
try:
|
try:
|
||||||
from com.raytheon.uf.edex.plugin.manualIngest import MessageGenerator
|
from com.raytheon.uf.edex.plugin.manualIngest import MessageGenerator
|
||||||
if MessageGenerator.getInstance().sendFileToIngest(awipsPathname, INGEST_ROUTE):
|
if MessageGenerator.getInstance().sendFileToIngest(awipsPathname, INGEST_ROUTE):
|
||||||
|
@ -167,6 +168,21 @@ def process(oup, afosID, resp, ackMgr = None):
|
||||||
fos.flush()
|
fos.flush()
|
||||||
fos.close()
|
fos.close()
|
||||||
|
|
||||||
|
if test:
|
||||||
|
try:
|
||||||
|
os.remove(awipsPathname)
|
||||||
|
except EnvironmentError:
|
||||||
|
pass # ignore
|
||||||
|
if attachedFilename:
|
||||||
|
try:
|
||||||
|
os.remove(attachedFilename)
|
||||||
|
except EnvironmentError:
|
||||||
|
pass # ignore
|
||||||
|
|
||||||
|
resp.setSendLocalSuccess(True)
|
||||||
|
resp.setSendWANSuccess(True)
|
||||||
|
return
|
||||||
|
|
||||||
messageIdToAcknowledge = None
|
messageIdToAcknowledge = None
|
||||||
#----------
|
#----------
|
||||||
# Check if product should be distributed over WAN via NCF
|
# Check if product should be distributed over WAN via NCF
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1 +1 @@
|
||||||
1a32b06c313e625de84f906b3a788e18d5fbf5a4
|
7d5b051039964b49fc7ac2336857ce70d216028f
|
|
@ -1 +1 @@
|
||||||
8fe0a749af6fc67549da23d33fd3d63a094c1466
|
80c11668bbfe3803e0c4919198ed9da9a1a39b1b
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
nativeLib/files.native/edex/lib/native/linux32/library.ohd.ffg.so
Executable file → Normal file
BIN
nativeLib/files.native/edex/lib/native/linux32/library.ohd.ffg.so
Executable file → Normal file
Binary file not shown.
|
@ -1 +1 @@
|
||||||
1a32b06c313e625de84f906b3a788e18d5fbf5a4
|
7d5b051039964b49fc7ac2336857ce70d216028f
|
|
@ -1 +1 @@
|
||||||
8fe0a749af6fc67549da23d33fd3d63a094c1466
|
80c11668bbfe3803e0c4919198ed9da9a1a39b1b
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,25 @@
|
||||||
|
Copyright (c) 2009, Swiss AviationSoftware Ltd. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
- Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
- Neither the name of the Swiss AviationSoftware Ltd. nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from this
|
||||||
|
software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGE.
|
6
pythonPackages/numpy/numpy/core/numeric.py
Executable file → Normal file
6
pythonPackages/numpy/numpy/core/numeric.py
Executable file → Normal file
|
@ -1493,8 +1493,10 @@ def set_string_function(f, repr=True):
|
||||||
else:
|
else:
|
||||||
return multiarray.set_string_function(f, repr)
|
return multiarray.set_string_function(f, repr)
|
||||||
|
|
||||||
set_string_function(array_str, 0)
|
# randerso DR #2513 remove calls to non-threadsafe set_string_function
|
||||||
set_string_function(array_repr, 1)
|
# https://github.com/numpy/numpy/issues/3961
|
||||||
|
# set_string_function(array_str, 0)
|
||||||
|
# set_string_function(array_repr, 1)
|
||||||
|
|
||||||
little_endian = (sys.byteorder == 'little')
|
little_endian = (sys.byteorder == 'little')
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -402,6 +402,7 @@ if [ "${1}" = "-viz" ]; then
|
||||||
#buildRPM "awips2-python-dynamicserialize"
|
#buildRPM "awips2-python-dynamicserialize"
|
||||||
buildRPM "awips2-gfesuite-client"
|
buildRPM "awips2-gfesuite-client"
|
||||||
buildRPM "awips2-gfesuite-server"
|
buildRPM "awips2-gfesuite-server"
|
||||||
|
buildRPM "awips2-python-numpy"
|
||||||
#buildRPM "awips2-python"
|
#buildRPM "awips2-python"
|
||||||
#buildRPM "awips2-adapt-native"
|
#buildRPM "awips2-adapt-native"
|
||||||
#unpackHttpdPypies
|
#unpackHttpdPypies
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
Name: awips2-python-numpy
|
Name: awips2-python-numpy
|
||||||
Summary: AWIPS II Python numpy Distribution
|
Summary: AWIPS II Python numpy Distribution
|
||||||
Version: 1.5.0
|
Version: 1.5.0
|
||||||
Release: 3.el6
|
Release: 3.el6.p1
|
||||||
Group: AWIPSII
|
Group: AWIPSII
|
||||||
BuildRoot: %{_build_root}
|
BuildRoot: %{_build_root}
|
||||||
BuildArch: %{_build_arch}
|
BuildArch: %{_build_arch}
|
||||||
|
|
Loading…
Add table
Reference in a new issue