Merge branch 'master' of https://github.com/FarmBot/Farmbot-Web-App into staging

pull/1769/head
gabrielburnworth 2020-04-24 06:49:58 -07:00
commit 1d196d633a
3 changed files with 12 additions and 2 deletions

View File

@ -263,7 +263,7 @@ export function FbosDetails(props: FbosDetailsProps) {
soc_temp, wifi_level, uptime, memory_usage, disk_usage, throttled,
wifi_level_percent, cpu_usage, private_ip,
} = 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 firmwareCommit = firmware_version?.split("-")[1] || infoFwCommit;
@ -273,6 +273,7 @@ export function FbosDetails(props: FbosDetailsProps) {
botToMqttLastSeen={props.botToMqttLastSeen}
timeSettings={props.timeSettings}
device={props.deviceAccount} />
<p><b>{t("Version last seen")}: </b>{fbos_version}</p>
<p><b>{t("Environment")}: </b>{env}</p>
<CommitDisplay title={t("Commit")}
repo={FarmBotRepo.FarmBotOS} commit={commit} />

View File

@ -141,6 +141,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
* state with the API's fbos_version string and return the greatest version. */

View File

@ -44,7 +44,9 @@ end
def get_base_branch(pull_data)
current_branch = BASE_BRANCHES.empty? ||
BASE_BRANCHES.include?(CURRENT_BRANCH) ? CURRENT_BRANCH : "staging"
pull_data.dig("base", "ref") || current_branch
provided_base_branch =
CURRENT_BRANCH.start_with?("master-hotfix/") ? "master" : nil;
pull_data.dig("base", "ref") || provided_base_branch || current_branch
end
# Gather relevant coverage data.