diff --git a/controller/environmentDetail.go b/controller/environmentDetail.go index 604eea41..7b31a33d 100644 --- a/controller/environmentDetail.go +++ b/controller/environmentDetail.go @@ -76,7 +76,7 @@ func (h *environmentDetailHandler) Handle(params metadata.GetEnvironmentDetailPa FrontendEndpoint: feEndpoint, BackendProxyEndpoint: beProxyEndpoint, Reserved: shr.Reserved, - SparkData: sparkData, + Activity: sparkData, CreatedAt: shr.CreatedAt.UnixMilli(), UpdatedAt: shr.UpdatedAt.UnixMilli(), }) diff --git a/controller/shareDetail.go b/controller/shareDetail.go index 43b0020b..096f67f3 100644 --- a/controller/shareDetail.go +++ b/controller/shareDetail.go @@ -77,7 +77,7 @@ func (h *shareDetailHandler) Handle(params metadata.GetShareDetailParams, princi FrontendEndpoint: feEndpoint, BackendProxyEndpoint: beProxyEndpoint, Reserved: shr.Reserved, - SparkData: sparkData, + Activity: sparkData, CreatedAt: shr.CreatedAt.UnixMilli(), UpdatedAt: shr.UpdatedAt.UnixMilli(), }) diff --git a/rest_model_zrok/share.go b/rest_model_zrok/share.go index 16563a1f..983c11c6 100644 --- a/rest_model_zrok/share.go +++ b/rest_model_zrok/share.go @@ -18,6 +18,9 @@ import ( // swagger:model share type Share struct { + // activity + Activity SparkData `json:"activity,omitempty"` + // backend mode BackendMode string `json:"backendMode,omitempty"` @@ -39,9 +42,6 @@ type Share struct { // share mode ShareMode string `json:"shareMode,omitempty"` - // spark data - SparkData SparkData `json:"sparkData,omitempty"` - // token Token string `json:"token,omitempty"` @@ -56,7 +56,7 @@ type Share struct { func (m *Share) Validate(formats strfmt.Registry) error { var res []error - if err := m.validateSparkData(formats); err != nil { + if err := m.validateActivity(formats); err != nil { res = append(res, err) } @@ -66,16 +66,16 @@ func (m *Share) Validate(formats strfmt.Registry) error { return nil } -func (m *Share) validateSparkData(formats strfmt.Registry) error { - if swag.IsZero(m.SparkData) { // not required +func (m *Share) validateActivity(formats strfmt.Registry) error { + if swag.IsZero(m.Activity) { // not required return nil } - if err := m.SparkData.Validate(formats); err != nil { + if err := m.Activity.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sparkData") + return ve.ValidateName("activity") } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sparkData") + return ce.ValidateName("activity") } return err } @@ -87,7 +87,7 @@ func (m *Share) validateSparkData(formats strfmt.Registry) error { func (m *Share) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error - if err := m.contextValidateSparkData(ctx, formats); err != nil { + if err := m.contextValidateActivity(ctx, formats); err != nil { res = append(res, err) } @@ -97,13 +97,13 @@ func (m *Share) ContextValidate(ctx context.Context, formats strfmt.Registry) er return nil } -func (m *Share) contextValidateSparkData(ctx context.Context, formats strfmt.Registry) error { +func (m *Share) contextValidateActivity(ctx context.Context, formats strfmt.Registry) error { - if err := m.SparkData.ContextValidate(ctx, formats); err != nil { + if err := m.Activity.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sparkData") + return ve.ValidateName("activity") } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sparkData") + return ce.ValidateName("activity") } return err } diff --git a/rest_server_zrok/embedded_spec.go b/rest_server_zrok/embedded_spec.go index 30b8845f..d41988ff 100644 --- a/rest_server_zrok/embedded_spec.go +++ b/rest_server_zrok/embedded_spec.go @@ -1266,6 +1266,9 @@ func init() { "share": { "type": "object", "properties": { + "activity": { + "$ref": "#/definitions/sparkData" + }, "backendMode": { "type": "string" }, @@ -1287,9 +1290,6 @@ func init() { "shareMode": { "type": "string" }, - "sparkData": { - "$ref": "#/definitions/sparkData" - }, "token": { "type": "string" }, @@ -2713,6 +2713,9 @@ func init() { "share": { "type": "object", "properties": { + "activity": { + "$ref": "#/definitions/sparkData" + }, "backendMode": { "type": "string" }, @@ -2734,9 +2737,6 @@ func init() { "shareMode": { "type": "string" }, - "sparkData": { - "$ref": "#/definitions/sparkData" - }, "token": { "type": "string" }, diff --git a/specs/zrok.yml b/specs/zrok.yml index a8df51fe..39fe9033 100644 --- a/specs/zrok.yml +++ b/specs/zrok.yml @@ -844,7 +844,7 @@ definitions: type: string reserved: type: boolean - sparkData: + activity: $ref: "#/definitions/sparkData" createdAt: type: integer diff --git a/ui/src/api/types.js b/ui/src/api/types.js index 50548bb4..09093d0e 100644 --- a/ui/src/api/types.js +++ b/ui/src/api/types.js @@ -200,7 +200,7 @@ * @property {string} frontendEndpoint * @property {string} backendProxyEndpoint * @property {boolean} reserved - * @property {module:types.sparkData} sparkData + * @property {module:types.sparkData} activity * @property {number} createdAt * @property {number} updatedAt */ diff --git a/ui/src/console/detail/environment/SharesTab.js b/ui/src/console/detail/environment/SharesTab.js index d7293eef..a0926bce 100644 --- a/ui/src/console/detail/environment/SharesTab.js +++ b/ui/src/console/detail/environment/SharesTab.js @@ -47,7 +47,7 @@ const SharesTab = (props) => { grow: 0.5, cell: row => { return - + v.rx ? v.rx : 0} stroke={"#231069"} fill={"#04adef"} isAnimationActive={false} dot={false} /> v.tx ? v.tx * -1 : 0} stroke={"#231069"} fill={"#9BF316"} isAnimationActive={false} dot={false} /> diff --git a/ui/src/console/detail/share/ShareDetail.js b/ui/src/console/detail/share/ShareDetail.js index 743418a6..b942cd3e 100644 --- a/ui/src/console/detail/share/ShareDetail.js +++ b/ui/src/console/detail/share/ShareDetail.js @@ -40,7 +40,7 @@ const ShareDetail = (props) => { }, [props.selection]); const customProperties = { - sparkData: row => ( + activity: row => ( v.rx ? v.rx : 0} stroke={"#231069"} fill={"#04adef"} isAnimationActive={false} dot={false} />