Browse Source

Add etherpad and nextcloud

Kirk Trombley 4 years ago
parent
commit
148cbfe14c
3 changed files with 37 additions and 1 deletions
  1. 5 1
      src/App.js
  2. 16 0
      src/components/tiles/Etherpad.jsx
  3. 16 0
      src/components/tiles/Nextcloud.jsx

+ 5 - 1
src/App.js

@@ -8,16 +8,20 @@ import Minecraft from './components/tiles/Minecraft';
 import Rollbot from './components/tiles/Rollbot';
 import VacationPlanner from './components/tiles/VacationPlanner';
 import DroneCI from './components/tiles/DroneCI';
+import Etherpad from './components/tiles/Etherpad';
+import Nextcloud from './components/tiles/Nextcloud';
 
 export default () => (
   <div className="App">
     <Teamspeak/>
     <TerrAssumptions/>
     <CommaFeed/>
-    <Gogs/>
     <Minecraft/>
     <Rollbot/>
     <VacationPlanner/>
+    <Gogs/>
     <DroneCI/>
+    <Etherpad />
+    <Nextcloud />
   </div>
 );

+ 16 - 0
src/components/tiles/Etherpad.jsx

@@ -0,0 +1,16 @@
+import React from "react";
+import Tile from "../shared/Tile";
+import useHealthPolling from "../../hooks/useHealthPolling";
+
+const etherpadUrl = `https://ether.hiram.services/`;
+const update = 1000 * 60 * 20;
+
+export default () => {
+  const health = useHealthPolling(etherpadUrl, { ms: update })
+
+  return <Tile
+    link={etherpadUrl}
+    title="Etherpad"
+    health={health}
+  />
+}

+ 16 - 0
src/components/tiles/Nextcloud.jsx

@@ -0,0 +1,16 @@
+import React from "react";
+import Tile from "../shared/Tile";
+import useHealthPolling from "../../hooks/useHealthPolling";
+
+const nextcloudUrl = `https://cloud.hiram.services/`;
+const update = 1000 * 60 * 20;
+
+export default () => {
+  const health = useHealthPolling(nextcloudUrl, { ms: update })
+
+  return <Tile
+    link={nextcloudUrl}
+    title="Nextcloud"
+    health={health}
+  />
+}