{"attributes":{"description":"Force layout vega graph where link force distance between peers is block propagation","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}"},"optionsJSON":"{\"useMargins\":true,\"syncColors\":false,\"hidePanelTitles\":false}","panelsJSON":"[{\"version\":\"7.14.1\",\"type\":\"visualization\",\"gridData\":{\"x\":0,\"y\":0,\"w\":48,\"h\":42,\"i\":\"c7e4001d-38c9-4fa0-a488-e069dd50d274\"},\"panelIndex\":\"c7e4001d-38c9-4fa0-a488-e069dd50d274\",\"embeddableConfig\":{\"savedVis\":{\"title\":\"Block propagation\",\"description\":\"\",\"type\":\"vega\",\"params\":{\"spec\":\"{\\n  $schema: https://vega.github.io/schema/vega/v5.json\\n  title: Node block propagation\\n\\n\\n  \\\"signals\\\": [\\n    { \\\"name\\\": \\\"cx\\\", \\\"update\\\": \\\"width / 2\\\" },\\n    { \\\"name\\\": \\\"cy\\\", \\\"update\\\": \\\"height / 2\\\" },\\n    { \\\"name\\\": \\\"nodeRadius\\\", \\\"value\\\": 10,\\n      \\\"bind\\\": {\\\"input\\\": \\\"range\\\", \\\"min\\\": 1, \\\"max\\\": 20, \\\"step\\\": 1} },\\n    { \\\"name\\\": \\\"propagationMultiplier\\\", \\\"value\\\": 1,\\n      \\\"bind\\\": {\\\"input\\\": \\\"range\\\", \\\"min\\\": 1, \\\"max\\\": 100, \\\"step\\\": 1} },\\n  ],\\n\\n  data: [\\n    {\\n    \\n      name: \\\"node-data\\\",\\n      url: {\\n        index: lotus-pubsub\\n        body: {\\n          size: 0,\\n          aggs: {\\n            unique_peerID: {\\n              terms: { \\n                field: \\\"peerID\\\",\\n                size: 10000\\n              },\\n            }\\n          }\\n        }\\n      },\\n      format: {\\\"property\\\": \\\"aggregations.unique_peerID.buckets\\\"},\\n      transform: [\\n        {\\n          \\\"type\\\": \\\"project\\\",\\n          \\\"fields\\\": [\\\"key\\\"],\\n          \\\"as\\\": [\\\"peerID\\\"]\\n        },\\n        {\\n          type: \\\"identifier\\\",\\n          as: \\\"id\\\"\\n        },\\n        {\\n          type: \\\"formula\\\",\\n          expr: \\\"datum.id - 1\\\",\\n          as: \\\"index\\\"\\n        }\\n      ]\\n    },\\n      {\\n      name: \\\"published-message-data\\\",\\n      url: {\\n        index: lotus-pubsub\\n        body: {\\n          size: 10000,\\n          query: {\\n            bool: {\\n              must: [\\n                {\\n                  match: {\\n                    type: 0\\n                  }\\n                }\\n              ]\\n            }\\n          }\\n        }\\n      },\\n      format: {\\\"property\\\": \\\"hits.hits\\\"},\\n    },\\n    {\\n      name: \\\"link-data\\\",\\n      url: {\\n        index: lotus-pubsub\\n        body: {\\n          size: 10000,\\n          query: {\\n            bool: {\\n              must: [\\n                {\\n                  match: {\\n                    type: 1\\n                  }\\n                }\\n              ]\\n            }\\n          }\\n        }\\n      },\\n      format: {\\\"property\\\": \\\"hits.hits\\\"},\\n      transform: [\\n        {\\n          \\\"type\\\": \\\"lookup\\\",\\n          \\\"from\\\": \\\"published-message-data\\\",\\n          \\\"key\\\": \\\"_source.publishMessage.messageID\\\",\\n          \\\"fields\\\": [\\\"_source.deliverMessage.messageID\\\"],\\n          \\\"as\\\": [\\\"publishedMessage\\\"],\\n        },\\n        {\\n          \\\"type\\\": \\\"filter\\\",\\n          \\\"expr\\\": \\\"datum.publishedMessage != null\\\"\\n        },\\n        {\\n          \\\"type\\\": \\\"lookup\\\",\\n          \\\"from\\\": \\\"node-data\\\",\\n          \\\"key\\\": \\\"peerID\\\",\\n          \\\"fields\\\": [\\\"_source.peerID\\\"],\\n          \\\"as\\\": [\\\"source\\\"],\\n        },\\n        {\\n          \\\"type\\\": \\\"lookup\\\",\\n          \\\"from\\\": \\\"node-data\\\",\\n          \\\"key\\\": \\\"peerID\\\",\\n          \\\"fields\\\": [\\\"publishedMessage._source.peerID\\\"],\\n          \\\"as\\\": [\\\"target\\\"],\\n        },\\n        {\\n          \\\"type\\\": \\\"formula\\\",\\n          \\\"expr\\\": \\\"(datum._source.timestamp - datum.publishedMessage._source.timestamp) * propagationMultiplier\\\",\\n          \\\"as\\\": \\\"distance\\\"\\n        },\\n        {\\n          \\\"type\\\": \\\"project\\\",\\n          \\\"fields\\\": [\\\"source.index\\\", \\\"target.index\\\", \\\"distance\\\"]\\n          \\\"as\\\": [\\\"source\\\", \\\"target\\\", \\\"distance\\\"]\\n        },\\n        {\\n          \\\"type\\\": \\\"aggregate\\\",\\n          \\\"ops\\\": [\\\"average\\\"],\\n          \\\"fields\\\": [\\\"distance\\\"],\\n          \\\"groupby\\\": [\\\"source\\\", \\\"target\\\"],\\n          \\\"as\\\": [\\\"distance\\\"]\\n        }\\n      ]\\n    }\\n  ]\\n\\n  scales: [\\n    {\\n      \\\"name\\\": \\\"color\\\",\\n      \\\"type\\\": \\\"ordinal\\\",\\n      \\\"domain\\\": {\\\"data\\\": \\\"node-data\\\", \\\"field\\\": \\\"id\\\"},\\n      \\\"range\\\": {\\\"scheme\\\": \\\"category20c\\\"}\\n    }\\n  ]\\n\\n  marks: [\\n    {\\n      \\\"name\\\": \\\"nodes\\\",\\n      \\\"type\\\": \\\"symbol\\\",\\n      \\\"zindex\\\": 1,\\n      \\n      \\\"encode\\\": {\\n        \\\"enter\\\": {\\n          \\\"fill\\\": {\\\"scale\\\": \\\"color\\\", \\\"field\\\": \\\"id\\\"},\\n          \\\"stroke\\\": {\\\"value\\\": \\\"black\\\"},\\n          \\\"tooltip\\\": {\\\"signal\\\": \\\"{'PeerID': datum.peerID}\\\"}\\n        },\\n        \\\"update\\\": {\\n          \\\"size\\\": {\\\"signal\\\": \\\"2 * nodeRadius * nodeRadius\\\"},\\n          \\\"fill\\\": {\\\"scale\\\": \\\"color\\\", \\\"field\\\": \\\"id\\\"},\\n        },\\n        \\\"hover\\\": { \\\"fill\\\": {\\\"value\\\": \\\"red\\\"} },\\n      },\\n\\n      \\\"from\\\": {\\\"data\\\": \\\"node-data\\\"},\\n      \\\"transform\\\": [\\n        {\\n          \\\"type\\\": \\\"force\\\",\\n          \\\"restart\\\": false,\\n          \\\"static\\\": true,\\n          \\\"signal\\\": \\\"force\\\",\\n          \\\"forces\\\": [\\n            {\\\"force\\\": \\\"link\\\", \\\"links\\\": \\\"link-data\\\", distance: {field: \\\"distance\\\"}},\\n            {\\\"force\\\": \\\"center\\\", \\\"x\\\": {\\\"signal\\\": \\\"cx\\\"}, \\\"y\\\": {\\\"signal\\\": \\\"cy\\\"}},\\n          ]\\n        }\\n      ]\\n    },\\n    {\\n      \\\"type\\\": \\\"path\\\",\\n      \\\"from\\\": {\\\"data\\\": \\\"link-data\\\"},\\n      \\\"encode\\\": {\\n        \\\"enter\\\": {\\n          \\\"tooltip\\\": {\\\"signal\\\": \\\"{'Block propagation': datum.distance}\\\"}\\n        },\\n        \\\"update\\\": {\\n          \\\"stroke\\\": {\\\"value\\\": \\\"#ccc\\\"},\\n          \\\"strokeWidth\\\": {\\\"value\\\": 1.5}\\n        },\\n        \\\"hover\\\": { \\\"stroke\\\": { \\\"value\\\": \\\"#0B33A0\\\" }}\\n      },\\n      \\\"transform\\\": [\\n        {\\n          \\\"type\\\": \\\"linkpath\\\",\\n          \\\"require\\\": {\\\"signal\\\": \\\"force\\\"},\\n          \\\"shape\\\": \\\"line\\\",\\n          \\\"sourceX\\\": \\\"datum.source.x\\\", \\\"sourceY\\\": \\\"datum.source.y\\\",\\n          \\\"targetX\\\": \\\"datum.target.x\\\", \\\"targetY\\\": \\\"datum.target.y\\\"\\n        }\\n      ]\\n    }\\n  ]\\n}\\n\"},\"uiState\":{},\"data\":{\"aggs\":[],\"searchSource\":{\"query\":{\"language\":\"kuery\",\"query\":\"\"},\"filter\":[]}}},\"enhancements\":{}}}]","timeRestore":false,"title":"Peer block propagation","version":1},"coreMigrationVersion":"7.14.1","id":"937b1470-212b-11ec-99f4-75d57f0cd0d8","migrationVersion":{"dashboard":"7.14.0"},"references":[],"type":"dashboard","updated_at":"2021-09-29T13:45:58.342Z","version":"Wzg4NzMsMV0="}
{"excludedObjects":[],"excludedObjectsCount":0,"exportedCount":1,"missingRefCount":0,"missingReferences":[]}