From 0127f76a7d2baa124676cecade92b1d8b68ef5a0 Mon Sep 17 00:00:00 2001 From: JUDIT GRESKOVITS Date: Thu, 30 Mar 2017 15:16:36 +0100 Subject: [PATCH] Generate and add complex services data for topology --- frontend/src/containers/services/topology.js | 11 +- .../mock-states/shared/services-complex.js | 1132 +++++++++++++++++ .../src/mock-states/shared/services-wp.js | 140 ++ frontend/src/mock-states/shared/services.js | 146 +-- .../utils/generate-services-data/generate.js | 144 +++ ui/src/components/topology/topology-graph.js | 6 +- 6 files changed, 1428 insertions(+), 151 deletions(-) create mode 100644 frontend/src/mock-states/shared/services-complex.js create mode 100644 frontend/src/mock-states/shared/services-wp.js create mode 100644 spikes/utils/generate-services-data/generate.js diff --git a/frontend/src/containers/services/topology.js b/frontend/src/containers/services/topology.js index ce1261ec..69caf738 100644 --- a/frontend/src/containers/services/topology.js +++ b/frontend/src/containers/services/topology.js @@ -2,10 +2,9 @@ import React from 'react'; import { connect } from 'react-redux'; import styled from 'styled-components'; import PropTypes from '@root/prop-types'; -import { colors, breakpoints } from '@ui/shared/constants'; +import { colors } from '@ui/shared/constants'; import { unitcalc } from '@ui/shared/functions'; import { TopologyGraph } from '@ui/components/topology'; -import { LayoutContainer } from '@components/layout'; import ServicesTooltip from '@components/services/tooltip'; import { toggleTooltip } from '@state/actions'; @@ -21,13 +20,9 @@ const StyledBackground = styled.div` background-color: ${colors.base.whiteActive}; `; -const StyledContainer = styled(LayoutContainer)` +const StyledContainer = styled.div` position: relative; - padding: ${unitcalc(4)} 2rem; - - ${breakpoints.large` - padding: ${unitcalc(4)} 0; - `} + padding: ${unitcalc(4)}; `; const Services = (props) => { diff --git a/frontend/src/mock-states/shared/services-complex.js b/frontend/src/mock-states/shared/services-complex.js new file mode 100644 index 00000000..c195199d --- /dev/null +++ b/frontend/src/mock-states/shared/services-complex.js @@ -0,0 +1,1132 @@ +/*eslint-disable */ +export const complexServices = [ + { + "uuid":"primary-consul", + "id":"consul", + "name":"Consul", + "instances":3, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":"primary-nginx", + "id":"nginx", + "name":"Nginx", + "instances":1, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ], + "connections":[ + 21393, + 688632, + 3802, + 211054, + 514555, + 823837, + 728066, + 626040, + 39531, + 338897, + 870461, + 306578, + 557611, + 24764, + 866947, + 521183, + 920500, + 673424, + 752876, + 125936, + 195071, + 101278, + 766252, + 272044, + 579947, + 211151, + 712793, + 831906, + 897694, + 261116, + 246274, + 380300, + 299558, + 303216, + 974334, + 127763, + 437955, + 143274, + 634968, + 431609, + 282549, + 262582, + 418482, + 284724, + 798952, + 308763, + 111726 + ] + }, + { + "uuid":"primary-mongodb", + "id":"mongodb", + "name":"MongoDB", + "instances":3, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":21393, + "id":"accountservice", + "name":"AccountService", + "instances":4, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ], + "connections":[ + "primary-mongodb" + ] + }, + { + "uuid":688632, + "id":"addressservice", + "name":"AddressService", + "instances":5, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":3802, + "id":"bloomreachservice", + "name":"BloomreachService", + "instances":5, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":211054, + "id":"cartservice", + "name":"CartService", + "instances":4, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":514555, + "id":"extra service reported by containerpilot: cartservice-https", + "name":"Extra service reported by ContainerPilot: CartService-HTTPS", + "instances":5, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":823837, + "id":"cctokenizationclientservice", + "name":"CCTokenizationClientService", + "instances":3, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ], + "connections":[ + "primary-mongodb" + ] + }, + { + "uuid":728066, + "id":"checkoutservice", + "name":"CheckoutService", + "instances":4, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":626040, + "id":"colorswatchservice", + "name":"ColorSwatchService", + "instances":5, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":39531, + "id":"emailmarketingservice", + "name":"EmailMarketingService", + "instances":4, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":338897, + "id":"favoriteservice", + "name":"FavoriteService", + "instances":4, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":870461, + "id":"findinstoreservice", + "name":"FindInStoreService", + "instances":4, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ], + "connections":[ + "primary-mongodb" + ] + }, + { + "uuid":306578, + "id":"fitpredictorservice", + "name":"FitpredictorService", + "instances":5, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":557611, + "id":"hidefromcatalogservice", + "name":"HidefromcatalogService", + "instances":5, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":24764, + "id":"internationalcheckoutservice", + "name":"InternationalCheckoutService", + "instances":5, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":866947, + "id":"internationalposervice", + "name":"InternationalPOService", + "instances":4, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":521183, + "id":"internationalshippingservice", + "name":"InternationalShippingService", + "instances":4, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ], + "connections":[ + "primary-mongodb" + ] + }, + { + "uuid":920500, + "id":"inventoryservice", + "name":"InventoryService", + "instances":4, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":673424, + "id":"localizationservice", + "name":"LocalizationService", + "instances":3, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":752876, + "id":"moreaccountservice", + "name":"MoreAccountService", + "instances":4, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":125936, + "id":"navigationservice", + "name":"NavigationService", + "instances":4, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":195071, + "id":"ordercreationjob", + "name":"OrderCreationJob", + "instances":3, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ], + "connections":[ + "primary-mongodb" + ] + }, + { + "uuid":101278, + "id":"orderservice", + "name":"OrderService", + "instances":3, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":766252, + "id":"orderservice", + "name":"OrderService", + "instances":4, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":272044, + "id":"paymentmethodservice", + "name":"PaymentMethodService", + "instances":4, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":579947, + "id":"paymentservice", + "name":"PaymentService", + "instances":3, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":211151, + "id":"paymentservice", + "name":"PaymentService", + "instances":3, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ], + "connections":[ + "primary-mongodb" + ] + }, + { + "uuid":712793, + "id":"priceservice", + "name":"PriceService", + "instances":4, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":831906, + "id":"privatesaleservice", + "name":"PrivatesaleService", + "instances":3, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":897694, + "id":"productarrayservice", + "name":"ProductArrayService", + "instances":5, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":261116, + "id":"productdetailservice", + "name":"ProductDetailService", + "instances":4, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":246274, + "id":"productservice", + "name":"ProductService", + "instances":4, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ], + "connections":[ + "primary-mongodb" + ] + }, + { + "uuid":380300, + "id":"profileservice", + "name":"ProfileService", + "instances":4, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":299558, + "id":"promoservice", + "name":"PromoService", + "instances":3, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":303216, + "id":"promotionservice", + "name":"PromotionService", + "instances":4, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":974334, + "id":"questionanswerservice", + "name":"QuestionanswerService", + "instances":3, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":127763, + "id":"redbaloonservice", + "name":"RedBaloonService", + "instances":4, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ], + "connections":[ + "primary-mongodb" + ] + }, + { + "uuid":437955, + "id":"extra service reported by containerpilot: redbaloonservice-https", + "name":"Extra service reported by ContainerPilot: RedBaloonService-HTTPS", + "instances":4, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":143274, + "id":"reviewsservice", + "name":"ReviewsService", + "instances":5, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":634968, + "id":"searchfacetsservice", + "name":"SearchFacetsService", + "instances":4, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":431609, + "id":"searchindexservice", + "name":"SearchIndexService", + "instances":4, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":282549, + "id":"shoprunnerservice", + "name":"ShopRunnerService", + "instances":5, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ], + "connections":[ + "primary-mongodb" + ] + }, + { + "uuid":262582, + "id":"taxservice", + "name":"TaxService", + "instances":4, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":418482, + "id":"toggleservice", + "name":"ToggleService", + "instances":4, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":284724, + "id":"useraccountservice", + "name":"UserAccountService", + "instances":3, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":798952, + "id":"userauthenticationservice", + "name":"UserAuthenticationService", + "instances":4, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + }, + { + "uuid":308763, + "id":"waitlistoverlayservice", + "name":"WaitlistOverlayService", + "instances":5, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ], + "connections":[ + "primary-mongodb" + ] + }, + { + "uuid":111726, + "id":"waitlistservice", + "name":"WaitlistService", + "instances":3, + "project":"9fcb374d-a267-4c2a-9d9c-ba469b804639", + "metrics":[ + { + "type":"2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset":"crazy-cpu" + }, + { + "type":"dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset":"crazy-disk" + }, + { + "type":"dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset":"crazy-memory" + } + ] + } +]; diff --git a/frontend/src/mock-states/shared/services-wp.js b/frontend/src/mock-states/shared/services-wp.js new file mode 100644 index 00000000..acb9e613 --- /dev/null +++ b/frontend/src/mock-states/shared/services-wp.js @@ -0,0 +1,140 @@ +/*eslint-disable */ +export const wpServices = [{ + "uuid": "081a792c-47e0-4439-924b-2efa9788ae9e", + "id": "nginx", + "name": "Nginx", + "project": "e0ea0c02-55cc-45fe-8064-3e5176a59401", + "instances": 1, + "metrics": [{ + "type": "2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset": "3e6ee79a-7453-4fc6-b9da-7ae1e41138ec" + }, { + "type": "dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset": "4e6ee79a-7453-4fc6-b9da-7ae1e41138ed" + }, { + "type": "dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset": "6e6ee79a-7453-4fc6-b9da-7ae1e41138ed" + }], + "connections": [ + "be227788-74f1-4e5b-a85f-b5c71cbae8d8" + ] +}, { + "uuid": "be227788-74f1-4e5b-a85f-b5c71cbae8d8", + "id": "wordpress", + "name": "Wordpress", + "project": "e0ea0c02-55cc-45fe-8064-3e5176a59401", + "instances": 1, + "metrics": [{ + "type": "2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset": "crazy-cpu" + }, { + "type": "dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset": "crazy-disk" + }, { + "type": "dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset": "crazy-memory" + }], + "connections": [ + "6a0eee76-c019-413b-9d5f-44712b55b993", + "6d31aff4-de1e-4042-a983-fbd23d5c530c", + "4ee4103e-1a52-4099-a48e-01588f597c70" + ] +}, { + "uuid": "6a0eee76-c019-413b-9d5f-44712b55b993", + "id": "nfs", + "name": "NFS", + "project": "e0ea0c02-55cc-45fe-8064-3e5176a59401", + "instances": 1, + "metrics": [{ + "type": "2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset": "3e6ee79a-7453-4fc6-b9da-7ae1e41138ec" + }, { + "type": "dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset": "4e6ee79a-7453-4fc6-b9da-7ae1e41138ed" + }, { + "type": "dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset": "6e6ee79a-7453-4fc6-b9da-7ae1e41138ed" + }] +}, { + "uuid": "6d31aff4-de1e-4042-a983-fbd23d5c530c", + "id": "memcached", + "name": "Memcached", + "project": "e0ea0c02-55cc-45fe-8064-3e5176a59401", + "instances": 5, + "metrics": [{ + "type": "2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset": "3e6ee79a-7453-4fc6-b9da-7ae1e41138ec" + }, { + "type": "dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset": "4e6ee79a-7453-4fc6-b9da-7ae1e41138ed" + }, { + "type": "dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset": "6e6ee79a-7453-4fc6-b9da-7ae1e41138ed" + }] +}, { + "uuid": "4ee4103e-1a52-4099-a48e-01588f597c70", + "id": "percona", + "name": "Percona", + "project": "e0ea0c02-55cc-45fe-8064-3e5176a59401", + "instances": 5, + "metrics": [{ + "type": "2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset": "3e6ee79a-7453-4fc6-b9da-7ae1e41138ec" + }, { + "type": "dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset": "4e6ee79a-7453-4fc6-b9da-7ae1e41138ed" + }, { + "type": "dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset": "6e6ee79a-7453-4fc6-b9da-7ae1e41138ed" + }] +}, { + "uuid": "9572d367-c4ae-4fb1-8ad5-f5e3830e7034", + "id": "primary", + "name": "Primary", + "parent": "4ee4103e-1a52-4099-a48e-01588f597c70", + "project": "e0ea0c02-55cc-45fe-8064-3e5176a59401", + "instances": 1, + "metrics": [{ + "type": "2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset": "3e6ee79a-7453-4fc6-b9da-7ae1e41138ec" + }, { + "type": "dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset": "4e6ee79a-7453-4fc6-b9da-7ae1e41138ed" + }, { + "type": "dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset": "6e6ee79a-7453-4fc6-b9da-7ae1e41138ed" + }] +}, { + "uuid": "c8411ef0-ab39-42cb-a704-d20b170eff31", + "id": "secondaries", + "name": "Secondaries", + "parent": "4ee4103e-1a52-4099-a48e-01588f597c70", + "project": "e0ea0c02-55cc-45fe-8064-3e5176a59401", + "instances": 4, + "metrics": [{ + "type": "2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset": "3e6ee79a-7453-4fc6-b9da-7ae1e41138ec" + }, { + "type": "dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset": "4e6ee79a-7453-4fc6-b9da-7ae1e41138ed" + }, { + "type": "dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset": "6e6ee79a-7453-4fc6-b9da-7ae1e41138ed" + }] +}, { + "uuid": "97c68055-db88-45c9-ad49-f26da4264777", + "id": "consul", + "name": "Consul", + "project": "e0ea0c02-55cc-45fe-8064-3e5176a59401", + "instances": 1, + "metrics": [{ + "type": "2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset": "3e6ee79a-7453-4fc6-b9da-7ae1e41138ec" + }, { + "type": "dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset": "4e6ee79a-7453-4fc6-b9da-7ae1e41138ed" + }, { + "type": "dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset": "6e6ee79a-7453-4fc6-b9da-7ae1e41138ed" + }] +}]; diff --git a/frontend/src/mock-states/shared/services.js b/frontend/src/mock-states/shared/services.js index e1bd203a..4561324c 100644 --- a/frontend/src/mock-states/shared/services.js +++ b/frontend/src/mock-states/shared/services.js @@ -1,4 +1,8 @@ /*eslint-disable */ + +import { complexServices } from './services-complex'; +import { wpServices } from './services-wp'; + export const services = { "ui": { "collapsed": [], @@ -16,143 +20,5 @@ export const services = { "show": false } }, - "data": [{ - "uuid": "081a792c-47e0-4439-924b-2efa9788ae9e", - "id": "nginx", - "name": "Nginx", - "project": "e0ea0c02-55cc-45fe-8064-3e5176a59401", - "instances": 1, - "metrics": [{ - "type": "2aaa237d-42b3-442f-9094-a17aa470014b", - "dataset": "3e6ee79a-7453-4fc6-b9da-7ae1e41138ec" - }, { - "type": "dca08514-72e5-46ce-ad91-e68b3b0914d9", - "dataset": "4e6ee79a-7453-4fc6-b9da-7ae1e41138ed" - }, { - "type": "dca08514-72e5-46ce-ad92-e68b3b0914d4", - "dataset": "6e6ee79a-7453-4fc6-b9da-7ae1e41138ed" - }], - "connections": [ - "be227788-74f1-4e5b-a85f-b5c71cbae8d8" - ] - }, { - "uuid": "be227788-74f1-4e5b-a85f-b5c71cbae8d8", - "id": "wordpress", - "name": "Wordpress", - "project": "e0ea0c02-55cc-45fe-8064-3e5176a59401", - "instances": 1, - "metrics": [{ - "type": "2aaa237d-42b3-442f-9094-a17aa470014b", - "dataset": "crazy-cpu" - }, { - "type": "dca08514-72e5-46ce-ad91-e68b3b0914d9", - "dataset": "crazy-disk" - }, { - "type": "dca08514-72e5-46ce-ad92-e68b3b0914d4", - "dataset": "crazy-memory" - }], - "connections": [ - "6a0eee76-c019-413b-9d5f-44712b55b993", - "6d31aff4-de1e-4042-a983-fbd23d5c530c", - "4ee4103e-1a52-4099-a48e-01588f597c70" - ] - }, { - "uuid": "6a0eee76-c019-413b-9d5f-44712b55b993", - "id": "nfs", - "name": "NFS", - "project": "e0ea0c02-55cc-45fe-8064-3e5176a59401", - "instances": 1, - "metrics": [{ - "type": "2aaa237d-42b3-442f-9094-a17aa470014b", - "dataset": "3e6ee79a-7453-4fc6-b9da-7ae1e41138ec" - }, { - "type": "dca08514-72e5-46ce-ad91-e68b3b0914d9", - "dataset": "4e6ee79a-7453-4fc6-b9da-7ae1e41138ed" - }, { - "type": "dca08514-72e5-46ce-ad92-e68b3b0914d4", - "dataset": "6e6ee79a-7453-4fc6-b9da-7ae1e41138ed" - }] - }, { - "uuid": "6d31aff4-de1e-4042-a983-fbd23d5c530c", - "id": "memcached", - "name": "Memcached", - "project": "e0ea0c02-55cc-45fe-8064-3e5176a59401", - "instances": 5, - "metrics": [{ - "type": "2aaa237d-42b3-442f-9094-a17aa470014b", - "dataset": "3e6ee79a-7453-4fc6-b9da-7ae1e41138ec" - }, { - "type": "dca08514-72e5-46ce-ad91-e68b3b0914d9", - "dataset": "4e6ee79a-7453-4fc6-b9da-7ae1e41138ed" - }, { - "type": "dca08514-72e5-46ce-ad92-e68b3b0914d4", - "dataset": "6e6ee79a-7453-4fc6-b9da-7ae1e41138ed" - }] - }, { - "uuid": "4ee4103e-1a52-4099-a48e-01588f597c70", - "id": "percona", - "name": "Percona", - "project": "e0ea0c02-55cc-45fe-8064-3e5176a59401", - "instances": 5, - "metrics": [{ - "type": "2aaa237d-42b3-442f-9094-a17aa470014b", - "dataset": "3e6ee79a-7453-4fc6-b9da-7ae1e41138ec" - }, { - "type": "dca08514-72e5-46ce-ad91-e68b3b0914d9", - "dataset": "4e6ee79a-7453-4fc6-b9da-7ae1e41138ed" - }, { - "type": "dca08514-72e5-46ce-ad92-e68b3b0914d4", - "dataset": "6e6ee79a-7453-4fc6-b9da-7ae1e41138ed" - }] - }, { - "uuid": "9572d367-c4ae-4fb1-8ad5-f5e3830e7034", - "id": "primary", - "name": "Primary", - "parent": "4ee4103e-1a52-4099-a48e-01588f597c70", - "project": "e0ea0c02-55cc-45fe-8064-3e5176a59401", - "instances": 1, - "metrics": [{ - "type": "2aaa237d-42b3-442f-9094-a17aa470014b", - "dataset": "3e6ee79a-7453-4fc6-b9da-7ae1e41138ec" - }, { - "type": "dca08514-72e5-46ce-ad91-e68b3b0914d9", - "dataset": "4e6ee79a-7453-4fc6-b9da-7ae1e41138ed" - }, { - "type": "dca08514-72e5-46ce-ad92-e68b3b0914d4", - "dataset": "6e6ee79a-7453-4fc6-b9da-7ae1e41138ed" - }] - }, { - "uuid": "c8411ef0-ab39-42cb-a704-d20b170eff31", - "id": "secondaries", - "name": "Secondaries", - "parent": "4ee4103e-1a52-4099-a48e-01588f597c70", - "project": "e0ea0c02-55cc-45fe-8064-3e5176a59401", - "instances": 4, - "metrics": [{ - "type": "2aaa237d-42b3-442f-9094-a17aa470014b", - "dataset": "3e6ee79a-7453-4fc6-b9da-7ae1e41138ec" - }, { - "type": "dca08514-72e5-46ce-ad91-e68b3b0914d9", - "dataset": "4e6ee79a-7453-4fc6-b9da-7ae1e41138ed" - }, { - "type": "dca08514-72e5-46ce-ad92-e68b3b0914d4", - "dataset": "6e6ee79a-7453-4fc6-b9da-7ae1e41138ed" - }] - }, { - "uuid": "97c68055-db88-45c9-ad49-f26da4264777", - "id": "consul", - "name": "Consul", - "project": "e0ea0c02-55cc-45fe-8064-3e5176a59401", - "instances": 1, - "metrics": [{ - "type": "2aaa237d-42b3-442f-9094-a17aa470014b", - "dataset": "3e6ee79a-7453-4fc6-b9da-7ae1e41138ec" - }, { - "type": "dca08514-72e5-46ce-ad91-e68b3b0914d9", - "dataset": "4e6ee79a-7453-4fc6-b9da-7ae1e41138ed" - }, { - "type": "dca08514-72e5-46ce-ad92-e68b3b0914d4", - "dataset": "6e6ee79a-7453-4fc6-b9da-7ae1e41138ed" - }] - }] -} \ No newline at end of file + "data": wpServices.concat(complexServices) +} diff --git a/spikes/utils/generate-services-data/generate.js b/spikes/utils/generate-services-data/generate.js new file mode 100644 index 00000000..2bdcf40b --- /dev/null +++ b/spikes/utils/generate-services-data/generate.js @@ -0,0 +1,144 @@ +// Please feel free to either duplicate this +// ...or make it more dynamic to suit your purposes :) + +const primaryList = `Consul +Nginx +MongoDB`; + +const list = `AccountService +AddressService +BloomreachService +CartService +Extra service reported by ContainerPilot: CartService-HTTPS +CCTokenizationClientService +CheckoutService +ColorSwatchService +EmailMarketingService +FavoriteService +FindInStoreService +FitpredictorService +HidefromcatalogService +InternationalCheckoutService +InternationalPOService +InternationalShippingService +InventoryService +LocalizationService +MoreAccountService +NavigationService +OrderCreationJob +OrderService +OrderService +PaymentMethodService +PaymentService +PaymentService +PriceService +PrivatesaleService +ProductArrayService +ProductDetailService +ProductService +ProfileService +PromoService +PromotionService +QuestionanswerService +RedBaloonService +Extra service reported by ContainerPilot: RedBaloonService-HTTPS +ReviewsService +SearchFacetsService +SearchIndexService +ShopRunnerService +TaxService +ToggleService +UserAccountService +UserAuthenticationService +WaitlistOverlayService +WaitlistService`; + +const primaryServices = primaryList.split('\n'); +const servicesList = list.split('\n'); + +/* +{ + "uuid": "be227788-74f1-4e5b-a85f-b5c71cbae8d8", + "id": "wordpress", + "name": "Wordpress", + "project": "e0ea0c02-55cc-45fe-8064-3e5176a59401", + "instances": 1, + "metrics": [{ + "type": "2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset": "crazy-cpu" + }, { + "type": "dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset": "crazy-disk" + }, { + "type": "dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset": "crazy-memory" + }], + "connections": [ + "6a0eee76-c019-413b-9d5f-44712b55b993", + "6d31aff4-de1e-4042-a983-fbd23d5c530c", + "4ee4103e-1a52-4099-a48e-01588f597c70" + ] + } +*/ + +const mappedServicesList = servicesList.map((service, index) => { + const uuid = Math.round(Math.random()*1000000); + const connections = index%5 ? null : ['primary-mongodb']; + const instances = 3 + Math.round(Math.random()*2); + + const s = { + uuid: uuid, + id: service.toLowerCase(), + name: service, + instances: instances, + project: '9fcb374d-a267-4c2a-9d9c-ba469b804639', + 'metrics': [{ + "type": "2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset": "crazy-cpu" + }, { + "type": "dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset": "crazy-disk" + }, { + "type": "dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset": "crazy-memory" + }] + }; + + if(connections) { + s.connections = connections; + } + return s; +}); + +const mappedPrimaryServicesList = primaryServices.map((service, index) => { + const uuid = `primary-${service.toLowerCase()}`; + const connections = uuid === 'primary-nginx' ? + mappedServicesList.map(s => s.uuid) : null; + const instances = uuid === 'primary-nginx' ? 1 : 3; + + const s = { + uuid: uuid, + id: service.toLowerCase(), + name: service, + instances: instances, + project: '9fcb374d-a267-4c2a-9d9c-ba469b804639', + 'metrics': [{ + "type": "2aaa237d-42b3-442f-9094-a17aa470014b", + "dataset": "crazy-cpu" + }, { + "type": "dca08514-72e5-46ce-ad91-e68b3b0914d9", + "dataset": "crazy-disk" + }, { + "type": "dca08514-72e5-46ce-ad92-e68b3b0914d4", + "dataset": "crazy-memory" + }] + }; + if(connections) { + s.connections = connections; + } + return s; +}); + +const meow = mappedPrimaryServicesList.concat(mappedServicesList); + +console.log('meow = ', JSON.stringify(meow)); diff --git a/ui/src/components/topology/topology-graph.js b/ui/src/components/topology/topology-graph.js index f669ab21..b7257508 100644 --- a/ui/src/components/topology/topology-graph.js +++ b/ui/src/components/topology/topology-graph.js @@ -11,12 +11,12 @@ import React from 'react'; const StyledSvg = styled.svg` width: 100%; - height: 860px; + height: 1400px; `; const svgSize = { - width: 1024, - height: 860 + width: 2400, + height: 1400 }; let dragInfo = {