Compare commits
13 Commits
5c40ecfd61
...
ccbc4c5a51
Author | SHA1 | Date |
---|---|---|
broodroosterdev | ccbc4c5a51 | |
Frank Elsinga | dbbc79a05a | |
broodroosterdev | 2192bfa42b | |
Bas Wieringa | fb50d5f77c | |
broodroosterdev | f381d64fce | |
broodroosterdev | 75f2c69ac5 | |
Bas Wieringa | 629b15c56e | |
Bas Wieringa | 612581a5d5 | |
Bas Wieringa | e539e5aa73 | |
Bas Wieringa | a34ca83844 | |
Bas Wieringa | 488504c3fd | |
Bas Wieringa | 26e234c132 | |
Bas Wieringa | 201ac9245b |
|
@ -49,7 +49,7 @@ Uptime Kuma is now running on <http://0.0.0.0:3001>.
|
|||
> File Systems like **NFS** (Network File System) are **NOT** supported. Please map to a local directory or volume.
|
||||
|
||||
> [!NOTE]
|
||||
> If you want to limit exppoure to localhost (without exposing port for other users or to use a [reverse proxyx](https://github.com/louislam/uptime-kuma/wiki/Reverse-Proxy)), you can expose the port like this:
|
||||
> If you want to limit exposure to localhost (without exposing port for other users or to use a [reverse proxy](https://github.com/louislam/uptime-kuma/wiki/Reverse-Proxy)), you can expose the port like this:
|
||||
>
|
||||
> ```bash
|
||||
> docker run -d --restart=always -p 127.0.0.1:3001:3001 -v uptime-kuma:/app/data --name uptime-kuma louislam/uptime-kuma:1
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
exports.up = function (knex) {
|
||||
// Add new column status_page.show_last_heartbeat
|
||||
return knex.schema
|
||||
.alterTable("status_page", function (table) {
|
||||
table.boolean("show_last_heartbeat").notNullable().defaultTo(false);
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
exports.down = function (knex) {
|
||||
// Drop column status_page.show_last_heartbeat
|
||||
return knex.schema
|
||||
.alterTable("status_page", function (table) {
|
||||
table.dropColumn("show_last_heartbeat");
|
||||
});
|
||||
};
|
|
@ -246,6 +246,7 @@ class StatusPage extends BeanModel {
|
|||
showPoweredBy: !!this.show_powered_by,
|
||||
googleAnalyticsId: this.google_analytics_tag_id,
|
||||
showCertificateExpiry: !!this.show_certificate_expiry,
|
||||
showLastHeartbeat: !!this.show_last_heartbeat
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -268,6 +269,7 @@ class StatusPage extends BeanModel {
|
|||
showPoweredBy: !!this.show_powered_by,
|
||||
googleAnalyticsId: this.google_analytics_tag_id,
|
||||
showCertificateExpiry: !!this.show_certificate_expiry,
|
||||
showLastHeartbeat: !!this.show_last_heartbeat
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -163,6 +163,7 @@ module.exports.statusPageSocketHandler = (socket) => {
|
|||
statusPage.footer_text = config.footerText;
|
||||
statusPage.custom_css = config.customCSS;
|
||||
statusPage.show_powered_by = config.showPoweredBy;
|
||||
statusPage.show_last_heartbeat = config.showLastHeartbeat;
|
||||
statusPage.show_certificate_expiry = config.showCertificateExpiry;
|
||||
statusPage.modified_date = R.isoDateTime();
|
||||
statusPage.google_analytics_tag_id = config.googleAnalyticsId;
|
||||
|
|
|
@ -38,7 +38,8 @@
|
|||
<font-awesome-icon v-if="editMode" icon="arrows-alt-v" class="action drag me-3" />
|
||||
<font-awesome-icon v-if="editMode" icon="times" class="action remove me-3" @click="removeMonitor(group.index, monitor.index)" />
|
||||
|
||||
<Uptime :monitor="monitor.element" type="24" :pill="true" />
|
||||
<Status v-if="showLastHeartbeat" :status="statusOfLastHeartbeat(monitor.element.id)" />
|
||||
<Uptime v-else :monitor="monitor.element" type="24" :pill="true" />
|
||||
<a
|
||||
v-if="showLink(monitor)"
|
||||
:href="monitor.element.url"
|
||||
|
@ -90,6 +91,7 @@ import Draggable from "vuedraggable";
|
|||
import HeartbeatBar from "./HeartbeatBar.vue";
|
||||
import Uptime from "./Uptime.vue";
|
||||
import Tag from "./Tag.vue";
|
||||
import Status from "./Status.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
@ -98,6 +100,7 @@ export default {
|
|||
HeartbeatBar,
|
||||
Uptime,
|
||||
Tag,
|
||||
Status,
|
||||
},
|
||||
props: {
|
||||
/** Are we in edit mode? */
|
||||
|
@ -112,7 +115,11 @@ export default {
|
|||
/** Should expiry be shown? */
|
||||
showCertificateExpiry: {
|
||||
type: Boolean,
|
||||
}
|
||||
},
|
||||
/** Should only the last heartbeat be shown? */
|
||||
showLastHeartbeat: {
|
||||
type: Boolean,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -181,6 +188,17 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the status of the last heartbeat
|
||||
* @param {number} monitorId Id of the monitor to get status for
|
||||
* @returns {number} Status of the last heartbeat
|
||||
*/
|
||||
statusOfLastHeartbeat(monitorId) {
|
||||
let heartbeats = this.$root.heartbeatList[monitorId] ?? [];
|
||||
let lastHeartbeat = heartbeats[heartbeats.length - 1];
|
||||
return lastHeartbeat?.status;
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns certificate expiry color based on days remaining
|
||||
* @param {object} monitor Monitor to show expiry for
|
||||
|
|
|
@ -859,6 +859,7 @@
|
|||
"nostrRecipients": "Recipients Public Keys (npub)",
|
||||
"nostrRecipientsHelp": "npub format, one per line",
|
||||
"showCertificateExpiry": "Show Certificate Expiry",
|
||||
"showLastHeartbeat": "Show Last Heartbeat Only",
|
||||
"noOrBadCertificate": "No/Bad Certificate",
|
||||
"gamedigGuessPort": "Gamedig: Guess Port",
|
||||
"gamedigGuessPortDescription": "The port used by Valve Server Query Protocol may be different from the client port. Try this if the monitor cannot connect to your server.",
|
||||
|
|
|
@ -60,6 +60,12 @@
|
|||
<label class="form-check-label" for="show-certificate-expiry">{{ $t("showCertificateExpiry") }}</label>
|
||||
</div>
|
||||
|
||||
<!-- Show last heartbeat -->
|
||||
<div class="my-3 form-check form-switch">
|
||||
<input id="show-last-heartbeat" v-model="config.showLastHeartbeat" class="form-check-input" type="checkbox">
|
||||
<label class="form-check-label" for="show-last-heartbeat">{{ $t("showLastHeartbeat") }}</label>
|
||||
</div>
|
||||
|
||||
<div v-if="false" class="my-3">
|
||||
<label for="password" class="form-label">{{ $t("Password") }} <sup>{{ $t("Coming Soon") }}</sup></label>
|
||||
<input id="password" v-model="config.password" disabled type="password" autocomplete="new-password" class="form-control">
|
||||
|
@ -319,7 +325,7 @@
|
|||
👀 {{ $t("statusPageNothing") }}
|
||||
</div>
|
||||
|
||||
<PublicGroupList :edit-mode="enableEditMode" :show-tags="config.showTags" :show-certificate-expiry="config.showCertificateExpiry" />
|
||||
<PublicGroupList :edit-mode="enableEditMode" :show-tags="config.showTags" :show-certificate-expiry="config.showCertificateExpiry" :show-last-heartbeat="config.showLastHeartbeat" />
|
||||
</div>
|
||||
|
||||
<footer class="mt-5 mb-4">
|
||||
|
|
Loading…
Reference in New Issue