12.11.1-2 baseline

Change-Id: I1c6018b226a4dba788f50edff8801aa33939a83b

Former-commit-id: da126f587a1e3761dbe16ee2a41aee0caba85bfc
This commit is contained in:
Steve Harris 2012-10-08 13:26:20 -05:00
parent 618aa3f316
commit c12ee14e66
21 changed files with 228 additions and 123 deletions

View file

@ -796,7 +796,7 @@ class SmartScript(BaseTool.BaseTool):
if "A" == status:
importance = Priority.PROBLEM
elif "R" == status:
importance = Priority.EVENTB
importance = Priority.EVENTA
elif "U" == status:
importance = Priority.CRITICAL
else:

View file

@ -129,6 +129,8 @@ public class LocalizationManager implements IPropertyChangeListener {
/** The current localization site */
private String currentSite;
private boolean nationalCenter;
private boolean overrideSite;
@ -392,6 +394,12 @@ public class LocalizationManager implements IPropertyChangeListener {
.getString("-site").toUpperCase();
this.overrideSite = true;
}
this.nationalCenter = false;
if (ProgramArguments.getInstance().getString("-nc") != null) {
this.nationalCenter = true;
}
}
private void checkForServerOverride() {
@ -946,4 +954,8 @@ public class LocalizationManager implements IPropertyChangeListener {
public boolean isOverrideSite() {
return overrideSite;
}
public boolean isNationalCenter() {
return nationalCenter;
}
}

View file

@ -23,7 +23,7 @@ Table of Contents<br>
<p><br>
<tt>cave.sh [-server hostname:port/services] [-mode TEST|PRACTICE|OPERATIONAL] [-site xxx]
[-u user] [-component componentName] [-perspective perspecitiveName] [-noredirect]
[-consoleLog]<br>
[-consoleLog] [-nc TRUE]<br>
<br>
<table nosave="" border="1" width="100%">
<tbody>
@ -77,6 +77,15 @@ Table of Contents<br>
<td>Causes the CAVE log to be output to the console for monitoring/debugging.
</td>
</tr>
<tr>
<td>-nc</td>
<td>YES</td>
<td>This option is only used by Service backup. It is used to indicate that the site is
a national center, consequently a non-primary site gets special permission to export
site configuration to the central server via the Service Backup GUI. This option should
be set to 'true', i.e., -nc true.
</td>
</tr>
</tbody>
</table>
</p>

View file

@ -159,8 +159,9 @@ This item keyboard shortcuts. You are allowed up to 200
shortcuts.&nbsp;
IMPORTANT:&nbsp; You should test your shortcuts on your system as many
keys are already bound by the system.&nbsp; For example, F10 is bound
by
some Tk widgets to bring up menus.
by some Tk widgets to bring up menus. Please note that AWIPS2 replaces
the KP_ syntax with the NUMPAD_ syntax, i.e. KP_Add in AWIPS1 becomes
NUMPAD_ADD in AWIPS2.
<p>Each shortcut is defined by a list with entries: </p>
<blockquote><li>Shortcut key</li>
<li>State of ShortCut key</li>
@ -198,10 +199,10 @@ Examples:
<p><b><tt>ShortCut1 = ["F1", "None",
"SmartTool","Assign_Value"]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# F1</tt></b> <br>
<b><tt>ShortCut2 = ["KP_Subtract", "None",
<b><tt>ShortCut2 = ["NUMPAD_SUBTRACT", "None",
"SmartTool","AdjustValue_Down"]
# Keypad -</tt></b> <br>
<b><tt>ShortCut3 = ["KP_Add", "None",
<b><tt>ShortCut3 = ["NUMPAD_ADD", "None",
"SmartTool","AdjustValue_Up"]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# Keypad +</tt></b> <br>
<b><tt>ShortCut4 = ["F2", "None", "SmartTool","Smooth"]</tt></b> <br>

View file

@ -116,7 +116,7 @@ public class VCParm extends VParm implements IParmListChangedListener,
Activator
.getDefault()
.getLog()
.log(new Status(IStatus.WARNING, Activator.PLUGIN_ID,
.log(new Status(IStatus.INFO, Activator.PLUGIN_ID,
"Can't get GPI: " + this.mod.getErrorString()));
}
@ -470,7 +470,7 @@ public class VCParm extends VParm implements IParmListChangedListener,
Activator
.getDefault()
.getLog()
.log(new Status(IStatus.WARNING, Activator.PLUGIN_ID,
.log(new Status(IStatus.INFO, Activator.PLUGIN_ID,
"Error getting dependent WeatherElements: " + this.mod.getErrorString()));
}

View file

@ -56,7 +56,8 @@ import com.raytheon.viz.gfe.textformatter.TextProductManager;
* 2 SEP 2011 10654 gzhou Delete running/pending task and close tab.
* 23 MAY 2012 14859 ryu Select VTEC formatting in practice mode
* based on VTECMessageType setting.
* 10 AUG 2012 15178 mli Add autoWrite and autoStore capability
* 10 AUG 2012 15178 mli Add autoWrite and autoStore capability
* 26 SEP 2012 15423 ryu Fix product correction in practice mode
*
* </pre>
*
@ -432,8 +433,11 @@ public class ProductAreaComp extends Composite implements
int pracType = 0;
if (practiceMode) {
String pil = (String) textProductMgr.getProductDefinition(productName)
.get("pil");
String pil = null;
if (textProductMgr.getProductDefinition(productName) != null) {
pil = (String) textProductMgr.getProductDefinition(productName)
.get("pil");
}
if (pil != null) {
String vtecMode = textProductMgr.getVtecMessageType(
pil.substring(0, 3));
@ -643,7 +647,7 @@ public class ProductAreaComp extends Composite implements
if (productText != null) {
productEditorComp.retrieveActiveVTEC();
productEditorComp.setProductText(productText);
// handle autoWrite and autoStore...
productEditorComp.doAutoStuff();
}

View file

@ -1,19 +1,19 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
@ -67,7 +67,7 @@ import com.raytheon.viz.gfe.textformatter.TextFmtParserUtil;
/**
* Composite containing the product editor.
*
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
@ -75,12 +75,13 @@ import com.raytheon.viz.gfe.textformatter.TextFmtParserUtil;
* 05 Jan 2008 1784 lvenable Initial creation
* 19 Feb 2010 4132 ryu Product correction.
* 30 Jul 2010 6719 jnjanga Placed cursor at the end of inserted CTA
*
* 26 Sep 2012 15423 ryu Avoid resetting text when possible.
*
* </pre>
*
*
* @author lvenable
* @version 1.0
*
*
*/
public class StyledTextComp extends Composite {
private static final transient IUFStatusHandler statusHandler = UFStatus
@ -179,7 +180,7 @@ public class StyledTextComp extends Composite {
/**
* Constructor.
*
*
* @param parent
* Parent composite.
*/
@ -297,7 +298,7 @@ public class StyledTextComp extends Composite {
/**
* Get the StyledText editor.
*
*
* @return The StyledText editor.
*/
public StyledText getTextEditorST() {
@ -306,7 +307,7 @@ public class StyledTextComp extends Composite {
/**
* Set the product text.
*
*
* @param text
* The product text.
*/
@ -324,7 +325,7 @@ public class StyledTextComp extends Composite {
/**
* computes the logical caret offset within the ProductEditor as a result of
* the CTA insert.
*
*
* @param newProductText
* The new product text
*/
@ -483,7 +484,7 @@ public class StyledTextComp extends Composite {
/**
* Parse the product text string.
*
*
* @param productText
*/
private void parseProductText(String productText) {
@ -669,7 +670,7 @@ public class StyledTextComp extends Composite {
/**
* Handle the verify key event. This event fires after a change has been
* made to the control (after the text has been updated, for example)
*
*
* @param event
* Verify event that was fired.
*/
@ -765,7 +766,7 @@ public class StyledTextComp extends Composite {
/**
* Handle the key event when a key is released.
*
*
* @param ke
* Key event.
*/
@ -787,7 +788,7 @@ public class StyledTextComp extends Composite {
/**
* Check if there is selected text and if there is locked text in the
* selected text.
*
*
* @return True if there is selected text that contains locked text.
*/
private boolean selectionHasLockedText() {
@ -801,12 +802,12 @@ public class StyledTextComp extends Composite {
/**
* Check if there is locked text in the specified range of text.
*
*
* @param offset
* The starting point of the locked text search.
* @param length
* The length of the search.
*
*
* @return Whether or not there is text in the range that contains locked
* text.
*/
@ -824,7 +825,7 @@ public class StyledTextComp extends Composite {
/**
* Select the framing code and the text contained in the framing code.
*
*
* @param sr
* StyleRange.
*/
@ -836,7 +837,7 @@ public class StyledTextComp extends Composite {
/**
* Check if the key being pressed is a "non-edit" key.
*
*
* @param event
* Verify event.
* @return True if the key is an arrow or "non-edit" key.
@ -870,7 +871,7 @@ public class StyledTextComp extends Composite {
/**
* Handle the mouse down event.
*
*
* @param e
* Event fired.
*/
@ -905,7 +906,7 @@ public class StyledTextComp extends Composite {
/**
* Handle the mouse up event
*
*
* @param e
* Event fired.
*/
@ -1012,7 +1013,7 @@ public class StyledTextComp extends Composite {
/**
* Checks if the system is editing, e.g. updating the issue time every
* minute, vs a user typing text in the text area
*
*
* @return
*/
private boolean isSystemTextChange() {
@ -1036,7 +1037,18 @@ public class StyledTextComp extends Composite {
dirty = false;
}
protected boolean isUpperCase(final String word) {
for (int index= word.length() - 1; index >= 0; index--) {
if (Character.isLowerCase(word.charAt(index)))
return false;
}
return true;
}
protected void upper() {
String text = textEditorST.getText();
if (isUpperCase(text))
return;
int topIdx = textEditorST.getTopIndex();
setProductText(textEditorST.getText().toUpperCase());
textEditorST.setTopIndex(topIdx);
@ -1152,7 +1164,7 @@ public class StyledTextComp extends Composite {
/**
* Getter for the column at which wrap and auto-wrap will wrap the text.
*
*
* @return the column number
*/
public int getWrapColumn() {
@ -1161,7 +1173,7 @@ public class StyledTextComp extends Composite {
/**
* Getter for the column at which wrap and auto-wrap will wrap the text.
*
*
* @param wrapColumn
* the column number
*/
@ -1200,7 +1212,7 @@ public class StyledTextComp extends Composite {
/**
* Query the prefs for setting. If it does not exist, use colorDft as its
* value. Create an SWT Color for display from the value and return it.
*
*
* @param prefs
* A preference store which might have config values.
* @param display
@ -1223,7 +1235,7 @@ public class StyledTextComp extends Composite {
/**
* Send a PROBLEM message if color1 is exactly equal to color2.
*
*
* @param color1
* the first color
* @param color2
@ -1250,7 +1262,7 @@ public class StyledTextComp extends Composite {
* <p>
* The getter name is different to avoid confusion with the getFgColor()
* method of Control.
*
*
* @return the foreground Color
*/
public Color getFgndColor() {
@ -1261,7 +1273,7 @@ public class StyledTextComp extends Composite {
* Get the framed text color of the StyledTextComp. This is the actual
* color, not a copy. It will be disposed when the StyledTextComp is, and
* should not be disposed before then.
*
*
* @return the frameColor
*/
public Color getFrameColor() {
@ -1272,7 +1284,7 @@ public class StyledTextComp extends Composite {
* Get the insert color of the StyledTextComp. This is the actual color, not
* a copy. It will be disposed when the StyledTextComp is, and should not be
* disposed before then.
*
*
* @return the insertColor
*/
public Color getInsertColor() {
@ -1283,7 +1295,7 @@ public class StyledTextComp extends Composite {
* Get the locked text color of the StyledTextComp. This is the actual
* color, not a copy. It will be disposed when the StyledTextComp is, and
* should not be disposed before then.
*
*
* @return the lockColor
*/
public Color getLockColor() {
@ -1293,7 +1305,7 @@ public class StyledTextComp extends Composite {
/**
* Word wrap the text in the block around cursorIndex. Adjust the cursor
* position to account for inserted or deleted whitespace.
*
*
* @param st
* The StyledText in which word wrap is to be performed
* @param cursorIndex

View file

@ -1198,7 +1198,7 @@ public class ServiceBackupDlg extends CaveJFACEDialog {
+ UserController.getUserObject().uniqueId());
}
if (!runningAsPrimary) {
if ((!runningAsPrimary) && (!LocalizationManager.getInstance().isNationalCenter())) {
doExCon.setEnabled(false);
}
}

View file

@ -29,6 +29,7 @@ import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.TimeZone;
@ -226,6 +227,8 @@ public class MakeHazardDialog extends CaveSWTDialog implements
private boolean running;
private org.eclipse.swt.widgets.List hazardGroupList;
public MakeHazardDialog(Shell parent, DataManager dataManager,
String colorName, int defaultMapWidth, int timeScaleEndTime,
float areaThreshold, String defaultHazardType,
@ -1014,9 +1017,8 @@ public class MakeHazardDialog extends CaveSWTDialog implements
}
};
org.eclipse.swt.widgets.List hazardGroupList = new org.eclipse.swt.widgets.List(
hazardTypeGroup, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL
| SWT.SINGLE);
hazardGroupList = new org.eclipse.swt.widgets.List(hazardTypeGroup,
SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.SINGLE);
gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
gd.heightHint = hazardGroupList.getItemHeight() * 12
+ hazardGroupList.getBorderWidth();
@ -1334,6 +1336,7 @@ public class MakeHazardDialog extends CaveSWTDialog implements
* the hazard type to select.
*/
public void setHazardType(String hazardType) {
hazardGroupList.setSelection(hazardGroupList.indexOf(hazardType));
updateSelectedHazardList(hazardType);
if (this.localEffectAreas.containsKey(hazardType)) {
@ -1362,7 +1365,14 @@ public class MakeHazardDialog extends CaveSWTDialog implements
leGroup.setVisible(false);
((GridData) leGroup.getLayoutData()).exclude = true;
this.hazLocalEffect = "None";
this.etnSegNumberField.setText("");
String s = etnSegNumberField.getText();
for (Entry<String, List<Object>> entry : localAreaData.entrySet()) {
if (s.equals(entry.getValue().get(0))) {
this.etnSegNumberField.setText("");
this.etnSegNumberField.setSelection(0);
break;
}
}
}
}
@ -1391,9 +1401,9 @@ public class MakeHazardDialog extends CaveSWTDialog implements
}
}
private void hazardLocalEffectSelected(String s) {
this.hazLocalEffect = s;
List<Object> laData = this.localAreaData.get(s);
private void hazardLocalEffectSelected(String le) {
this.hazLocalEffect = le;
List<Object> laData = this.localAreaData.get(le);
if (laData != null) {
// get the segment number
Integer segment = (Integer) laData.get(0);
@ -1403,8 +1413,15 @@ public class MakeHazardDialog extends CaveSWTDialog implements
this.etnSegNumberField.setSelection(segText.length());
} else {
this.etnSegNumberField.setText("");
this.etnSegNumberField.setSelection(0);
String s = etnSegNumberField.getText();
for (Entry<String, List<Object>> entry : localAreaData
.entrySet()) {
if (s.equals(entry.getValue().get(0))) {
this.etnSegNumberField.setText("");
this.etnSegNumberField.setSelection(0);
break;
}
}
}
@SuppressWarnings("unchecked")

View file

@ -115,7 +115,9 @@ import com.raytheon.viz.hydrocommon.util.StnClassSyncUtil;
* 23 Jul 2012 15195 mpduff Fix Group graphing to use the date widgets.
* 08 Aug 2012 570 mpduff Fix a Ctrl-F in Station list causing IndexOutOfBounds error.
* 08 Aug 2012 657 mpduff Fix error when selecting a TS while no selection has been made
* in the Station List.
* in the Station List.
* 27 Sep 2012 15302 wkwock TimeSeries start mode should depends on token timeseries_mode
* despite start up in CAVE or standalone.
* </pre>
*
* @author lvenable
@ -675,10 +677,6 @@ public class TimeSeriesDlg extends CaveHydroSWTDialog {
openTimeSeriesDisplays = false;
}
if (this.standaloneMode) {
this.updateInterfaceForStandalone();
}
AbstractVizResource<?,?> rsc = HydroDisplayManager.getInstance().getDisplayedResource();
if (rsc instanceof MultiPointResource) {
((MultiPointResource) rsc).setTs(this);
@ -2281,20 +2279,6 @@ public class TimeSeriesDlg extends CaveHydroSWTDialog {
}
}
/**
* Change the selected mode to group selection mode and display the groups
* in the user-defined group configuration file.
*/
private void updateInterfaceForStandalone() {
this.modeCbo.select(0);
this.prevModeIdx = 0;
stackLayout.topControl = groupGroup;
stackComp.layout();
stnLayoutDisplayed = false;
this.populateGroupListForStandalone();
}
/**
* Validate the user's selections.
*

View file

@ -50,6 +50,7 @@ import com.raytheon.viz.hydrocommon.HydroConstants;
* Nov 4, 2008 1662 grichard Initial creation.
* 11/19/2008 1662 grichard Updated loadPeRaw.
* 11/24/2008 1662 grichard Added utility methods for raw precip.
* 09/26/2012 15385 lbousaidi fixed duplicate entries in gage table.
* </pre>
*
* @author grichard
@ -188,8 +189,8 @@ public final class PrecipUtil {
*/
public static final String SUM_PC_REPORTS = "sum_pc_reports";
static {
sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
static {
sdf = new SimpleDateFormat("yyyy-MM-dd");
sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
}
@ -1553,10 +1554,18 @@ public final class PrecipUtil {
Calendar pTm = null;
pTm = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
pTm.setTime(query_begin_time);
if (pTm.get(Calendar.HOUR_OF_DAY) == 0) {
pTm.add(Calendar.HOUR_OF_DAY, -1);
pTm.add(Calendar.DAY_OF_MONTH, -1);
}
/* Need to convert the query begin and end times into dates. */
String beginstr = sdf.format(pTm.getTime());
pTm.setTime(query_end_time);
if (pTm.get(Calendar.HOUR_OF_DAY) == 0) {
pTm.add(Calendar.DAY_OF_MONTH, -1);
}
String endstr = sdf.format(pTm.getTime());
/* consider according to whether type-source specified. */
/* load data which is not missing value (-9999.0) */
@ -1572,15 +1581,12 @@ public final class PrecipUtil {
where.append(" AND ");
}
/* Need to convert the query begin and end times into dates. */
String beginstr = sdf.format(pTm.getTime());
String endstr = sdf.format(query_end_time);
where.append("id.obsdate between '");
where.append(beginstr);
where.append("' AND '");
where.append(endstr);
where.append("' ORDER BY id.lid ASC, id.ts ASC, id.obsdate ASC");
where.append("' ORDER BY id.lid ASC, id.ts ASC, id.obsdate ASC");
return where.toString();
}

View file

@ -108,7 +108,7 @@ public class CombinationsFileMaker {
String definitionDir = pathMgr
.getLocalizationFile(caveStaticConfig,
GfePyIncludeUtil.TEXT_PRODUCTS).getFile().getPath();
GfePyIncludeUtil.REGULAR).getFile().getPath();
File outputDirFile = pathMgr.getLocalizationFile(caveStaticConfig,
FileUtil.join("gfe", "combinations")).getFile();
outputDirFile.mkdir();

View file

@ -1529,7 +1529,7 @@ def executeIfpNetCDF(host, port, outputFilename, parmList, databaseID, startTime
we = db.getItem(p)
#determine inventory that we want to keep
weInv = determineSamplingValues(samplingDef, p, we.getKeys(), start)
weInv = determineSamplingValues(samplingDef, p, we.getKeys(), time.time())
gridType = str(we.getGpi().getGridType())
if gridType == "SCALAR":

View file

@ -1090,7 +1090,7 @@ class ReportWriter {
*/
private void flushDataLimitsObj(Datalimits limits) {
try {
Class cls = Class.forName("com.raytheon.edex.plugin.shef.objects.Datalimits");
Class cls = Class.forName("com.raytheon.uf.common.dataplugin.shef.tables.Datalimits");
Method methodlist[]= cls.getDeclaredMethods();
for(Method method : methodlist) {
if((method.getName().startsWith("set") && !method.getName().contains("Id"))

View file

@ -2,4 +2,4 @@ source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
res/spring/rpgenvdata-request.xml
res/

View file

@ -42,7 +42,7 @@ import com.raytheon.uf.common.status.UFStatus;
* ------------ ---------- ----------- --------------------------
* 03/31/11 5489 D. Hladky Initial release
* 07/31/12 578 D.Hladky finished it
*
* 09/27/12 DR 15471 G.Zhang Fixed ConcurrentModificationException
* </pre>
*
* @author dhladky
@ -54,8 +54,10 @@ public class FFMPDataContainer {
private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(FFMPDataContainer.class);
private HashMap<String, FFMPBasinData> basinDataMap = new HashMap<String, FFMPBasinData>();
private java.util.concurrent.ConcurrentHashMap<String, FFMPBasinData> basinDataMap
= new java.util.concurrent.ConcurrentHashMap<String, FFMPBasinData>();//DR 15471
//private HashMap<String, FFMPBasinData> basinDataMap = new HashMap<String, FFMPBasinData>();
private String sourceName = null;
private String filePath = null;

View file

@ -24,6 +24,7 @@ XML_TEMPLATE = ""
import sys
import os.path
import shutil
class MainData:
def __init__(self, file=None, prefix=None, descriptiveName=None, server='localhost:9581/services'):
@ -89,6 +90,15 @@ if name is None:
print 'Parsing file,', file
fileName = os.path.split(file)[1]
if fileName == "spotters.dat":
workFile = "/tmp/spotters.dat"
shutil.copy(file, workFile)
os.system("sed -i -e 's/spotterName/spottersName/g' /tmp/spotters.dat")
os.system("sed -i -e 's/spotterAddr/spottersAddr/g' /tmp/spotters.dat")
os.system("sed -i -e 's/spotterCity/spottersCity/g' /tmp/spotters.dat")
os.system("sed -i -e 's/spotterPhone/spottersPhone/g' /tmp/spotters.dat")
file = workFile
if exportFileName is None:
exportFileName = fileName
idx = exportFileName.rfind('.')
@ -108,4 +118,7 @@ request.setFileContents(open(file,"r").read())
client.sendRequest(request)
if fileName == "spotters.dat":
os.system("rm /tmp/spotters.dat")
print 'plots uploaded to server'

View file

@ -101,6 +101,8 @@ perform_export() {
# For this, we'll read from a flat file in ${IFPS_DATA} that will contain list of element a site wants to include.
# We'll also check if the site has $SVCBU_TRIM_ELEMS variable set to 1. We will only do wx element trimming if this variable is set to 1.
# Otherwise, we'll continue to send all grids.
NETCDF_SUCCESS=1
if [ "${SVCBU_TRIM_ELEMS}" != "" -a "${SVCBU_TRIM_ELEMS}" = "1" ]
then
# Check if we have the file that has list of elements to trim for.
@ -119,7 +121,11 @@ perform_export() {
$LOGGER "ifpnetCDF failed. Export exits."
rm -f ${lockFile}
$LOGGER 100
exit 1
NETCDF_SUCCESS=0
if [ $NATIONAL_CENTER != 1 ] && [ "$1" != "-c" ]
then
exit 1
fi
fi
else
$LOGGER "export_grids was not able to find ${IFPS_DATA}/svcbu_export_elements.${SITE} file."
@ -133,7 +139,11 @@ perform_export() {
$LOGGER "ifpnetCDF failed. Export exits."
rm -f ${lockFile}
$LOGGER 100
exit 1
NETCDF_SUCCESS=0
if [ $NATIONAL_CENTER != 1 ] && [ "$1" != "-c" ]
then
exit 1
fi
fi
fi
else
@ -146,12 +156,19 @@ perform_export() {
$LOGGER ifpnetCDF failed.
rm -f ${lockFile}
$LOGGER 100
exit 1
NETCDF_SUCCESS=0
if [ $NATIONAL_CENTER != 1 ] && [ "$1" != "-c" ]
then
exit 1
fi
fi
fi
$LOGGER "Copying ${NETCDF_TMP_PATH}/${SITE}Grd.netcdf to ${NETCDF_PATH}/${SITE}Grd.netcdf"
cp ${NETCDF_TMP_PATH}/${SITE}Grd.netcdf ${NETCDF_PATH}/${SITE}Grd.netcdf
if [ $NETCDF_SUCCESS = 1 ]
then
$LOGGER "Copying ${NETCDF_TMP_PATH}/${SITE}Grd.netcdf to ${NETCDF_PATH}/${SITE}Grd.netcdf"
cp ${NETCDF_TMP_PATH}/${SITE}Grd.netcdf ${NETCDF_PATH}/${SITE}Grd.netcdf
fi
if [ -f ${NETCDF_TMP_PATH}/${SITE}Grd.netcdf ]
then
@ -173,15 +190,17 @@ elif [ $EXPORT_GRID = 2 ] && [ "$1" = "-c" ]
then
log_msg "export_grids cron disabled"
exit 1
elif [ $EXPORT_GRID = 1 ] && [ $NATIONAL_CENTER = 1 ] # DR14464 changes - loop through active sites
elif [ $NATIONAL_CENTER = 1 ] && [ "$1" = "-c" ] # DR14464 changes - loop through active sites
then
log_msg "You are configured as a national center. Will use active sites list for site id generation."
work_site=`echo ${2} | tr [a-z] [A-Z]`
site_list=( `cat $LOCALIZATION_PATH/edex_static/site/$work_site/config/activeSites.txt` )
log_msg "You are configured as $AW_SITE_IDENTIFIER. Will use activeSites.txt for site id info."
site_list=( `cat $LOCALIZATION_PATH/edex_static/site/$AW_SITE_IDENTIFIER/config/activeSites.txt` )
for site in "${site_list[@]}"
do
log_msg "Processing $site"
perform_export ${site}
if [ $site != $AW_SITE_IDENTIFIER ]
then
log_msg "Processing $site"
perform_export ${site}
fi
done
else # this processes non-national centers the old way using AW_SITE_IDENTIFIER if run by cron
log_msg "Processing $2"

View file

@ -20,11 +20,11 @@
from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.gfe.request import GetOfficialDbNameRequest
from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.gfe.request import GetLockTablesRequest
from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.gfe.request import GetActiveSitesRequest
from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.gfe.request import LockChangeRequest
from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.gfe.server.request import LockTableRequest
from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.gfe.server.request import LockRequest
from dynamicserialize.dstypes.com.raytheon.uf.common.dataplugin.gfe.db.objects import DatabaseID
from dynamicserialize.dstypes.com.raytheon.uf.common.site.requests import GetActiveSitesRequest
from dynamicserialize.dstypes.com.raytheon.uf.common.time import TimeRange
from dynamicserialize.dstypes.com.raytheon.uf.common.message import WsId
from dynamicserialize import DynamicSerializationManager
@ -106,21 +106,23 @@ def logError(msg):
logging.getLogger("ifpBreakAllLocks.py").error(msg)
def validateSiteId(siteId, thriftClient):
sitesResp = thriftClient.sendRequest(GetActiveSitesRequest())
if not sitesResp.isOkay():
logError("Unable to validate siteId")
try:
sites = thriftClient.sendRequest(GetActiveSitesRequest())
except Exception, e:
logError("Unable to validate siteId: \n %s" % str(e))
sys.exit(1)
sites = sitesResp.getPayload()
if not siteId in sites:
logError('Invalid or not installed siteID: "%s"' % siteId)
sys.exit(1)
def findSiteID(thriftClient):
sitesResp = thriftClient.sendRequest(GetActiveSitesRequest())
if not sitesResp.isOkay():
logError("Unable to obtain siteId")
try:
sites = thriftClient.sendRequest(GetActiveSitesRequest())
except Exception, e:
logError("Unable to obtain siteId: \n %s" % str(e))
sys.exit(1)
sites = sitesResp.getPayload()
if len(sites) > 1 :
s = []
while len(sites) > 0 : s.append(sites.pop())
@ -243,4 +245,4 @@ def getOfficialDbNamesRequest(siteID):
if __name__ == '__main__':
main()

View file

@ -56,7 +56,6 @@
<packagereq type="default">awips2-data.gfe</packagereq>
<packagereq type="default">awips2-aviation-shared</packagereq>
<packagereq type="default">awips2-python-cherrypy</packagereq>
<packagereq type="default">awips2-python-dynamicserialize</packagereq>
<packagereq type="default">awips2-python-h5py</packagereq>
<packagereq type="default">awips2-python-matplotlib</packagereq>
@ -75,11 +74,13 @@
<packagereq type="default">awips2-python-werkzeug</packagereq>
<packagereq type="default">awips2-python-pygtk</packagereq>
<packagereq type="default">awips2-python-pycairo</packagereq>
<packagereq type="default">netcdf</packagereq>
<packagereq type="default">netcdf-devel</packagereq>
<packagereq type="default">netcdf-AWIPS</packagereq>
<packagereq type="default">awips2-localapps-environment</packagereq>
<packagereq type="default">awips2-data.gfe</packagereq>
</packagelist>
</group>
<group>
<id>awips2-wes2bridge</id>
<name>AWIPS II Wes2Bridge</name>
@ -116,7 +117,6 @@
<packagereq type="default">awips2-data.hdf5-gfe.climo</packagereq>
<packagereq type="default">awips2-aviation-shared</packagereq>
<packagereq type="default">awips2-python-cherrypy</packagereq>
<packagereq type="default">awips2-python-dynamicserialize</packagereq>
<packagereq type="default">awips2-python-h5py</packagereq>
<packagereq type="default">awips2-python-matplotlib</packagereq>
@ -152,6 +152,7 @@
<packagereq type="default">awips2-psql</packagereq>
<packagereq type="default">awips2-cave</packagereq>
<packagereq type="default">awips2-cave-etc</packagereq>
<packagereq type="default">awips2-cave-viz-alertviz-localization</packagereq>
<packagereq type="default">awips2-cave-viz-avnfps</packagereq>
<packagereq type="default">awips2-cave-viz-common-core</packagereq>
<packagereq type="default">awips2-cave-viz-core</packagereq>
@ -185,13 +186,13 @@
<packagereq type="default">awips2-cave-viz-thinclient</packagereq>
<packagereq type="default">awips2-cave-viz-npp</packagereq>
<packagereq type="default">awips2-cave-viz-collaboration</packagereq>
<packagereq type="default">awips2-cave-viz-kml-export</packagereq>
<packagereq type="default">awips2-gfesuite-client</packagereq>
<packagereq type="default">awips2-alertviz</packagereq>
<packagereq type="default">awips2-cli</packagereq>
<packagereq type="default">awips2-notification</packagereq>
<packagereq type="default">awips2-python-cherrypy</packagereq>
<packagereq type="default">awips2-python-dynamicserialize</packagereq>
<packagereq type="default">awips2-python-h5py</packagereq>
<packagereq type="default">awips2-python-matplotlib</packagereq>
@ -210,6 +211,10 @@
<packagereq type="default">awips2-python-werkzeug</packagereq>
<packagereq type="default">awips2-python-pygtk</packagereq>
<packagereq type="default">awips2-python-pycairo</packagereq>
<packagereq type="default">awips2-python-jimporter</packagereq>
<packagereq type="default">netcdf</packagereq>
<packagereq type="default">netcdf-devel</packagereq>
<packagereq type="default">netcdf-AWIPS</packagereq>
<packagereq type="default">awips2-localapps-environment</packagereq>
</packagelist>
</group>
@ -256,7 +261,6 @@
<packagereq type="default">awips2-tools</packagereq>
<packagereq type="default">awips2-aviation-shared</packagereq>
<packagereq type="default">awips2-python-cherrypy</packagereq>
<packagereq type="default">awips2-python-dynamicserialize</packagereq>
<packagereq type="default">awips2-python-h5py</packagereq>
<packagereq type="default">awips2-python-matplotlib</packagereq>
@ -275,6 +279,9 @@
<packagereq type="default">awips2-python-werkzeug</packagereq>
<packagereq type="default">awips2-python-pygtk</packagereq>
<packagereq type="default">awips2-python-pycairo</packagereq>
<packagereq type="default">netcdf</packagereq>
<packagereq type="default">netcdf-devel</packagereq>
<packagereq type="default">netcdf-AWIPS</packagereq>
<packagereq type="default">awips2-localapps-environment</packagereq>
<packagereq type="default">awips2-data.gfe</packagereq>
</packagelist>
@ -304,7 +311,6 @@
<packagereq type="default">awips2-data.hdf5-topo</packagereq>
<packagereq type="default">awips2-data.hdf5-gfe.climo</packagereq>
<packagereq type="default">awips2-python-cherrypy</packagereq>
<packagereq type="default">awips2-python-dynamicserialize</packagereq>
<packagereq type="default">awips2-python-h5py</packagereq>
<packagereq type="default">awips2-python-matplotlib</packagereq>
@ -321,6 +327,9 @@
<packagereq type="default">awips2-python-tpg</packagereq>
<packagereq type="default">awips2-python-ufpy</packagereq>
<packagereq type="default">awips2-python-werkzeug</packagereq>
<packagereq type="default">netcdf</packagereq>
<packagereq type="default">netcdf-devel</packagereq>
<packagereq type="default">netcdf-AWIPS</packagereq>
<packagereq type="default">awips2-localapps-environment</packagereq>
</packagelist>
</group>
@ -344,7 +353,6 @@
<packagereq type="default">awips2-httpd-pypies</packagereq>
<packagereq type="default">awips2-pypies</packagereq>
<packagereq type="default">awips2-python-cherrypy</packagereq>
<packagereq type="default">awips2-python-dynamicserialize</packagereq>
<packagereq type="default">awips2-python-h5py</packagereq>
<packagereq type="default">awips2-python-matplotlib</packagereq>
@ -361,6 +369,9 @@
<packagereq type="default">awips2-python-tpg</packagereq>
<packagereq type="default">awips2-python-ufpy</packagereq>
<packagereq type="default">awips2-python-werkzeug</packagereq>
<packagereq type="default">netcdf</packagereq>
<packagereq type="default">netcdf-devel</packagereq>
<packagereq type="default">netcdf-AWIPS</packagereq>
<packagereq type="default">awips2-localapps-environment</packagereq>
</packagelist>
</group>
@ -379,7 +390,6 @@
<packagereq type="default">awips2-qpid-server</packagereq>
<packagereq type="default">awips2-qpid-server-store</packagereq>
<packagereq type="default">awips2-python-cherrypy</packagereq>
<packagereq type="default">awips2-python-dynamicserialize</packagereq>
<packagereq type="default">awips2-python-h5py</packagereq>
<packagereq type="default">awips2-python-matplotlib</packagereq>
@ -396,6 +406,9 @@
<packagereq type="default">awips2-python-tpg</packagereq>
<packagereq type="default">awips2-python-ufpy</packagereq>
<packagereq type="default">awips2-python-werkzeug</packagereq>
<packagereq type="default">netcdf</packagereq>
<packagereq type="default">netcdf-devel</packagereq>
<packagereq type="default">netcdf-AWIPS</packagereq>
<packagereq type="default">awips2-localapps-environment</packagereq>
</packagelist>
</group>
@ -414,7 +427,6 @@
<packagereq type="default">awips2-ldm</packagereq>
<packagereq type="default">awips2-cli</packagereq>
<packagereq type="default">awips2-python-cherrypy</packagereq>
<packagereq type="default">awips2-python-dynamicserialize</packagereq>
<packagereq type="default">awips2-python-h5py</packagereq>
<packagereq type="default">awips2-python-matplotlib</packagereq>
@ -431,6 +443,9 @@
<packagereq type="default">awips2-python-tpg</packagereq>
<packagereq type="default">awips2-python-ufpy</packagereq>
<packagereq type="default">awips2-python-werkzeug</packagereq>
<packagereq type="default">netcdf</packagereq>
<packagereq type="default">netcdf-devel</packagereq>
<packagereq type="default">netcdf-AWIPS</packagereq>
<packagereq type="default">awips2-localapps-environment</packagereq>
</packagelist>
</group>
@ -451,7 +466,6 @@
<packagereq type="default">awips2-notification</packagereq>
<packagereq type="default">awips2-tools</packagereq>
<packagereq type="default">awips2-python-cherrypy</packagereq>
<packagereq type="default">awips2-python-dynamicserialize</packagereq>
<packagereq type="default">awips2-python-h5py</packagereq>
<packagereq type="default">awips2-python-matplotlib</packagereq>
@ -469,10 +483,14 @@
<packagereq type="default">awips2-python-ufpy</packagereq>
<packagereq type="default">awips2-python-werkzeug</packagereq>
<packagereq type="default">awips2-python-pygtk</packagereq>
<packagereq type="default">awips2-python-pycairo</packagereq>
<packagereq type="default">awips2-python-pycairo</packagereq>
<packagereq type="default">netcdf</packagereq>
<packagereq type="default">netcdf-devel</packagereq>
<packagereq type="default">netcdf-AWIPS</packagereq>
<packagereq type="default">awips2-cave</packagereq>
<packagereq type="default">awips2-cave-etc</packagereq>
<packagereq type="default">awips2-cave-viz-alertviz-localization</packagereq>
<packagereq type="default">awips2-cave-viz-avnfps</packagereq>
<packagereq type="default">awips2-cave-viz-common-core</packagereq>
<packagereq type="default">awips2-cave-viz-core</packagereq>
@ -506,6 +524,7 @@
<packagereq type="default">awips2-cave-viz-thinclient</packagereq>
<packagereq type="default">awips2-cave-viz-npp</packagereq>
<packagereq type="default">awips2-cave-viz-collaboration</packagereq>
<packagereq type="default">awips2-cave-viz-kml-export</packagereq>
<packagereq type="default">awips2-localapps-environment</packagereq>
</packagelist>
</group>

View file

@ -8,7 +8,7 @@
Name: awips2-python-qpid
Summary: AWIPS II Python qpid Distribution
Version: 0.6
Release: 5
Release: 6
Group: AWIPSII
BuildRoot: %{_build_root}
BuildArch: %{_build_arch}
@ -59,6 +59,7 @@ popd > /dev/null
QPID_SRC_DIR="%{_python_pkgs_dir}/qpid"
QPID_SRC="qpid-0.6/python"
QPID_SPECS="qpid-0.6/specs"
QPID_STAT_SCRIPT="qpid-stat"
QPID_QUEUE_COUNT_SCRIPT="qpid-queue-count"
QPID_MONITOR_SCRIPT="monitor_qpid_host.sh"
@ -74,11 +75,15 @@ if [ ${RC} -ne 0 ]; then
fi
popd > /dev/null
# Copy the stats script to bin
cp -v ${QPID_SRC_DIR}/bin/${QPID_STAT_SCRIPT} \
%{_build_root}/awips2/python/bin
# Copy the queue-counting script to bin
cp -v ${QPID_SRC_DIR}/bin/${QPID_QUEUE_COUNT_SCRIPT} \
%{_build_root}/awips2/python/bin
# Copy the queue-counting script to bin
# Copy the monitoring script to bin
cp -v ${QPID_SRC_DIR}/bin/${QPID_MONITOR_SCRIPT} \
%{_build_root}/awips2/python/bin