Skip to content

Commit

Permalink
chore: remove the Gitlab URL download option from dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
grdddj committed Nov 18, 2024
1 parent 693b201 commit 84ca800
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ <h4>{{details.header}} ({{ model }})</h4>
<div>
<input
type="text"
placeholder="Full emulator URL, or Gitlab job ID - as specified in select. Do not forget to specify correct model"
placeholder="Full emulator URL. Do not forget to specify correct model"
style="width: 50%"
v-model="emulatorUrl.url"
/>
Expand Down
21 changes: 2 additions & 19 deletions src/dashboard/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ const app = createApp({
},
emulatorUrl: {
url: "",
typeChoices: ["Gitlab job ID", "Custom link"],
type: "Gitlab job ID",
typeChoices: ["Custom link"],
type: "Custom link",
model: "T2T1",
downloadMessage: "",
},
Expand Down Expand Up @@ -277,23 +277,6 @@ const app = createApp({

const model = this.emulatorUrl.model;

// URL might need some processing in case it is not complete
// (Yes, handling URLs as strings is not very good, but should be alright in this easy case)
if (this.emulatorUrl.type === "Gitlab job ID") {
const gitlabJobPrefix =
"https://gitlab.com/satoshilabs/trezor/trezor-firmware/-/jobs";
const T1PathSuffix = "artifacts/raw/legacy/firmware/trezor.elf";
// TR/T3T1 share things with T2 here
const T2PathSuffix =
"artifacts/raw/core/build/unix/trezor-emu-core";
const baseUrl = `${gitlabJobPrefix}/${url}`;
if (model === "T1B1") {
url = `${baseUrl}/${T1PathSuffix}`;
} else {
url = `${baseUrl}/${T2PathSuffix}`;
}
}

this.sendMessage({
type: "emulator-start-from-url",
url,
Expand Down

0 comments on commit 84ca800

Please sign in to comment.