Merge tag 'OB_16.1.1-5' into omaha_16.1.1
16.1.1-5 Former-commit-id: 7bcf922b873b662168dca03fcd748f93165d7ebc
This commit is contained in:
commit
48e0676376
10 changed files with 73 additions and 15 deletions
|
@ -112,6 +112,7 @@ SWITCHES=()
|
|||
function deleteEclipseConfigurationDir()
|
||||
{
|
||||
if [[ -n $eclipseConfigurationDir ]]; then
|
||||
sleep 2
|
||||
rm -rf "$eclipseConfigurationDir"
|
||||
fi
|
||||
}
|
||||
|
@ -120,7 +121,10 @@ function createEclipseConfigurationDir()
|
|||
{
|
||||
local d dir id=$(hostname)-$(whoami)
|
||||
for d in "/local/cave-eclipse/" "$HOME/.cave-eclipse/"; do
|
||||
if dir=$(mktemp -d -p "$d" "${id}-XXXX"); then
|
||||
if [[ $d == $HOME/* ]]; then
|
||||
mkdir -p "$d" || continue
|
||||
fi
|
||||
if dir=$(mktemp -d --tmpdir="$d" "${id}-XXXX"); then
|
||||
eclipseConfigurationDir=$dir
|
||||
trap deleteEclipseConfigurationDir EXIT
|
||||
SWITCHES+=(-configuration "$eclipseConfigurationDir")
|
||||
|
|
|
@ -403,7 +403,10 @@ function createEclipseConfigurationDir()
|
|||
{
|
||||
local d dir id=$(hostname)-$(whoami)
|
||||
for d in "/local/cave-eclipse/" "$HOME/.cave-eclipse/"; do
|
||||
if dir=$(mktemp -d -p "$d" "${id}-XXXX"); then
|
||||
if [[ $d == $HOME/* ]]; then
|
||||
mkdir -p "$d" || continue
|
||||
fi
|
||||
if dir=$(mktemp -d --tmpdir="$d" "${id}-XXXX"); then
|
||||
eclipseConfigurationDir=$dir
|
||||
trap deleteEclipseConfigurationDir EXIT
|
||||
SWITCHES+=(-configuration "$eclipseConfigurationDir")
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
# [avn config directory]/default_issue_time.cfg
|
||||
#
|
||||
|
||||
[minutesBeforeForecastTime]
|
||||
minutes = 40
|
||||
#
|
||||
# for example,
|
||||
# minutes = 40 will set default issue time to HH:20Z
|
||||
# minutes = 20 will set default issue time to HH:40Z
|
||||
#
|
||||
|
||||
|
|
@ -228,9 +228,13 @@
|
|||
# Status: NEXTRELEASE
|
||||
# Title: OB9.2 AvnFPS - TPO/FuelAlternate Rule Doesn't work
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ---------- ---------- ----------- --------------------------
|
||||
# 08/03/2015 17540 zhao Modified to make default issue time configurable
|
||||
#
|
||||
import itertools, os, time
|
||||
import Avn, Globals
|
||||
import ConfigParser
|
||||
|
||||
# transmission times
|
||||
_Fcst_Times = (6*3600, 12*3600, 18*3600, 24*3600)
|
||||
|
@ -341,11 +345,33 @@ def getIssueTime(kind, bbb, t=None):
|
|||
t = time.time()
|
||||
if not bbb or bbb[0] == ' ': # regular issue forecast
|
||||
itime = Avn.string2time('%s00' % getFmtValidTime(kind, bbb, t)[:8])
|
||||
itime -= _Xmit_Windows[0]
|
||||
|
||||
minutesBeforeForecastTime = getMinutesBeforeForecastTime()
|
||||
|
||||
if minutesBeforeForecastTime != None:
|
||||
itime -= 60*int(minutesBeforeForecastTime)
|
||||
else:
|
||||
itime -= _Xmit_Windows[0]
|
||||
|
||||
if itime > t:
|
||||
return itime
|
||||
return t
|
||||
|
||||
def getMinutesBeforeForecastTime():
|
||||
try:
|
||||
f = Avn.PATH_MGR.getStaticFile(Avn.ConfigDir)
|
||||
fname = f.getPath()
|
||||
fname = os.path.join(fname, 'default_issue_time.cfg')
|
||||
if not (os.path.exists(fname)):
|
||||
return None
|
||||
cp = ConfigParser.RawConfigParser()
|
||||
cp.read(fname)
|
||||
d = cp.get('minutesBeforeForecastTime', 'minutes')
|
||||
return d
|
||||
|
||||
except Exception:
|
||||
raise
|
||||
|
||||
def getFmtIssueTime(kind, bbb, t=None):
|
||||
if t is None:
|
||||
t = time.time()
|
||||
|
|
|
@ -669,7 +669,7 @@ public class AWIPSHeaderBlockDlg extends CaveSWTDialog implements
|
|||
+ " is not in the list of valid products. Use it anyway?";
|
||||
int response = TextWSMessageBox.open(shell, "", message,
|
||||
SWT.ICON_QUESTION | SWT.YES | SWT.NO);
|
||||
if (response == SWT.NO) {
|
||||
if (response == SWT.NO || parentEditor.isDisposed()) {
|
||||
return;
|
||||
}
|
||||
parentEditor.enableSend(false);
|
||||
|
|
|
@ -321,7 +321,7 @@ public class SearchReplaceDlg extends CaveSWTDialog {
|
|||
+ "Start from the top of the product?", SWT.ICON_ERROR
|
||||
| SWT.YES | SWT.NO);
|
||||
|
||||
if (result == SWT.NO) {
|
||||
if (result == SWT.NO || searchForTF.isDisposed()) {
|
||||
foundIndex = tmpIndex;
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -3210,7 +3210,9 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
AfosBrowserModel.getInstance().getLocalSite());
|
||||
if (!parser.isValidCommand()) {
|
||||
userInformation("AFOSCMD is invalid");
|
||||
afosCmdTF.setFocus();
|
||||
if (!afosCmdTF.isDisposed()) {
|
||||
afosCmdTF.setFocus();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3419,7 +3421,9 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
int charCount = awipsIdTF.getCharCount();
|
||||
if ((charCount < 4) || (charCount > 6)) {
|
||||
userInformation("Must enter a 4 to 6 character AWIPS ID");
|
||||
awipsIdTF.setFocus();
|
||||
if (!awipsIdTF.isDisposed()) {
|
||||
awipsIdTF.setFocus();
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
TextDisplayModel.getInstance().setProductCategory(token,
|
||||
|
@ -4098,7 +4102,9 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
} else if (popupItems[3].equals(choice)) {
|
||||
pasteText();
|
||||
}
|
||||
textEditor.update();
|
||||
if (!textEditor.isDisposed()) {
|
||||
textEditor.update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6211,7 +6217,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
} else {
|
||||
userInformation("No product in the database matches your request.");
|
||||
|
||||
if (!accumChkBtn.getSelection()) {
|
||||
if (!accumChkBtn.isDisposed() && !accumChkBtn.getSelection()) {
|
||||
textEditor.setText("");
|
||||
}
|
||||
validExecuteCommand = false;
|
||||
|
@ -6401,7 +6407,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
+ "ms to show dialog");
|
||||
enterEditor();
|
||||
|
||||
if (autoWrapMenuItem != null) {
|
||||
if (autoWrapMenuItem != null && !autoWrapMenuItem.isDisposed()) {
|
||||
Menu menu = autoWrapMenuItem.getMenu();
|
||||
for (MenuItem item : menu.getItems()) {
|
||||
if (item.getSelection()) {
|
||||
|
@ -7212,7 +7218,9 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
rval = false;
|
||||
textEditor.setSelection(startIndex, endIndex + 3);
|
||||
userInformation("You must modify the selected region before sending or saving the product.");
|
||||
textEditor.setFocus();
|
||||
if (!textEditor.isDisposed()) {
|
||||
textEditor.setFocus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -853,11 +853,13 @@ public class ScriptEditorDialog extends CaveSWTDialog implements IScriptEditor {
|
|||
*/
|
||||
private void handleFileNew() {
|
||||
dirtyFileHelper("before deleting");
|
||||
this.scriptEditor.setText("");
|
||||
this.fileName = FILE_DEFAULT;
|
||||
this.filePath = "";
|
||||
scriptEditorDirty = false;
|
||||
setTitle();
|
||||
if (!scriptEditor.isDisposed()) {
|
||||
this.scriptEditor.setText("");
|
||||
setTitle();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -865,6 +867,9 @@ public class ScriptEditorDialog extends CaveSWTDialog implements IScriptEditor {
|
|||
*/
|
||||
private void handleFileOpen() {
|
||||
dirtyFileHelper("before opening new script");
|
||||
if (shell.isDisposed()) {
|
||||
return;
|
||||
}
|
||||
FileDialog fd = new FileDialog(shell, SWT.OPEN);
|
||||
fd.setText("Open Script File");
|
||||
fd.setFilterExtensions(SCRIPT_EXTNS);
|
||||
|
|
|
@ -60,6 +60,7 @@ import com.raytheon.viz.warngen.gis.AffectedAreas;
|
|||
* May 29, 2015 4442 randerso Fixed WarnGen text locking to work with mixed case
|
||||
* Jul 10, 2015 DR 17314 Qinglu Lin Updated firstBullet().
|
||||
* Jul 17, 2015 DR 17314 D. Friedman Fix string replacement in firstBullet().
|
||||
* Aug 5, 2015 DR 17865 Qinglu Lin Updated firstBullet() for issue brought in by mixed case DCS.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -236,7 +237,7 @@ abstract public class AbstractLockingBehavior {
|
|||
}
|
||||
}
|
||||
|
||||
int endIndex = line.indexOf(" IN ");
|
||||
int endIndex = line.toUpperCase().indexOf(" IN ");
|
||||
String textForSearch = null;
|
||||
if (endIndex == -1)
|
||||
textForSearch = line;
|
||||
|
|
|
@ -802,7 +802,6 @@ NGRID ^(E[EHC][IP][A-Z]88) (KWBM) (..)(..)(..)[^!]*!(grib|grib2)/[^/]*/([^/]*)/#
|
|||
# ESTOFS - Alaska, East Pacific, Hawaii (ADH)- Joshua.Watson DCS 16963
|
||||
NGRID ^(E[EHC][ADH][A-Z]88) (KWBM) (..)(..)(..)
|
||||
FILE -overwrite -log -close -edex /data_store/grib2/(\3:yyyy)(\3:mm)\3/\4/ESTOFS/GRID\8/\1_\2_\3\4\5_(seq).grib2.%Y%m%d%H
|
||||
:
|
||||
# HRRR - Pattern provided by Joshua.Watson.
|
||||
NGRID ^(Y.C[A-MZ][05789][0-9]) (KWBY) (..)(..)(..)[^!]*!(grib|grib2)/[^/]*/([^/]*)/#([^/]*)/([0-9]{8})([0-9]{4})(F[0-9]{3})/([^/]*)
|
||||
FILE -overwrite -log -close -edex /data_store/\6/(\3:yyyy)(\3:mm)\3/\4/\7/GRID\8/\(10)Z_\(11)_\(12)-\1_\2_\3\4\5_(seq).\6.%Y%m%d%H
|
||||
|
|
Loading…
Add table
Reference in a new issue