update fallback
parent
4375a935f0
commit
b3f93dd678
|
@ -263,7 +263,7 @@ export function FbosDetails(props: FbosDetailsProps) {
|
||||||
soc_temp, wifi_level, uptime, memory_usage, disk_usage, throttled,
|
soc_temp, wifi_level, uptime, memory_usage, disk_usage, throttled,
|
||||||
wifi_level_percent, cpu_usage, private_ip,
|
wifi_level_percent, cpu_usage, private_ip,
|
||||||
} = props.botInfoSettings;
|
} = props.botInfoSettings;
|
||||||
const { last_ota, last_ota_checkup } = props.deviceAccount.body;
|
const { last_ota, last_ota_checkup, fbos_version } = props.deviceAccount.body;
|
||||||
const infoFwCommit = firmware_version?.includes(".") ? firmware_commit : "---";
|
const infoFwCommit = firmware_version?.includes(".") ? firmware_commit : "---";
|
||||||
const firmwareCommit = firmware_version?.split("-")[1] || infoFwCommit;
|
const firmwareCommit = firmware_version?.split("-")[1] || infoFwCommit;
|
||||||
|
|
||||||
|
@ -273,6 +273,7 @@ export function FbosDetails(props: FbosDetailsProps) {
|
||||||
botToMqttLastSeen={props.botToMqttLastSeen}
|
botToMqttLastSeen={props.botToMqttLastSeen}
|
||||||
timeSettings={props.timeSettings}
|
timeSettings={props.timeSettings}
|
||||||
device={props.deviceAccount} />
|
device={props.deviceAccount} />
|
||||||
|
<p><b>{t("Version last seen")}: </b>{fbos_version}</p>
|
||||||
<p><b>{t("Environment")}: </b>{env}</p>
|
<p><b>{t("Environment")}: </b>{env}</p>
|
||||||
<CommitDisplay title={t("Commit")}
|
<CommitDisplay title={t("Commit")}
|
||||||
repo={FarmBotRepo.FarmBotOS} commit={commit} />
|
repo={FarmBotRepo.FarmBotOS} commit={commit} />
|
||||||
|
|
|
@ -120,7 +120,7 @@ export function createShouldDisplayFn(
|
||||||
const fallback = globalConfig.FBOS_END_OF_LIFE_VERSION ||
|
const fallback = globalConfig.FBOS_END_OF_LIFE_VERSION ||
|
||||||
FbosVersionFallback.NULL;
|
FbosVersionFallback.NULL;
|
||||||
const target = override || current || fallback;
|
const target = override || current || fallback;
|
||||||
const table = lookupData || {};
|
const table = lookupData || fallbackData;
|
||||||
const min = table[feature] || MinVersionOverride.NEVER;
|
const min = table[feature] || MinVersionOverride.NEVER;
|
||||||
switch (semverCompare(target, min)) {
|
switch (semverCompare(target, min)) {
|
||||||
case SemverResult.LEFT_IS_GREATER:
|
case SemverResult.LEFT_IS_GREATER:
|
||||||
|
@ -132,6 +132,13 @@ export function createShouldDisplayFn(
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Temporary hotfix fallback data. Please remove.
|
||||||
|
const fallbackData: MinOsFeatureLookup = {};
|
||||||
|
Object.values(Feature).map(feature =>
|
||||||
|
fallbackData[feature] = globalConfig.FBOS_END_OF_LIFE_VERSION);
|
||||||
|
fallbackData.criteria_groups = "9.2.2";
|
||||||
|
fallbackData.boot_sequence = MinVersionOverride.NEVER;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compare the current FBOS version in the bot's
|
* Compare the current FBOS version in the bot's
|
||||||
* state with the API's fbos_version string and return the greatest version. */
|
* state with the API's fbos_version string and return the greatest version. */
|
||||||
|
|
Loading…
Reference in New Issue