Skip to content

Commit

Permalink
Reset flash button when loading new firmware
Browse files Browse the repository at this point in the history
  • Loading branch information
haslinghuis committed Jan 7, 2024
1 parent b40bc00 commit 6877e85
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 58 deletions.
8 changes: 0 additions & 8 deletions locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -3421,14 +3421,6 @@
"firmwareFlasherCloudBuildFailed": {
"message": "failed (please check log)"
},
"firmwareFlasherCloudBuildHealthStatus": {
"message": "Cloud API Health Status:",
"description": "Label for Cloud build health status"
},
"firmwareFlasherCloudBuildHealthStatusQueue": {
"message": "Cloud API Queue:",
"description": "Label for Cloud build queue"
},
"firmwareFlasherReleaseFileUrl": {
"message": "Download manually."
},
Expand Down
12 changes: 0 additions & 12 deletions src/js/BuildApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,6 @@ export default class BuildApi {
});
}

getHealthStatus(onSuccess, onFailure) {
const url = `${this._url}/healthcheck`;
$.get(url, function (data) {
onSuccess(data);
}).fail(xhr => {
gui_log(i18n.getMessage('buildServerFailure', [url, `HTTP ${xhr.status}`]));
if (onFailure !== undefined) {
onFailure();
}
});
}

getSupportCommands(onSuccess, onFailure) {
const url = `${this._url}/api/support/commands`;
$.get(url, function (data) {
Expand Down
28 changes: 0 additions & 28 deletions src/js/tabs/firmware_flasher.js
Original file line number Diff line number Diff line change
Expand Up @@ -891,34 +891,6 @@ firmware_flasher.initialize = function (callback) {

showReleaseNotes(self.targetDetail);

// Add health and queue status
const cloudBuildHealthStatusElement = $('#cloudBuildHealthStatus');
const cloudBuildHealthStatusValue = $('#cloudBuildHealthStatusValue');
const cloudBuildHealthStatusQueueElement = $('#cloudBuildHealthStatusQueue');
const cloudBuildHealthStatusQueueValue = $('#cloudBuildHealthStatusQueueValue');

if (self.targetDetail.cloudBuild === true) {
self.releaseLoader.getHealthStatus(health => {

if (health.status !== 'OK') {
cloudBuildHealthStatusValue.text(health.status);
cloudBuildHealthStatusElement.show();
} else {
cloudBuildHealthStatusElement.hide();
}

if (health.queued > 0) {
cloudBuildHealthStatusQueueValue.text(health.queued);
cloudBuildHealthStatusQueueElement.show();
} else {
cloudBuildHealthStatusQueueElement.hide();
}
});
} else {
cloudBuildHealthStatusElement.hide();
cloudBuildHealthStatusQueueElement.hide();
}

requestCloudBuild(self.targetDetail);
} else {
$('span.progressLabel').attr('i18n','firmwareFlasherFailedToLoadOnlineFirmware').removeClass('i18n-replaced');
Expand Down
10 changes: 0 additions & 10 deletions src/tabs/firmware_flasher.html
Original file line number Diff line number Diff line change
Expand Up @@ -255,16 +255,6 @@
<span id="cloudTargetStatus"></span>
<br />
</div>
<div id="cloudBuildHealthStatus">
<strong i18n="firmwareFlasherCloudBuildHealthStatus"></strong>
<span id="cloudBuildHealthStatusValue"></span>
<br />
</div>
<div id="cloudBuildHealthStatusQueue">
<strong i18n="firmwareFlasherCloudBuildHealthStatusQueue"></strong>
<span id="cloudBuildHealthStatusQueueValue"></span>
<br />
</div>
</div>
</div>

Expand Down

0 comments on commit 6877e85

Please sign in to comment.