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
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)

View File

@ -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

View File

@ -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"
}
}

View File

@ -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

View File

@ -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,
},
{

View File

@ -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