Skip to content
6 changes: 3 additions & 3 deletions meteor_packages/mats-common/.npm/package/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ export const curveParamsByApp = {
"y-statistic",
"variable",
"y-variable",
"obs-variable",
"y-obs-variable",
"threshold",
"interp-method",
"scale",
Expand Down
58 changes: 55 additions & 3 deletions meteor_packages/mats-common/imports/startup/client/curve_util.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ const resetGraphResult = function () {
Session.set("graphDataLoaded", new Date());
};

const setCurveParamDisplayText = function (paramName, newText) {
const setCurveParamDisplayText = async function (paramName, newText) {
if (document.getElementById(`${paramName}-item`)) {
matsMethods.setCurveParamDisplayText
await matsMethods.setCurveParamDisplayText
.callAsync({
paramName,
newText,
Expand Down Expand Up @@ -406,7 +406,7 @@ const checkDiffs = function () {
const curves = Session.get("Curves");
const plotFormat = matsPlotUtils.getPlotFormat();
if (curves.length > 1) {
if (plotFormat !== matsTypes.PlotFormats.none) {
if (plotFormat && plotFormat !== matsTypes.PlotFormats.none) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem right... double validation of the same thing? Or am I missing something?

removeDiffs();
addDiffs();
} else {
Expand Down Expand Up @@ -516,8 +516,11 @@ const showTimeseriesFace = function () {
"x-statistic": "none",
"y-statistic": "none",
variable: "block",
"obs-variable": "block",
"x-variable": "none",
"x-obs-variable": "none",
"y-variable": "none",
"y-obs-variable": "none",
threshold: "block",
scale: "block",
level: "block",
Expand Down Expand Up @@ -576,8 +579,11 @@ const showProfileFace = function () {
"x-statistic": "none",
"y-statistic": "none",
variable: "block",
"obs-variable": "block",
"x-variable": "none",
"x-obs-variable": "none",
"y-variable": "none",
"y-obs-variable": "none",
threshold: "block",
scale: "block",
level: "none",
Expand Down Expand Up @@ -636,8 +642,11 @@ const showDieoffFace = function () {
"x-statistic": "none",
"y-statistic": "none",
variable: "block",
"obs-variable": "block",
"x-variable": "none",
"x-obs-variable": "none",
"y-variable": "none",
"y-obs-variable": "none",
threshold: "block",
scale: "block",
level: "block",
Expand Down Expand Up @@ -696,8 +705,11 @@ const showThresholdFace = function () {
"x-statistic": "none",
"y-statistic": "none",
variable: "block",
"obs-variable": "block",
"x-variable": "none",
"x-obs-variable": "none",
"y-variable": "none",
"y-obs-variable": "none",
threshold: "none",
scale: "block",
level: "block",
Expand Down Expand Up @@ -760,8 +772,11 @@ const showValidTimeFace = function () {
"x-statistic": "none",
"y-statistic": "none",
variable: "block",
"obs-variable": "block",
"x-variable": "none",
"x-obs-variable": "none",
"y-variable": "none",
"y-obs-variable": "none",
threshold: "block",
scale: "block",
level: "block",
Expand Down Expand Up @@ -820,8 +835,11 @@ const showGridScaleFace = function () {
"x-statistic": "none",
"y-statistic": "none",
variable: "block",
"obs-variable": "block",
"x-variable": "none",
"x-obs-variable": "none",
"y-variable": "none",
"y-obs-variable": "none",
threshold: "block",
scale: "none",
level: "block",
Expand Down Expand Up @@ -880,8 +898,11 @@ const showDailyModelCycleFace = function () {
"x-statistic": "none",
"y-statistic": "none",
variable: "block",
"obs-variable": "block",
"x-variable": "none",
"x-obs-variable": "none",
"y-variable": "none",
"y-obs-variable": "none",
threshold: "block",
scale: "block",
level: "block",
Expand Down Expand Up @@ -940,8 +961,11 @@ const showYearToYearFace = function () {
"x-statistic": "none",
"y-statistic": "none",
variable: "block",
"obs-variable": "block",
"x-variable": "none",
"x-obs-variable": "none",
"y-variable": "none",
"y-obs-variable": "none",
threshold: "block",
scale: "block",
level: "block",
Expand Down Expand Up @@ -999,8 +1023,11 @@ const showReliabilityFace = function () {
"x-statistic": "none",
"y-statistic": "none",
variable: "block",
"obs-variable": "block",
"x-variable": "none",
"x-obs-variable": "none",
"y-variable": "none",
"y-obs-variable": "none",
threshold: "block",
scale: "block",
level: "block",
Expand Down Expand Up @@ -1062,8 +1089,11 @@ const showROCFace = function () {
"x-statistic": "none",
"y-statistic": "none",
variable: "block",
"obs-variable": "block",
"x-variable": "none",
"x-obs-variable": "none",
"y-variable": "none",
"y-obs-variable": "none",
threshold: "block",
scale: "block",
level: "block",
Expand Down Expand Up @@ -1127,8 +1157,11 @@ const showPerformanceDiagramFace = function () {
"x-statistic": "none",
"y-statistic": "none",
variable: "block",
"obs-variable": "block",
"x-variable": "none",
"x-obs-variable": "none",
"y-variable": "none",
"y-obs-variable": "none",
threshold: "block",
scale: "block",
level: "block",
Expand Down Expand Up @@ -1194,8 +1227,11 @@ const showGridScaleProbFace = function () {
"x-statistic": "none",
"y-statistic": "none",
variable: "block",
"obs-variable": "block",
"x-variable": "none",
"x-obs-variable": "none",
"y-variable": "none",
"y-obs-variable": "none",
threshold: "block",
scale: "block",
level: "block",
Expand Down Expand Up @@ -1255,8 +1291,11 @@ const showMapFace = function () {
"x-statistic": "none",
"y-statistic": "none",
variable: "block",
"obs-variable": "block",
"x-variable": "none",
"x-obs-variable": "none",
"y-variable": "none",
"y-obs-variable": "none",
threshold: "block",
scale: "block",
level: "block",
Expand Down Expand Up @@ -1327,8 +1366,11 @@ const showHistogramFace = function () {
"x-statistic": "none",
"y-statistic": "none",
variable: "block",
"obs-variable": "block",
"x-variable": "none",
"x-obs-variable": "none",
"y-variable": "none",
"y-obs-variable": "none",
threshold: "block",
scale: "block",
level: "block",
Expand Down Expand Up @@ -1396,8 +1438,11 @@ const showEnsembleHistogramFace = function () {
"x-statistic": "none",
"y-statistic": "none",
variable: "block",
"obs-variable": "block",
"x-variable": "none",
"x-obs-variable": "none",
"y-variable": "none",
"y-obs-variable": "none",
threshold: "block",
scale: "block",
level: "block",
Expand Down Expand Up @@ -1461,8 +1506,11 @@ const showContourFace = function () {
"x-statistic": "none",
"y-statistic": "none",
variable: "block",
"obs-variable": "block",
"x-variable": "none",
"x-obs-variable": "none",
"y-variable": "none",
"y-obs-variable": "none",
threshold: "block",
scale: "block",
level: "block",
Expand Down Expand Up @@ -1526,8 +1574,11 @@ const showSimpleScatterFace = function () {
"x-statistic": "block",
"y-statistic": "block",
variable: "none",
"obs-variable": "none",
"x-variable": "block",
"x-obs-variable": "block",
"y-variable": "block",
"y-obs-variable": "block",
threshold: "block",
scale: "block",
level: "block",
Expand Down Expand Up @@ -1568,6 +1619,7 @@ const showSimpleScatterFace = function () {
// in metexpress, scatter plots use the original statistic selector (to handle dependencies)
faceOptions.statistic = "block";
faceOptions.variable = "block";
faceOptions["obs-variable"] = "block";
}
// simple scatters need to have the region be in predefined mode
if (matsParamUtils.getParameterForName("region-type") !== undefined) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import { matsTypes, matsCurveUtils } from "meteor/randyp:mats-common";

/* global $, Session */
/* global Session */
/* eslint-disable no-console */

// set the label for the hide show buttons (NO DATA) for the initial time here
Expand Down Expand Up @@ -464,7 +464,7 @@ const setScorecardDisplayView = function () {
document.getElementById("spinner").style.display = "none";
document.getElementById("scorecardStatus").style.display = "block";
document.getElementById("plotType").style.display = "none";
$("#refresh-scorecard").trigger("click");
document.getElementById("refresh-scorecard").click();
// Enable navigation prompt
window.onbeforeunload = function () {
return true;
Expand Down
8 changes: 7 additions & 1 deletion meteor_packages/mats-common/public/MATSReleaseNotes.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ <h4>Production build date: <x-cr>Current revision</x-cr></h4>
<h4>PUT APP VERSIONS HERE</h4>
<p style="margin: 25px 0"></p>
<p>Changes:</p>
<p>* PUT CHANGES HERE</p>
<p>* Fixed npm security vulnerabilities.</p>
<p>* Added Obs Variable selector to MET Surface app.</p>
<p>* Made MET Surface region selector a multiselect.</p>
<p>
* Fixed bug where difference curves would automatically be set to "on" for
scorecards
</p>
</div>
<div>
<hr
Expand Down
4 changes: 2 additions & 2 deletions meteor_packages/mats-common/templates/configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Template.configure.helpers({
});

Template.configure.events({
"submit .configure-settings-form"(event) {
async "submit .configure-settings-form"(event) {
// Prevent default browser form submit
event.preventDefault();
// Get value from form element
Expand Down Expand Up @@ -124,7 +124,7 @@ Template.configure.events({
}
}
}
matsMethods.applySettingsData
await matsMethods.applySettingsData
.callAsync({ settings: data })
.then()
.catch(function (error) {
Expand Down
2 changes: 1 addition & 1 deletion meteor_packages/mats-common/templates/curves/curve_item.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ Template.curveItem.events({
color: confirmCurve.color,
confirm: true,
});
$("#curve-list-remove").trigger("click");
document.getElementById("curve-list-remove").click();
},
"click .edit-curve"(event) {
const srcEditButton = event.currentTarget;
Expand Down
6 changes: 3 additions & 3 deletions meteor_packages/mats-common/templates/curves/curve_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ <h5 style="color: black">{{removeAllText}}</h5>

<div
id="curveList"
class="well-sm clearfix col-lg-12 my-2 mx-2"
class="well clearfix col-lg-12 my-2 mx-2"
style="display:{{displayCurves}}; width: 90%;"
>
{{#each curves}} {{> curveItem this}} {{/each}} {{#if isScorecard}}
<div class="clearfix btn-toolbar gap-2 well well-sm">
<div class="clearfix btn-toolbar gap-2 well">
<button id="remove-all" class="remove-all btn btn-danger">
<i class="fa-solid fa-xmark"></i>&nbsp;&nbsp;Remove All
</button>
Expand All @@ -67,7 +67,7 @@ <h5 style="color: black">{{removeAllText}}</h5>
<button type="button" class="btn spacebutton" id="cl-spacer"></button>
</div>
{{else}}
<div class="clearfix btn-toolbar gap-2 well well-sm">
<div class="clearfix btn-toolbar gap-2 well">
<button id="remove-all" class="remove-all btn btn-danger">
<i class="fa-solid fa-xmark"></i>&nbsp;&nbsp;Remove All
</button>
Expand Down
2 changes: 1 addition & 1 deletion meteor_packages/mats-common/templates/curves/curve_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ Template.curveList.events({
},
"click .confirm-remove-all"() {
Session.set("confirmRemoveAll", Date.now());
$("#remove-all").trigger("click");
document.getElementById("remove-all").click();
},
"click .submitScorecard"(event) {
document.getElementById("spinner").style.display = "block";
Expand Down
4 changes: 2 additions & 2 deletions meteor_packages/mats-common/templates/graph/graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -1421,11 +1421,11 @@ Template.graph.events({
ctbgElems[i].style.display = "block";
}
},
"click .preview"() {
async "click .preview"() {
// capture the layout
const { layout } = $("#placeholder")[0];
const key = Session.get("plotResultKey");
matsMethods.saveLayout
await matsMethods.saveLayout
.callAsync({
resultKey: key,
layout,
Expand Down
4 changes: 2 additions & 2 deletions meteor_packages/mats-common/templates/params/param_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
aria-label="form to set the curve parameters"
novalidate
>
<div id="paramWell" class="clearfix well well-sm p-3">
<div id="paramWell" class="clearfix well p-3">
{{#each CurveParamGroups}} {{> curveParamGroup}} {{/each}}
</div>
{{#if isEdit}}
<div class="row clearfix well-sm bg-white btn-toolbar btn-group btn-lg p-2">
<div class="row clearfix well bg-white btn-toolbar btn-group btn-lg p-2">
<button type="submit" name="save" id="save" class="btn btn-success">
<i class="fa-regular fa-floppy-disk"></i>&nbsp;&nbsp;Save Changes
</button>
Expand Down
2 changes: 1 addition & 1 deletion meteor_packages/mats-common/templates/plot/plot_list.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template name="plotList">
<div id="plotList">
<div id="plotWell" class="clearfix well well-sm bg-white p-3">
<div id="plotWell" class="clearfix well bg-white p-3">
{{#each PlotParamGroups}} {{> plotParamGroup}} {{/each}}
</div>
<div
Expand Down
Loading
Loading