From a2e63de966c70f9f16d9ccac71b256f63195a9e1 Mon Sep 17 00:00:00 2001 From: "Carol A. Scott" Date: Thu, 14 Mar 2019 09:55:09 -0700 Subject: [PATCH] Add "Community" menu item to dashboard that displays linkerd.io content (#2476) Closes #2327. This PR creates a "Community" menu item on the dashboard sidebar that, when clicked, displays an iFrame of a page on linkerd.io. A yellow badge appears on the menu item if there has been an update since the user last clicked the "Community" menu item. This is calculated by comparing a date in the user's localStorage to a JSON feed at linkerd.io. --- web/app/js/components/BreadcrumbHeader.jsx | 1 + web/app/js/components/Community.jsx | 15 +++++++ web/app/js/components/Navigation.jsx | 52 +++++++++++++++++++++- web/app/js/index.js | 4 ++ web/app/package.json | 1 + web/app/yarn.lock | 22 +++++++++ web/srv/server.go | 1 + 7 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 web/app/js/components/Community.jsx diff --git a/web/app/js/components/BreadcrumbHeader.jsx b/web/app/js/components/BreadcrumbHeader.jsx index d61d670d5..4b5c1b0db 100644 --- a/web/app/js/components/BreadcrumbHeader.jsx +++ b/web/app/js/components/BreadcrumbHeader.jsx @@ -13,6 +13,7 @@ const routeToCrumbTitle = { "tap": "Tap", "top": "Top", "routes": "Top Routes", + "community": "Community", "debug": "Debug" }; diff --git a/web/app/js/components/Community.jsx b/web/app/js/components/Community.jsx new file mode 100644 index 000000000..72bf43003 --- /dev/null +++ b/web/app/js/components/Community.jsx @@ -0,0 +1,15 @@ +import Iframe from 'react-iframe'; +import React from 'react'; + +const Community = () => { + return ( +