mirror of
https://github.com/mayanayza/netvisor.git
synced 2025-12-10 08:24:08 -06:00
Merge pull request #114 from vhsdream/feat/new-service
feat: add Paperless-NGX service definition
This commit is contained in:
@@ -118,6 +118,7 @@ pub mod nut;
|
||||
pub mod open_media_vault;
|
||||
pub mod opn_sense;
|
||||
pub mod overseerr;
|
||||
pub mod paperless_ngx;
|
||||
pub mod pf_blocker_ng;
|
||||
pub mod pf_sense;
|
||||
pub mod philips_hue_bridge;
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
use crate::server::hosts::r#impl::ports::PortBase;
|
||||
use crate::server::services::definitions::{ServiceDefinitionFactory, create_service};
|
||||
use crate::server::services::r#impl::categories::ServiceCategory;
|
||||
use crate::server::services::r#impl::definitions::ServiceDefinition;
|
||||
use crate::server::services::r#impl::patterns::Pattern;
|
||||
|
||||
#[derive(Default, Clone, Eq, PartialEq, Hash)]
|
||||
pub struct PaperlessNGX;
|
||||
|
||||
impl ServiceDefinition for PaperlessNGX {
|
||||
fn name(&self) -> &'static str {
|
||||
"Paperless-NGX"
|
||||
}
|
||||
fn description(&self) -> &'static str {
|
||||
"Community-supported document management system"
|
||||
}
|
||||
fn category(&self) -> ServiceCategory {
|
||||
ServiceCategory::Web
|
||||
}
|
||||
|
||||
fn discovery_pattern(&self) -> Pattern<'_> {
|
||||
Pattern::Endpoint(
|
||||
PortBase::new_tcp(8000),
|
||||
"/accounts/login/",
|
||||
"Paperless-ngx project",
|
||||
)
|
||||
}
|
||||
|
||||
fn logo_url(&self) -> &'static str {
|
||||
"https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/paperless-ngx.svg"
|
||||
}
|
||||
}
|
||||
|
||||
inventory::submit!(ServiceDefinitionFactory::new(
|
||||
create_service::<PaperlessNGX>
|
||||
));
|
||||
Reference in New Issue
Block a user