From aceb649fa789614d5110b875a3f735c36fb59b87 Mon Sep 17 00:00:00 2001 From: Michael Quigley Date: Wed, 3 Aug 2022 13:48:17 -0400 Subject: [PATCH] more naming alignment --- controller/list.go | 8 ++++---- rest_model_zrok/environment.go | 13 +++++++++++-- rest_server_zrok/embedded_spec.go | 22 ++++++++++++++++++++-- specs/zrok.yml | 8 +++++++- ui/src/Environments.js | 4 ++-- ui/src/api/types.js | 5 ++++- 6 files changed, 48 insertions(+), 12 deletions(-) diff --git a/controller/list.go b/controller/list.go index 354883d2..96aae537 100644 --- a/controller/list.go +++ b/controller/list.go @@ -22,10 +22,10 @@ func listEnvironmentsHandler(_ metadata.ListEnvironmentsParams, principal *rest_ var out rest_model_zrok.Environments for _, env := range envs { out = append(out, &rest_model_zrok.Environment{ - Active: env.Active, - CreatedAt: env.CreatedAt.String(), - UpdatedAt: env.UpdatedAt.String(), - ZitiID: env.ZitiIdentityId, + Active: env.Active, + CreatedAt: env.CreatedAt.String(), + UpdatedAt: env.UpdatedAt.String(), + ZitiIdentityID: env.ZitiIdentityId, }) } return metadata.NewListEnvironmentsOK().WithPayload(out) diff --git a/rest_model_zrok/environment.go b/rest_model_zrok/environment.go index 13b41862..ba1805bf 100644 --- a/rest_model_zrok/environment.go +++ b/rest_model_zrok/environment.go @@ -20,14 +20,23 @@ type Environment struct { // active Active bool `json:"active,omitempty"` + // address + Address string `json:"address,omitempty"` + // created at CreatedAt string `json:"createdAt,omitempty"` + // description + Description string `json:"description,omitempty"` + + // host + Host string `json:"host,omitempty"` + // updated at UpdatedAt string `json:"updatedAt,omitempty"` - // ziti Id - ZitiID string `json:"zitiId,omitempty"` + // ziti identity Id + ZitiIdentityID string `json:"zitiIdentityId,omitempty"` } // Validate validates this environment diff --git a/rest_server_zrok/embedded_spec.go b/rest_server_zrok/embedded_spec.go index bfe55765..d6b669da 100644 --- a/rest_server_zrok/embedded_spec.go +++ b/rest_server_zrok/embedded_spec.go @@ -295,13 +295,22 @@ func init() { "active": { "type": "boolean" }, + "address": { + "type": "string" + }, "createdAt": { "type": "string" }, + "description": { + "type": "string" + }, + "host": { + "type": "string" + }, "updatedAt": { "type": "string" }, - "zitiId": { + "zitiIdentityId": { "type": "string" } } @@ -660,13 +669,22 @@ func init() { "active": { "type": "boolean" }, + "address": { + "type": "string" + }, "createdAt": { "type": "string" }, + "description": { + "type": "string" + }, + "host": { + "type": "string" + }, "updatedAt": { "type": "string" }, - "zitiId": { + "zitiIdentityId": { "type": "string" } } diff --git a/specs/zrok.yml b/specs/zrok.yml index 259a875b..4f5deb04 100644 --- a/specs/zrok.yml +++ b/specs/zrok.yml @@ -180,7 +180,13 @@ definitions: environment: type: object properties: - zitiId: + description: + type: string + host: + type: string + address: + type: string + zitiIdentityId: type: string active: type: boolean diff --git a/ui/src/Environments.js b/ui/src/Environments.js index 499e4c87..6cf4c5ee 100644 --- a/ui/src/Environments.js +++ b/ui/src/Environments.js @@ -7,8 +7,8 @@ const Environments = (props) => { const columns = [ { - name: 'Ziti ID', - selector: row => row.zitiId, + name: 'Ziti Identity', + selector: row => row.zitiIdentityId, sortable: true, }, { diff --git a/ui/src/api/types.js b/ui/src/api/types.js index 7591fea3..6dcea3ec 100644 --- a/ui/src/api/types.js +++ b/ui/src/api/types.js @@ -28,7 +28,10 @@ * @typedef environment * @memberof module:types * - * @property {string} zitiId + * @property {string} description + * @property {string} host + * @property {string} address + * @property {string} zitiIdentityId * @property {boolean} active * @property {string} createdAt * @property {string} updatedAt