From 07f53c14059107499cab8ca0156e468db608d03f Mon Sep 17 00:00:00 2001
From: Zoltan Runyo <zoltan.runyo@ess.eu>
Date: Thu, 28 Apr 2022 11:30:36 +0200
Subject: [PATCH] ICSHWI-9268: Rename menu items

---
 src/__tests__/browse-host-test.js                      | 4 ++--
 src/components/navigation/GlobalAppBar/GlobalAppBar.js | 8 ++++----
 src/views/IOC/IOCListView.js                           | 4 +---
 src/views/host/HostListView.js                         | 2 +-
 4 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/src/__tests__/browse-host-test.js b/src/__tests__/browse-host-test.js
index a864bb9d..22712654 100644
--- a/src/__tests__/browse-host-test.js
+++ b/src/__tests__/browse-host-test.js
@@ -26,11 +26,11 @@ defineFeature(feature, (test) => {
     });
 
     when('the user navigates to the hosts page', async () => {
-      await screen.findByText('CCCE / Explore IOC hosts');
+      await screen.findByText('CCCE / IOC-hosts');
     });
 
     then('they should be presented with a table of hosts from the iocs group in CSEntry', async () => {
-      expect(await screen.findByText('CCCE / Explore IOC hosts')).toBeInTheDocument()
+      expect(await screen.findByText('CCCE / IOC-hosts')).toBeInTheDocument()
       expect(await screen.findByText('Status')).toBeInTheDocument()
       expect(await screen.findByText('Host')).toBeInTheDocument()
       expect(await screen.findByText('Network')).toBeInTheDocument()
diff --git a/src/components/navigation/GlobalAppBar/GlobalAppBar.js b/src/components/navigation/GlobalAppBar/GlobalAppBar.js
index 0eea34cd..d1627b4a 100644
--- a/src/components/navigation/GlobalAppBar/GlobalAppBar.js
+++ b/src/components/navigation/GlobalAppBar/GlobalAppBar.js
@@ -386,8 +386,8 @@ export function GlobalAppBar({ children }) {
 
   const makeLink = (text, url, icon) => ({ text, url, icon });
   const menuItemsAll = [
-    makeLink("Explore IOCs", "/iocs", <CCCEControlSymbol />),
-    makeLink("Explore IOC hosts", "/hosts", <Storage />),
+    makeLink("IOCs", "/iocs", <CCCEControlSymbol />),
+    makeLink("IOC-hosts", "/hosts", <Storage />),
     makeLink("Deployment log", "/deployments", <Assignment />),
     makeLink("Statistics", "/statistics", <TrendingUp />),
     makeLink("About", "/about", <InfoIcon />),
@@ -395,8 +395,8 @@ export function GlobalAppBar({ children }) {
   ]
 
   const menuItemsVisitor = [
-    makeLink("Explore IOCs", "/iocs", <CCCEControlSymbol />),
-    makeLink("Explore IOC hosts", "/hosts", <Storage />),
+    makeLink("IOCs", "/iocs", <CCCEControlSymbol />),
+    makeLink("IOC-hosts", "/hosts", <Storage />),
     makeLink("Deployment log", "/deployments", <Assignment />),
     makeLink("Statistics", "/statistics", <TrendingUp />),
     makeLink("About", "/about", <InfoIcon />)
diff --git a/src/views/IOC/IOCListView.js b/src/views/IOC/IOCListView.js
index af153b06..357b5e58 100644
--- a/src/views/IOC/IOCListView.js
+++ b/src/views/IOC/IOCListView.js
@@ -40,8 +40,6 @@ export function IOCListView() {
   };
 
   const rowsPerPage = [5, 10, 20, 50, 100];
-  
-  console.log("rendering Explore IOCs")
 
   useEffect(() => {
     setIocList(iocs.iocList);
@@ -69,7 +67,7 @@ export function IOCListView() {
     getIocs(requestParams);
   }, [getIocs, lazyParams, columnSort, query, user, ownOnly])
 
-  const title = "Explore IOCs";
+  const title = "IOCs";
   useGlobalAppBar(title);
 
   let content = (
diff --git a/src/views/host/HostListView.js b/src/views/host/HostListView.js
index a96b7228..b3a26235 100644
--- a/src/views/host/HostListView.js
+++ b/src/views/host/HostListView.js
@@ -21,7 +21,7 @@ const useStyles = makeStyles((theme) => ({
 }));
 
 export function HostListView() {
-    useGlobalAppBar("Explore IOC hosts");
+    useGlobalAppBar("IOC-hosts");
 
     const [hosts, getHosts, /*reset*/, loading] = useCSEntrySearch();
     const [query, setQuery] = useState("");
-- 
GitLab