Skip to content

Commit

Permalink
mod to overwrite
Browse files Browse the repository at this point in the history
  • Loading branch information
JessamyT committed Aug 9, 2024
1 parent 652f288 commit c343e62
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/fleet/fragments.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ If you have made edits, you will see an **edited from FRAGMENT NAME** indicator
You can modify fragment fields in your machine's raw JSON config by using [update operators](https://www.mongodb.com/docs/manual/reference/operator/update/positional/#---update-).
Viam supports all update operators except for `$setOnInsert`, `$`, `$[]`, and `$[<identifier>]`.

To configure fragment mods manually instead of using the builder UI:
To configure fragment overwrites manually instead of using the builder UI:

1. Navigate to your machine's **CONFIGURE** tab.
2. Switch to **JSON** mode.
Expand Down
8 changes: 4 additions & 4 deletions docs/tutorials/control/air-quality-fleet.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,11 @@ For each machine:
{{< expand "Click here for usb_interface troubleshooting help" >}}

If you only have one USB device plugged into each of your boards, the `usb_interface` value you configured in the sensor config is likely (conveniently) the same for all of your machines.
If not, you can use [fragment mods](/fleet/fragments/#use-fragment_mods) to modify the value on any machine for which it is different:
If not, you can use [fragment overwrite](/fleet/fragments/#modify-the-config-of-a-machine-that-uses-a-fragment) to modify the value on any machine for which it is different:

1. If you're not getting sensor readings from a given machine, check the path of the USB port using the same [process by which you found the first USB path](#usb-path).
2. If the path to your sensor on one machine is different from the one you configured in the fragment, add a fragment mod to the config of that machine to change the path without needing to remove the entire fragment.
Follow the [instructions to add a fragment mod](/fleet/fragments/#use-fragment_mods) to your machine's config, using the following JSON template:
2. If the path to your sensor on one machine is different from the one you configured in the fragment, add a fragment overwrite to the config of that machine to change the path without needing to remove the entire fragment.
Follow the [instructions to add a fragment overwrite](/fleet/fragments/#modify-the-config-of-a-machine-that-uses-a-fragment) to your machine's config, using the following JSON template:

```json {class="line-numbers linkable-line-numbers"}
"fragment_mods": [
Expand All @@ -337,7 +337,7 @@ If not, you can use [fragment mods](/fleet/fragments/#use-fragment_mods) to modi
If you named your sensor something other than `PM_sensor`, change the sensor name in the template above.

3. Repeat this process for each machine that needs a different `usb_interface` value.
If you have lots of machines with one `usb_interface` value, and lots of machines with a second one, you might consider duplicating the fragment, editing that value, and using that second fragment instead of the first one for the applicable machines, rather than using a fragment mod for each of the machines.
If you have lots of machines with one `usb_interface` value, and lots of machines with a second one, you might consider duplicating the fragment, editing that value, and using that second fragment instead of the first one for the applicable machines, rather than using a fragment overwrite for each of the machines.
You have options.

{{< /expand >}}
Expand Down
2 changes: 1 addition & 1 deletion docs/use-cases/one-to-many.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Click **Save** in the upper right corner of the screen.

Repeat step 1 for each of the machines that you want to configure in the same way.

If some of your machines have slight differences, you can still add the fragment and then add fragment mods in the next section.
If some of your machines have slight differences, you can still add the fragment and then add fragment overwrites in the next section.

{{% /tablestep %}}
{{< /table >}}
Expand Down

0 comments on commit c343e62

Please sign in to comment.