Skiping unused field
This commit is contained in:
parent
97171b89d5
commit
0b9487bde5
2 changed files with 26 additions and 6 deletions
|
|
@ -9,6 +9,8 @@ use crate::i18n::{t, t_with_args};
|
||||||
pub struct HeartbeatEntry {
|
pub struct HeartbeatEntry {
|
||||||
pub status: u8,
|
pub status: u8,
|
||||||
pub time: String,
|
pub time: String,
|
||||||
|
#[allow(dead_code)]
|
||||||
|
#[serde(skip)]
|
||||||
pub msg: String,
|
pub msg: String,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub ping: Option<u64>,
|
pub ping: Option<u64>,
|
||||||
|
|
|
||||||
|
|
@ -2,26 +2,42 @@ use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
#[derive(Debug, Clone, Deserialize, Serialize)]
|
#[derive(Debug, Clone, Deserialize, Serialize)]
|
||||||
pub struct StatusPageConfig {
|
pub struct StatusPageConfig {
|
||||||
|
#[allow(dead_code)]
|
||||||
|
#[serde(skip)]
|
||||||
pub slug: String,
|
pub slug: String,
|
||||||
pub title: String,
|
pub title: String,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub description: Option<String>,
|
pub description: Option<String>,
|
||||||
|
#[allow(dead_code)]
|
||||||
|
#[serde(skip)]
|
||||||
pub icon: String,
|
pub icon: String,
|
||||||
#[serde(rename = "autoRefreshInterval")]
|
#[serde(rename = "autoRefreshInterval")]
|
||||||
pub auto_refresh_interval: u32,
|
pub auto_refresh_interval: u32,
|
||||||
|
#[allow(dead_code)]
|
||||||
|
#[serde(skip)]
|
||||||
pub theme: String,
|
pub theme: String,
|
||||||
|
#[allow(dead_code)]
|
||||||
|
#[serde(skip)]
|
||||||
pub published: bool,
|
pub published: bool,
|
||||||
|
#[allow(dead_code)]
|
||||||
|
#[serde(skip)]
|
||||||
#[serde(rename = "showTags")]
|
#[serde(rename = "showTags")]
|
||||||
pub show_tags: bool,
|
pub show_tags: bool,
|
||||||
|
#[allow(dead_code)]
|
||||||
|
#[serde(skip)]
|
||||||
#[serde(rename = "customCSS")]
|
#[serde(rename = "customCSS")]
|
||||||
pub custon_css: String,
|
pub custon_css: String,
|
||||||
#[serde(rename = "footerText", default)]
|
#[allow(dead_code)]
|
||||||
|
#[serde(rename = "footerText", skip)]
|
||||||
pub footer_text: Option<String>,
|
pub footer_text: Option<String>,
|
||||||
#[serde(rename = "showPoweredBy")]
|
#[allow(dead_code)]
|
||||||
|
#[serde(rename = "showPoweredBy", skip)]
|
||||||
pub show_powered_by: bool,
|
pub show_powered_by: bool,
|
||||||
#[serde(rename = "googleAnalyticsId", default)]
|
#[allow(dead_code)]
|
||||||
|
#[serde(rename = "googleAnalyticsId", skip)]
|
||||||
pub google_analytics_id: Option<String>,
|
pub google_analytics_id: Option<String>,
|
||||||
#[serde(rename = "showCertificateExpiry")]
|
#[allow(dead_code)]
|
||||||
|
#[serde(rename = "showCertificateExpiry", skip)]
|
||||||
pub show_certificate_expiry: bool,
|
pub show_certificate_expiry: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -29,9 +45,11 @@ pub struct StatusPageConfig {
|
||||||
pub struct MonitorInfo {
|
pub struct MonitorInfo {
|
||||||
pub id: u64,
|
pub id: u64,
|
||||||
pub name: String,
|
pub name: String,
|
||||||
#[serde(skip_deserializing)]
|
#[allow(dead_code)]
|
||||||
|
#[serde(rename = "sendUrl", skip)]
|
||||||
pub send_url: u8,
|
pub send_url: u8,
|
||||||
#[serde(skip_deserializing)]
|
#[allow(dead_code)]
|
||||||
|
#[serde(rename = "type", skip)]
|
||||||
pub monitor_type: String,
|
pub monitor_type: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue