Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLAG-965] Fix VIIRS dropdown #4721

Merged
merged 8 commits into from
Nov 8, 2023
9 changes: 5 additions & 4 deletions components/widgets/fires/fires-alerts-cumulative/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const getSentences = (state) => state.sentences || null;
const getLocationName = (state) => state.locationLabel;
const getOptionsSelected = (state) => state.optionsSelected;
const getIndicator = (state) => state.indicator;
const getSettings = (state) => state.settings;

export const getCompareYears = createSelector(
[getCompareYear, getAllYears],
Expand Down Expand Up @@ -401,9 +402,9 @@ export const parseSentence = createSelector(
getDataset,
getLocationName,
getStartIndex,
// getEndIndex,
getOptionsSelected,
getIndicator,
getSettings,
],
(
raw_data,
Expand All @@ -413,9 +414,9 @@ export const parseSentence = createSelector(
dataset,
location,
startIndex,
// endIndex //broken?
options,
indicator
indicator,
settings
) => {
if (!data || isEmpty(data)) return null;
const {
Expand All @@ -424,7 +425,7 @@ export const parseSentence = createSelector(
highConfidenceWithInd,
allAlertsWithInd,
} = sentences;
const { confidence } = options;
const { confidence = { value: settings.confidence } } = options;
const indicatorLabel =
indicator && indicator.label ? indicator.label : null;
const start = startIndex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const getAlerts = (state) => state.data;
const getColors = (state) => state.colors || null;
const getStartDate = (state) => state.settings.startDate;
const getEndDate = (state) => state.settings.endDate;
const getSettings = (state) => state.settings;
const getSentences = (state) => state.sentences || null;
const getLocationObject = (state) => state.location;
const getOptionsSelected = (state) => state.optionsSelected;
Expand Down Expand Up @@ -87,6 +88,7 @@ export const parseSentence = createSelector(
getEndDate,
getOptionsSelected,
getIndicator,
getSettings,
],
(
data,
Expand All @@ -96,11 +98,13 @@ export const parseSentence = createSelector(
startDate,
endDate,
options,
indicator
indicator,
settings
) => {
if (!data) return null;
const { initial, withInd, highConfidence } = sentences;
const { confidence, dataset } = options;
const { confidence = { value: settings.confidence }, dataset } = options;

const indicatorLabel =
indicator && indicator.label ? indicator.label : null;
const total = sumBy(data, 'alert__count');
Expand Down
288 changes: 0 additions & 288 deletions components/widgets/fires/fires-alerts-historical-old/index.js

This file was deleted.

Loading
Loading