diff --git a/web/app/src/App.vue b/web/app/src/App.vue index f6956b77..ef84c90d 100644 --- a/web/app/src/App.vue +++ b/web/app/src/App.vue @@ -1,7 +1,8 @@ @@ -9,13 +10,15 @@ import Social from './components/Social.vue' import Settings from './components/Settings.vue' import Services from './components/Services.vue'; +import Tooltip from './components/Tooltip.vue'; export default { name: 'App', components: { Services, Social, - Settings + Settings, + Tooltip }, methods: { fetchStatuses() { @@ -28,11 +31,15 @@ export default { this.serviceStatuses = data; } }); + }, + showTooltip(result, event) { + this.tooltip = {result: result, event: event}; } }, data() { return { - serviceStatuses: {} + serviceStatuses: {}, + tooltip: {} } }, created() { @@ -43,10 +50,11 @@ export default { diff --git a/web/app/src/components/Service.vue b/web/app/src/components/Service.vue index f7f1fc46..6036adb4 100644 --- a/web/app/src/components/Service.vue +++ b/web/app/src/components/Service.vue @@ -12,16 +12,17 @@
- + - - X + + X
+
{{ generatePrettyTimeAgo(data.results[0].timestamp) }}
@@ -37,7 +38,8 @@ export default { name: 'Service', props: { - data: Object + maximumNumberOfResults: Number, + data: Object, }, methods: { updateMinAndMaxResponseTimes() { @@ -70,6 +72,9 @@ export default { return minutes + " minute" + (minutes !== "1" ? "s" : "") + " ago"; } return (differenceInMs/1000).toFixed(0) + " seconds ago"; + }, + showTooltip(result, event) { + this.$emit('showTooltip', result, event); } }, watch: { diff --git a/web/app/src/components/ServiceGroup.vue b/web/app/src/components/ServiceGroup.vue index 4291971e..f358dcb8 100644 --- a/web/app/src/components/ServiceGroup.vue +++ b/web/app/src/components/ServiceGroup.vue @@ -14,7 +14,7 @@
- +
@@ -55,6 +55,9 @@ export default { }, toggleGroup() { this.collapsed = !this.collapsed; + }, + showTooltip(result, event) { + this.$emit('showTooltip', result, event); } }, watch: { diff --git a/web/app/src/components/Services.vue b/web/app/src/components/Services.vue index f31bd8d9..44973f44 100644 --- a/web/app/src/components/Services.vue +++ b/web/app/src/components/Services.vue @@ -12,7 +12,7 @@
- +
@@ -28,7 +28,6 @@ export default { ServiceGroup }, props: { - maximumNumberOfResults: Number, showStatusOnHover: Boolean, serviceStatuses: Object }, @@ -54,6 +53,9 @@ export default { serviceGroups.push({name: 'undefined', services: outputByGroup['undefined']}) } this.serviceGroups = serviceGroups; + }, + showTooltip(result, event) { + this.$emit('showTooltip', result, event); } }, watch: { diff --git a/web/app/src/components/Settings.vue b/web/app/src/components/Settings.vue index d903e33e..0f0493f1 100644 --- a/web/app/src/components/Settings.vue +++ b/web/app/src/components/Settings.vue @@ -29,7 +29,7 @@ export default { }, seconds * 1000); }, refreshStatuses() { - this.$emit('refreshStatuses') + this.$emit('refreshStatuses'); }, handleChangeRefreshInterval() { this.refreshStatuses(); diff --git a/web/app/src/components/Tooltip.vue b/web/app/src/components/Tooltip.vue new file mode 100644 index 00000000..3b66b2d1 --- /dev/null +++ b/web/app/src/components/Tooltip.vue @@ -0,0 +1,135 @@ + + + + + + +