Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/topologysync/topologysync_describe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ func TestTopologySyncDescribeErrors(t *testing.T) {

expectedTableCall := []printer.TableData{
{
Header: []string{"Id", "Name", "Identifier", "Status", "Components", "Relations", "Errors"},
Header: []string{"Id", "Name", "Identifier", "Components", "Relations", "Errors"},
Data: [][]interface{}{
{Topo1.NodeId, Topo1.Name, "-", Topo1.Status, "+0 -0", "+0 -0", int64(0)},
{Topo1.NodeId, Topo1.Name, "-", "+0 -0", "+0 -0", int64(0)},
},
MissingTableDataMsg: printer.NotFoundMsg{Types: "synchronizations"},
},
Expand Down
3 changes: 1 addition & 2 deletions cmd/topologysync/topologysync_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,13 @@ func FormatSyncTable(streams []stackstate_api.TopologyStreamListItem) printer.Ta
stream.NodeId,
stream.Name,
identifier,
stream.Status,
fmt.Sprintf("+%-4d %5s", stream.CreatedComponents, fmt.Sprintf("-%d", stream.DeletedComponents)),
fmt.Sprintf("+%-4d %5s", stream.CreatedRelations, fmt.Sprintf("-%d", stream.DeletedRelations)),
stream.Errors,
}
}
return printer.TableData{
Header: []string{"Id", "Name", "Identifier", "Status", "Components", "Relations", "Errors"},
Header: []string{"Id", "Name", "Identifier", "Components", "Relations", "Errors"},
Data: data,
MissingTableDataMsg: printer.NotFoundMsg{Types: "synchronizations"},
}
Expand Down
18 changes: 9 additions & 9 deletions cmd/topologysync/topologysync_list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (
)

var (
Topo1 = stackstate_api.NewTopologyStreamListItem(int64(23), "Topo 1", 0, 0, 0, 0, 0, stackstate_api.TOPOLOGYSYNCSTATUS_RUNNING)
Topo2 = stackstate_api.NewTopologyStreamListItem(5, "Topo 2", 23, 5, 23, 5, 0, stackstate_api.TOPOLOGYSYNCSTATUS_DELETING)
Topo1 = stackstate_api.NewTopologyStreamListItem(int64(23), "Topo 1", 0, 0, 0, 0, 0)
Topo2 = stackstate_api.NewTopologyStreamListItem(5, "Topo 2", 23, 5, 23, 5, 0)

Topo3 = stackstate_api.NewTopologyStreamListItem(13, "Topo 3", 12345, 23, 23, 12345, 1, stackstate_api.TOPOLOGYSYNCSTATUS_DELETE_FAILED)
Topo3 = stackstate_api.NewTopologyStreamListItem(13, "Topo 3", 12345, 23, 23, 12345, 1)

Topo4 = stackstate_api.NewTopologyStreamListItem(7, "Topo 4", 12345, 12345, 12345, 12345, 23, stackstate_api.TOPOLOGYSYNCSTATUS_RESETTING)
Topo4 = stackstate_api.NewTopologyStreamListItem(7, "Topo 4", 12345, 12345, 12345, 12345, 23)

AllTopos = []stackstate_api.TopologyStreamListItem{*Topo1, *Topo2, *Topo3, *Topo4}

Expand All @@ -31,12 +31,12 @@ func TestTopologySyncListTable(t *testing.T) {

expectedTableCall := []printer.TableData{
{
Header: []string{"Id", "Name", "Identifier", "Status", "Components", "Relations", "Errors"},
Header: []string{"Id", "Name", "Identifier", "Components", "Relations", "Errors"},
Data: [][]interface{}{
{Topo1.NodeId, Topo1.Name, "-", Topo1.Status, "+0 -0", "+0 -0", int64(0)},
{Topo2.NodeId, Topo2.Name, "-", Topo2.Status, "+23 -5", "+23 -5", int64(0)},
{Topo3.NodeId, Topo3.Name, "-", Topo3.Status, "+23 -12345", "+12345 -23", int64(1)},
{Topo4.NodeId, Topo4.Name, "-", Topo4.Status, "+12345 -12345", "+12345 -12345", int64(23)},
{Topo1.NodeId, Topo1.Name, "-", "+0 -0", "+0 -0", int64(0)},
{Topo2.NodeId, Topo2.Name, "-", "+23 -5", "+23 -5", int64(0)},
{Topo3.NodeId, Topo3.Name, "-", "+23 -12345", "+12345 -23", int64(1)},
{Topo4.NodeId, Topo4.Name, "-", "+12345 -12345", "+12345 -12345", int64(23)},
},
MissingTableDataMsg: printer.NotFoundMsg{Types: "synchronizations"},
},
Expand Down
24 changes: 22 additions & 2 deletions generated/stackstate_api/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ api_stackpack.go
api_subject.go
api_subscription.go
api_system_notifications.go
api_timeline.go
api_topic.go
api_topology_synchronization.go
api_traces.go
api_user_authorization.go
api_user_profile.go
api_user_session.go
client.go
Expand Down Expand Up @@ -81,6 +83,7 @@ docs/ComponentHighlightMetricSection.md
docs/ComponentHighlightMetricSectionAllOf.md
docs/ComponentNotFoundError.md
docs/ComponentQuery.md
docs/ComponentViewArguments.md
docs/CreateSubject.md
docs/DataUnavailable.md
docs/DependencyDirection.md
Expand All @@ -100,6 +103,7 @@ docs/EventCategoryBucket.md
docs/EventComponent.md
docs/EventCursor.md
docs/EventElement.md
docs/EventFilters.md
docs/EventItemsWithTotal.md
docs/EventListRequest.md
docs/EventNotFoundError.md
Expand Down Expand Up @@ -297,6 +301,7 @@ docs/PromSeriesEnvelope.md
docs/PromVector.md
docs/PromVectorResult.md
docs/ProvisionResponse.md
docs/QueryViewArguments.md
docs/ReleaseStatus.md
docs/RequestError.md
docs/RequestValidationError.md
Expand Down Expand Up @@ -359,6 +364,13 @@ docs/TeamsChannelRefId.md
docs/TeamsChannelWriteSchema.md
docs/TeamsNotificationChannel.md
docs/TeamsNotificationChannelAllOf.md
docs/TimelineApi.md
docs/TimelineSummary.md
docs/TimelineSummaryError.md
docs/TimelineSummaryEventBucket.md
docs/TimelineSummaryHealthChange.md
docs/TimelineSummaryRequest.md
docs/TimelineSummaryRequestArguments.md
docs/TooManyActiveQueries.md
docs/TooManyTopologyResults.md
docs/Topic.md
Expand All @@ -373,7 +385,6 @@ docs/TopologyStreamListItem.md
docs/TopologyStreamListItemWithErrorDetails.md
docs/TopologyStreamMetrics.md
docs/TopologySyncError.md
docs/TopologySyncStatus.md
docs/TopologySynchronizationApi.md
docs/TopologyTimeOutOfRange.md
docs/Trace.md
Expand All @@ -391,6 +402,7 @@ docs/Traces.md
docs/TracesApi.md
docs/UnlicensedSubscription.md
docs/UnmatchedCheckState.md
docs/UserAuthorizationApi.md
docs/UserNameMismatchError.md
docs/UserNotFoundError.md
docs/UserNotLoggedInError.md
Expand Down Expand Up @@ -444,6 +456,7 @@ model_component_highlight_metric_section.go
model_component_highlight_metric_section_all_of.go
model_component_not_found_error.go
model_component_query.go
model_component_view_arguments.go
model_create_subject.go
model_data_unavailable.go
model_dependency_direction.go
Expand All @@ -461,6 +474,7 @@ model_event_category_bucket.go
model_event_component.go
model_event_cursor.go
model_event_element.go
model_event_filters.go
model_event_items_with_total.go
model_event_list_request.go
model_event_not_found_error.go
Expand Down Expand Up @@ -644,6 +658,7 @@ model_prom_series_envelope.go
model_prom_vector.go
model_prom_vector_result.go
model_provision_response.go
model_query_view_arguments.go
model_release_status.go
model_request_error.go
model_request_validation_error.go
Expand Down Expand Up @@ -699,6 +714,12 @@ model_teams_channel_ref_id.go
model_teams_channel_write_schema.go
model_teams_notification_channel.go
model_teams_notification_channel_all_of.go
model_timeline_summary.go
model_timeline_summary_error.go
model_timeline_summary_event_bucket.go
model_timeline_summary_health_change.go
model_timeline_summary_request.go
model_timeline_summary_request_arguments.go
model_too_many_active_queries.go
model_too_many_topology_results.go
model_topic.go
Expand All @@ -712,7 +733,6 @@ model_topology_stream_list_item.go
model_topology_stream_list_item_with_error_details.go
model_topology_stream_metrics.go
model_topology_sync_error.go
model_topology_sync_status.go
model_topology_time_out_of_range.go
model_trace.go
model_trace_api_error.go
Expand Down
12 changes: 11 additions & 1 deletion generated/stackstate_api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ Class | Method | HTTP request | Description
*SubscriptionApi* | [**GetSubscription**](docs/SubscriptionApi.md#getsubscription) | **Get** /subscription | Get subscription info
*SubscriptionApi* | [**PostSubscription**](docs/SubscriptionApi.md#postsubscription) | **Post** /subscription | Submit a new license to update the subscription
*SystemNotificationsApi* | [**AllSystemNotifications**](docs/SystemNotificationsApi.md#allsystemnotifications) | **Get** /system/notifications | Overview of system notifications
*TimelineApi* | [**GetTimelineSummary**](docs/TimelineApi.md#gettimelinesummary) | **Post** /timeline/summary | Timeline summary
*TopicApi* | [**Describe**](docs/TopicApi.md#describe) | **Get** /topic/{topic} | Describe a topic
*TopicApi* | [**List**](docs/TopicApi.md#list) | **Get** /topic | List topics
*TopologySynchronizationApi* | [**GetTopologySynchronizationStreamById**](docs/TopologySynchronizationApi.md#gettopologysynchronizationstreambyid) | **Get** /synchronization/topology/streams/sync | Overview of a specific Topology Stream, queried by node id or sync identifier
Expand All @@ -225,6 +226,7 @@ Class | Method | HTTP request | Description
*TracesApi* | [**SuggestionsAttributeName**](docs/TracesApi.md#suggestionsattributename) | **Get** /traces/spans/fields/attributes | Suggestions for attribute names
*TracesApi* | [**SuggestionsAttributeValue**](docs/TracesApi.md#suggestionsattributevalue) | **Get** /traces/spans/fields/attributes/{attributeName}/values | Suggestions for attribute values
*TracesApi* | [**SuggestionsFieldValues**](docs/TracesApi.md#suggestionsfieldvalues) | **Get** /traces/spans/fields/{field}/values | Suggestions for span fields
*UserAuthorizationApi* | [**GetUserAuthorizationFor**](docs/UserAuthorizationApi.md#getuserauthorizationfor) | **Get** /user/authorization/for | Is the current user authorized for the provided permission
*UserProfileApi* | [**GetCurrentUserProfile**](docs/UserProfileApi.md#getcurrentuserprofile) | **Get** /user/profile | Get current user profile
*UserProfileApi* | [**SaveCurrentUserProfile**](docs/UserProfileApi.md#savecurrentuserprofile) | **Put** /user/profile | Save current user profile
*UserSessionApi* | [**GetUserSessionAssumedRole**](docs/UserSessionApi.md#getusersessionassumedrole) | **Get** /user/session/assumedRole | Get the assumed a role for the current session
Expand Down Expand Up @@ -272,6 +274,7 @@ Class | Method | HTTP request | Description
- [ComponentHighlightMetricSectionAllOf](docs/ComponentHighlightMetricSectionAllOf.md)
- [ComponentNotFoundError](docs/ComponentNotFoundError.md)
- [ComponentQuery](docs/ComponentQuery.md)
- [ComponentViewArguments](docs/ComponentViewArguments.md)
- [CreateSubject](docs/CreateSubject.md)
- [DataUnavailable](docs/DataUnavailable.md)
- [DependencyDirection](docs/DependencyDirection.md)
Expand All @@ -289,6 +292,7 @@ Class | Method | HTTP request | Description
- [EventComponent](docs/EventComponent.md)
- [EventCursor](docs/EventCursor.md)
- [EventElement](docs/EventElement.md)
- [EventFilters](docs/EventFilters.md)
- [EventItemsWithTotal](docs/EventItemsWithTotal.md)
- [EventListRequest](docs/EventListRequest.md)
- [EventNotFoundError](docs/EventNotFoundError.md)
Expand Down Expand Up @@ -472,6 +476,7 @@ Class | Method | HTTP request | Description
- [PromVector](docs/PromVector.md)
- [PromVectorResult](docs/PromVectorResult.md)
- [ProvisionResponse](docs/ProvisionResponse.md)
- [QueryViewArguments](docs/QueryViewArguments.md)
- [ReleaseStatus](docs/ReleaseStatus.md)
- [RequestError](docs/RequestError.md)
- [RequestValidationError](docs/RequestValidationError.md)
Expand Down Expand Up @@ -527,6 +532,12 @@ Class | Method | HTTP request | Description
- [TeamsChannelWriteSchema](docs/TeamsChannelWriteSchema.md)
- [TeamsNotificationChannel](docs/TeamsNotificationChannel.md)
- [TeamsNotificationChannelAllOf](docs/TeamsNotificationChannelAllOf.md)
- [TimelineSummary](docs/TimelineSummary.md)
- [TimelineSummaryError](docs/TimelineSummaryError.md)
- [TimelineSummaryEventBucket](docs/TimelineSummaryEventBucket.md)
- [TimelineSummaryHealthChange](docs/TimelineSummaryHealthChange.md)
- [TimelineSummaryRequest](docs/TimelineSummaryRequest.md)
- [TimelineSummaryRequestArguments](docs/TimelineSummaryRequestArguments.md)
- [TooManyActiveQueries](docs/TooManyActiveQueries.md)
- [TooManyTopologyResults](docs/TooManyTopologyResults.md)
- [Topic](docs/Topic.md)
Expand All @@ -540,7 +551,6 @@ Class | Method | HTTP request | Description
- [TopologyStreamListItemWithErrorDetails](docs/TopologyStreamListItemWithErrorDetails.md)
- [TopologyStreamMetrics](docs/TopologyStreamMetrics.md)
- [TopologySyncError](docs/TopologySyncError.md)
- [TopologySyncStatus](docs/TopologySyncStatus.md)
- [TopologyTimeOutOfRange](docs/TopologyTimeOutOfRange.md)
- [Trace](docs/Trace.md)
- [TraceApiError](docs/TraceApiError.md)
Expand Down
Loading