@@ -113,6 +133,33 @@ export default {
removeMonitor(groupIndex, index) {
this.$root.publicGroupList[groupIndex].monitorList.splice(index, 1);
},
+
+ /**
+ * Toggle the value of sendUrl
+ * @param {number} groupIndex Index of group monitor is member of
+ * @param {number} index Index of monitor within group
+ */
+ toggleLink(groupIndex, index) {
+ this.$root.publicGroupList[groupIndex].monitorList[index].sendUrl = !this.$root.publicGroupList[groupIndex].monitorList[index].sendUrl;
+ },
+
+ /**
+ * Should a link to the monitor be shown?
+ * Attempts to guess if a link should be shown based upon if
+ * sendUrl is set and if the URL is default or not.
+ * @param {Object} monitor Monitor to check
+ * @param {boolean} [ignoreSendUrl=false] Should the presence of the sendUrl
+ * property be ignored. This will only work in edit mode.
+ * @returns {boolean}
+ */
+ showLink(monitor, ignoreSendUrl = false) {
+ // We must check if there are any elements in monitorList to
+ // prevent undefined errors if it hasn't been loaded yet
+ if (this.$parent.editMode && ignoreSendUrl && Object.keys(this.$root.monitorList).length) {
+ return this.$root.monitorList[monitor.element.id].type === "http" || this.$root.monitorList[monitor.element.id].type === "keyword";
+ }
+ return monitor.element.sendUrl && monitor.element.url && monitor.element.url !== "https://" && !this.editMode;
+ },
}
};
@@ -131,6 +178,22 @@ export default {
min-height: 46px;
}
+.item-name {
+ padding-left: 5px;
+ padding-right: 5px;
+ margin: 0;
+ display: inline-block;
+}
+
+.btn-link {
+ color: #bbbbbb;
+ margin-left: 5px;
+}
+
+.link-active {
+ color: $primary;
+}
+
.flip-list-move {
transition: transform 0.5s;
}
diff --git a/src/components/notifications/AlertNow.vue b/src/components/notifications/AlertNow.vue
new file mode 100644
index 000000000..93acc9590
--- /dev/null
+++ b/src/components/notifications/AlertNow.vue
@@ -0,0 +1,13 @@
+
+