holos-run / holos

Holos - The Holistic platform manager
https://holos.run
Apache License 2.0
19 stars 0 forks source link

(#161) Fix the FormGroup & Refactor API #163

Closed jeffmccune closed 6 months ago

jeffmccune commented 6 months ago

The way we were organizing fields into section broke Formly validation. This patch fixes the problem by using the recommended approach of Nested Forms.

This patch also refactors the PlatformService API to clean it up. GetForm / PutForm are separated from the Platform methods. Similarly GetModel / PutModel are separated out and are specific to get and put the model data.

NOTE: I'm not sure we should have separated out the platform service into it's own protobuf package. Seems maybe unnecessary.

grpcurl -H "x-oidc-id-token: $(holos token)" \
  -d '{"platform_id":"018f36fb-e3ff-7f7f-a5d1-7ca2bf499e94"}' \
  jeff.app.dev.k2.holos.run:443 \
  holos.platform.v1alpha1.PlatformService.GetModel
{
  "model": {
    "org": {
      "contactEmail": "platform@openinfrastructure.co",
      "displayName": "Open Infrastructure Services LLC",
      "domain": "ois.run",
      "name": "ois"
    },
    "privacy": {
      "country": "earth",
      "regions": [
        "us-east-2",
        "us-west-2"
      ]
    },
    "terms": {
      "didAgree": true
    }
  }
}

Closes: #161