Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3754836
D2712.id6891.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D2712.id6891.diff
View Options
diff --git a/config.yml b/config.yml
--- a/config.yml
+++ b/config.yml
@@ -36,3 +36,4 @@
- "src/assets/js/docker-registry.js"
- "src/assets/js/servers-log.js"
- "src/assets/js/salt-config.js"
+ - "src/assets/js/notifications.js"
diff --git a/src/assets/js/notifications.js b/src/assets/js/notifications.js
new file mode 100644
--- /dev/null
+++ b/src/assets/js/notifications.js
@@ -0,0 +1,13 @@
+var btn = document.getElementById("test");
+window.addEventListener("load", (event) => {
+ let notif = new EventSource("http://192.168.1.44:5000");
+ console.log(notif);
+ notif.onmessage = function(received) {
+ console.log(received)
+ let payload = received.data;
+
+ let div = document.createElement("div");
+ div.innerHTML = payload;
+ document.getElementById("notificationList").appendChild(div);
+ }
+})
diff --git a/src/pages/notifications/index.html b/src/pages/notifications/index.html
new file mode 100644
--- /dev/null
+++ b/src/pages/notifications/index.html
@@ -0,0 +1,21 @@
+---
+title: Notifications
+app: notifications
+---
+
+<script src="../assets/js/notifications.js"></script>
+
+<section class="row">
+ <div class="large-12 columns">
+ <div class="callout">
+ <p><strong>Nasqueron infrastructure servers</strong> support our budding community of creative people, writers, developers and thinkers.</p>
+ <p>This page permit to see the notifications from the notification center</p>
+ </div>
+
+ <div id="notificationList" class="large-9 columns">
+
+ </div>
+
+
+ </div>
+</section>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 19, 10:17 (21 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2252390
Default Alt Text
D2712.id6891.diff (1 KB)
Attached To
Mode
D2712: Install a new static web page
Attached
Detach File
Event Timeline
Log In to Comment