machinabio / limbforge-service

Single-purpose microservice to generate STLs from parametric CAD designs.
Apache License 2.0
3 stars 1 forks source link

UI Measurements endpoint #16

Open kaitlynhova opened 7 years ago

kaitlynhova commented 7 years ago

follow up to https://github.com/machinabio/limbforge-service/issues/11

  1. Create the Measurements endpoint in shift
  2. Implement the changes in Limbforge's front end app.
luzlab commented 7 years ago

GET /ui/measurements?device=<DEVICE.SLUG> Returns:

{
  measurements: [
    {
      name: 'c1',
      step: 0.5,
      minimum: 28,
      measurementUnit: "cm",
      maximum: 20,
      default: 25,
      instructions: 'instructions go here'
    }
  ], ...
}
kaitlynhova commented 7 years ago

Here is the response I'd like:

{
  measurements: [
    {
      name: 'C1',
      step: 0.5,
      minimum: 28,
      measurementUnit: "cm",
      maximum: 20,
      default: 25,
      instructions: 'instructions go here'
    },
    {
      name: 'C2',
      step: 0.5,
      upper_range: 28,
      measurement_unit: "cm",
      lower_range: 20,
      default: 25,
      instructions: 'instructions go here'
    },
    {
      name: 'C3',
      step: 0.5,
      upper_range: 28,
      measurement_unit: "cm",
      lower_range: 20,
      default: 25,
      instructions: 'instructions go here'
    },
    {
      name: 'C4',
      step: 0.5,
      upper_range: 28,
      measurement_unit: "cm",
      lower_range: 20,
      default: 25,
      instructions: 'instructions go here'
    },
    {
      name: 'L1',
      step: 0.5,
      upper_range: 32,
      measurement_unit: "cm",
      lower_range: 18,
      default: 25,
      instructions: 'instructions go here'
    },
   {
      name: 'L2',
      step: 0.5,
      upper_range: 28,
      measurement_unit: "cm",
      lower_range: 20,
      default: 25,
      instructions: 'instructions go here'
    }
  ]
}
luzlab commented 7 years ago

I think it's done. I'm deploying to production.