Skip to content

Commit

Permalink
models/balenaos-contract: Switch to using markdown for links
Browse files Browse the repository at this point in the history
... because HTML links are no longer displayed in the dashboard
image download modal.

We also adapt the tests to these changes.

See internal thread: https://balena.zulipchat.com/#narrow/channel/350505-aspect.2Fgrowth/topic/Improving.20Jetson-flash.20documentation/near/493450821

Change-type: patch
Signed-off-by: Alexandru Costache <[email protected]>
  • Loading branch information
acostach committed Jan 15, 2025
1 parent 52e8346 commit 461dca2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions src/models/balenaos-contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ export const BalenaOS: Contract = {
image: [`{{#each deviceType.partials.instructions}}{{{this}}} {{/each}}`],
internalFlash: [
`{{#each deviceType.partials.connectDevice}}{{{this}}} {{/each}}`,
`Write the {{name}} file you downloaded to the {{deviceType.name}}. We recommend using <a href="https://etcher.balena.io/">Etcher</a>.`,
`Write the {{name}} file you downloaded to the {{deviceType.name}}. We recommend using [Etcher](https://etcher.balena.io/).`,
`Wait for writing of {{name}} to complete.`,
`{{#each deviceType.partials.disconnectDevice}}{{{this}}} {{/each}}`,
`{{{deviceType.partials.bootDevice}}} to boot the device.`,
],
externalFlash: [
`{{#each deviceType.partials.instructions}}{{{this}}} {{/each}}`,
`Insert the {{resolveContractAlias deviceType.data.media.altBoot.[0]}} to the host machine.`,
`Write the {{name}} file you downloaded to the {{resolveContractAlias deviceType.data.media.altBoot.[0]}}. We recommend using <a href="https://etcher.balena.io/">Etcher</a>.`,
`Write the {{name}} file you downloaded to the {{resolveContractAlias deviceType.data.media.altBoot.[0]}}. We recommend using [Etcher](https://etcher.balena.io/).`,
`Wait for writing of {{name}} to complete.`,
`Remove the {{resolveContractAlias deviceType.data.media.altBoot.[0]}} from the host machine.`,
`Insert the freshly flashed {{resolveContractAlias deviceType.data.media.altBoot.[0]}} into the {{deviceType.name}}.`,
Expand All @@ -33,14 +33,14 @@ export const BalenaOS: Contract = {
],
externalBoot: [
`Insert the {{resolveContractAlias deviceType.data.media.defaultBoot}} to the host machine.`,
`Write the {{name}} file you downloaded to the {{resolveContractAlias deviceType.data.media.defaultBoot}}. We recommend using <a href="https://etcher.balena.io/">Etcher</a>.`,
`Write the {{name}} file you downloaded to the {{resolveContractAlias deviceType.data.media.defaultBoot}}. We recommend using [Etcher](https://etcher.balena.io/).`,
`Wait for writing of {{name}} to complete.`,
`Remove the {{resolveContractAlias deviceType.data.media.defaultBoot}} from the host machine.`,
`Insert the freshly flashed {{resolveContractAlias deviceType.data.media.defaultBoot}} into the {{deviceType.name}}.`,
`{{{deviceType.partials.bootDevice}}} to boot the device.`,
],
jetsonFlash: [
`To provision {{deviceType.name}}, follow the instructions using our <a href="https://github.com/balena-os/jetson-flash/blob/master/docs/{{deviceType.slug}}.md">Jetson Flash tool</a> to make the process more streamlined.`,
`To provision {{deviceType.name}}, follow the instructions using our [Jetson Flash tool](https://github.com/balena-os/jetson-flash/blob/master/docs/{{deviceType.slug}}.md) to make the process more streamlined.`,
],
usbMassStorage: [
`{{#each deviceType.partials.instructions}}{{{this}}}
Expand Down
14 changes: 7 additions & 7 deletions tests/integration/models/device-type.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ describe('Device Type model', function () {
RPI2_DEVICE_TYPE_SLUG,
[
'Insert the SD card to the host machine.',
'Write the balenaOS file you downloaded to the SD card. We recommend using <a href="https://etcher.balena.io/">Etcher</a>.',
'Write the balenaOS file you downloaded to the SD card. We recommend using [Etcher](https://etcher.balena.io/).',
'Wait for writing of balenaOS to complete.',
'Remove the SD card from the host machine.',
'Insert the freshly flashed SD card into the Raspberry Pi 2.',
Expand All @@ -115,18 +115,18 @@ describe('Device Type model', function () {
[
RADXA_ZERO_DEVICE_TYPE_SLUG,
[
'Use the <a href="https://wiki.radxa.com/Zero/dev/maskrom#Enable_maskrom">maskrom mode</a> instructions provided by the vendor and make sure the board\'s USB2 port is used for provisioning.',
'Install on your PC the <a href=https://wiki.radxa.com/Zero/dev/maskrom#Install_required_tools>tools</a> required for flashing.',
'Clear eMMC and set it in UMS mode. Make sure to use <a href=https://dl.radxa.com/zero/images/loader/radxa-zero-erase-emmc.bin>this loader</a> when following the <a href=https://wiki.radxa.com/Zero/dev/maskrom#Side_loading_binaries>sideloading instructions</a>.',
'Write the OS to the internal eMMC storage device. We recommend using <a href="http://www.etcher.io">Etcher</a>.',
"Use the [maskrom mode](https://wiki.radxa.com/Zero/dev/maskrom#Enable_maskrom) instructions provided by the vendor and make sure the board's USB2 port is used for provisioning.",
'Install on your PC the [tools](https://wiki.radxa.com/Zero/dev/maskrom#Install_required_tools) required for flashing.',
'Clear eMMC and set it in UMS mode. Make sure to use [this loader](https://dl.radxa.com/zero/images/loader/radxa-zero-erase-emmc.bin) when following the [sideloading instructions](https://wiki.radxa.com/Zero/dev/maskrom#Side_loading_binaries).',
'Write the OS to the internal eMMC storage device. We recommend using [Etcher](http://www.etcher.io).',
'Once the OS has been written to the eMMC you need to repower your board.',
],
],
[
'intel-nuc',
[
'Insert the USB key to the host machine.',
'Write the balenaOS file you downloaded to the USB key. We recommend using <a href="https://etcher.balena.io/">Etcher</a>.',
'Write the balenaOS file you downloaded to the USB key. We recommend using [Etcher](https://etcher.balena.io/).',
'Wait for writing of balenaOS to complete.',
'Remove the USB key from the host machine.',
'Insert the freshly flashed USB key into the Intel NUC.',
Expand All @@ -140,7 +140,7 @@ describe('Device Type model', function () {
[
'jetson-nano',
[
'To provision Nvidia Jetson Nano SD-CARD, follow the instructions using our <a href="https://github.com/balena-os/jetson-flash/blob/master/docs/jetson-nano.md">Jetson Flash tool</a> to make the process more streamlined.',
'To provision Nvidia Jetson Nano SD-CARD, follow the instructions using our [Jetson Flash tool](https://github.com/balena-os/jetson-flash/blob/master/docs/jetson-nano.md) to make the process more streamlined.',
],
],
] as const
Expand Down

0 comments on commit 461dca2

Please sign in to comment.