mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-11 03:59:38 +08:00
Added JSDoc for src/components/*
Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
This commit is contained in:
@@ -17,14 +17,17 @@
|
||||
|
||||
export default {
|
||||
props: {
|
||||
/** Size of the heart beat bar */
|
||||
size: {
|
||||
type: String,
|
||||
default: "big",
|
||||
},
|
||||
/** ID of the monitor */
|
||||
monitorId: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
/** Array of the monitors heart beats */
|
||||
heartbeatList: {
|
||||
type: Array,
|
||||
default: null,
|
||||
@@ -160,12 +163,18 @@ export default {
|
||||
this.resize();
|
||||
},
|
||||
methods: {
|
||||
/** Resize the heartbeat bar */
|
||||
resize() {
|
||||
if (this.$refs.wrap) {
|
||||
this.maxBeat = Math.floor(this.$refs.wrap.clientWidth / (this.beatWidth + this.beatMargin * 2));
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Get the title of the beat
|
||||
* @param {Object} beat Beat to get title from
|
||||
* @returns {string}
|
||||
*/
|
||||
getBeatTitle(beat) {
|
||||
return `${this.$root.datetime(beat.time)}` + ((beat.msg) ? ` - ${beat.msg}` : "");
|
||||
},
|
||||
|
Reference in New Issue
Block a user