more naming alignment

This commit is contained in:
Michael Quigley 2022-08-03 13:48:17 -04:00
parent 9bd7f6dba1
commit aceb649fa7
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
6 changed files with 48 additions and 12 deletions

View File

@ -22,10 +22,10 @@ func listEnvironmentsHandler(_ metadata.ListEnvironmentsParams, principal *rest_
var out rest_model_zrok.Environments var out rest_model_zrok.Environments
for _, env := range envs { for _, env := range envs {
out = append(out, &rest_model_zrok.Environment{ out = append(out, &rest_model_zrok.Environment{
Active: env.Active, Active: env.Active,
CreatedAt: env.CreatedAt.String(), CreatedAt: env.CreatedAt.String(),
UpdatedAt: env.UpdatedAt.String(), UpdatedAt: env.UpdatedAt.String(),
ZitiID: env.ZitiIdentityId, ZitiIdentityID: env.ZitiIdentityId,
}) })
} }
return metadata.NewListEnvironmentsOK().WithPayload(out) return metadata.NewListEnvironmentsOK().WithPayload(out)

View File

@ -20,14 +20,23 @@ type Environment struct {
// active // active
Active bool `json:"active,omitempty"` Active bool `json:"active,omitempty"`
// address
Address string `json:"address,omitempty"`
// created at // created at
CreatedAt string `json:"createdAt,omitempty"` CreatedAt string `json:"createdAt,omitempty"`
// description
Description string `json:"description,omitempty"`
// host
Host string `json:"host,omitempty"`
// updated at // updated at
UpdatedAt string `json:"updatedAt,omitempty"` UpdatedAt string `json:"updatedAt,omitempty"`
// ziti Id // ziti identity Id
ZitiID string `json:"zitiId,omitempty"` ZitiIdentityID string `json:"zitiIdentityId,omitempty"`
} }
// Validate validates this environment // Validate validates this environment

View File

@ -295,13 +295,22 @@ func init() {
"active": { "active": {
"type": "boolean" "type": "boolean"
}, },
"address": {
"type": "string"
},
"createdAt": { "createdAt": {
"type": "string" "type": "string"
}, },
"description": {
"type": "string"
},
"host": {
"type": "string"
},
"updatedAt": { "updatedAt": {
"type": "string" "type": "string"
}, },
"zitiId": { "zitiIdentityId": {
"type": "string" "type": "string"
} }
} }
@ -660,13 +669,22 @@ func init() {
"active": { "active": {
"type": "boolean" "type": "boolean"
}, },
"address": {
"type": "string"
},
"createdAt": { "createdAt": {
"type": "string" "type": "string"
}, },
"description": {
"type": "string"
},
"host": {
"type": "string"
},
"updatedAt": { "updatedAt": {
"type": "string" "type": "string"
}, },
"zitiId": { "zitiIdentityId": {
"type": "string" "type": "string"
} }
} }

View File

@ -180,7 +180,13 @@ definitions:
environment: environment:
type: object type: object
properties: properties:
zitiId: description:
type: string
host:
type: string
address:
type: string
zitiIdentityId:
type: string type: string
active: active:
type: boolean type: boolean

View File

@ -7,8 +7,8 @@ const Environments = (props) => {
const columns = [ const columns = [
{ {
name: 'Ziti ID', name: 'Ziti Identity',
selector: row => row.zitiId, selector: row => row.zitiIdentityId,
sortable: true, sortable: true,
}, },
{ {

View File

@ -28,7 +28,10 @@
* @typedef environment * @typedef environment
* @memberof module:types * @memberof module:types
* *
* @property {string} zitiId * @property {string} description
* @property {string} host
* @property {string} address
* @property {string} zitiIdentityId
* @property {boolean} active * @property {boolean} active
* @property {string} createdAt * @property {string} createdAt
* @property {string} updatedAt * @property {string} updatedAt