diff --git a/CHANGELOG.md b/CHANGELOG.md index a6d826d..6385c54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,23 +11,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Cleaned up ElasticSearch configuration in backend. + ### Deprecated ### Removed -### Fixed +- Remove color-coding by activity per user. -- Cleaned up ElasticSearch configuration in backend. +### Fixed ## [2.6.1 - 2019-08-10] -### Fixed +### Changed - Added missing indices on `crawls` and `crawl_interactions` tables. - Added table to store most recent crawl. This speeds up the instance view by a lot! -### Security - ## [2.6.0 - 2019-08-10] ### Added diff --git a/backend/lib/backend_web/views/graph_view.ex b/backend/lib/backend_web/views/graph_view.ex index 96e4976..6e73d78 100644 --- a/backend/lib/backend_web/views/graph_view.ex +++ b/backend/lib/backend_web/views/graph_view.ex @@ -8,15 +8,6 @@ defmodule BackendWeb.GraphView do |> Enum.map(fn %{statuses_per_day: statuses_per_day} -> statuses_per_day end) |> Enum.filter(fn s -> s != nil end) - statuses_per_user_per_day = - nodes - |> Enum.filter(fn %{statuses_per_day: statuses_per_day, user_count: user_count} -> - statuses_per_day != nil and user_count != nil and user_count > 0 - end) - |> Enum.map(fn %{statuses_per_day: statuses_per_day, user_count: user_count} -> - statuses_per_day / user_count - end) - %{ graph: %{ nodes: render_many(nodes, GraphView, "node.json", as: :node), @@ -28,10 +19,6 @@ defmodule BackendWeb.GraphView do statusesPerDay: [ Enum.min(statuses_per_day, fn -> nil end), Enum.max(statuses_per_day, fn -> nil end) - ], - statusesPerUserPerDay: [ - Enum.min(statuses_per_user_per_day, fn -> nil end), - Enum.max(statuses_per_user_per_day, fn -> nil end) ] } } @@ -45,13 +32,6 @@ defmodule BackendWeb.GraphView do false -> 1 end - statuses_per_user_per_day = - if node.statuses_per_day != nil and node.user_count != nil and node.user_count > 0 do - node.statuses_per_day / node.user_count - else - nil - end - # This is the format that cytoscape.js expects. %{ data: %{ @@ -59,8 +39,7 @@ defmodule BackendWeb.GraphView do label: node.domain, size: size, type: node.type, - statusesPerDay: node.statuses_per_day, - statusesPerUserPerDay: statuses_per_user_per_day + statusesPerDay: node.statuses_per_day }, position: %{ x: node.x, diff --git a/frontend/src/types.ts b/frontend/src/types.ts index a9fe532..03e8eed 100644 --- a/frontend/src/types.ts +++ b/frontend/src/types.ts @@ -29,17 +29,10 @@ export const typeColorScheme: IQualitativeColorScheme = { }; export const activityColorScheme: IQuantitativeColorScheme = { cytoscapeDataKey: "statusesPerDay", - description: "The average number of statuses posted per day. Note that this is colored by an exponential scale.", + description: "The average number of statuses posted per day. This is an exponential scale.", exponential: true, - name: "Activity (total)", - type: "quantitative" -}; -export const activityPerUserColorScheme: IQuantitativeColorScheme = { - cytoscapeDataKey: "statusesPerUserPerDay", - description: "The average number of statuses posted per person per day.", - exponential: false, - name: "Activity (per person)", + name: "Activity", type: "quantitative" }; -export const colorSchemes: IColorScheme[] = [typeColorScheme, activityColorScheme, activityPerUserColorScheme]; +export const colorSchemes: IColorScheme[] = [typeColorScheme, activityColorScheme];