Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/homepage/commit/a488cc0115f9a4b9da8d6b7bb5556140cfe745c3
You should set ROOT_URL correctly, otherwise the web may not work correctly.
3 changed files with
9 additions and
33 deletions
@ -118,7 +118,6 @@ export function cleanServiceGroups(groups) {
container ,
currency , // coinmarketcap widget
symbols ,
inboxTag , // paperlessngx widget
} = cleanedService . widget ;
cleanedService . widget = {
@ -130,8 +129,6 @@ export function cleanServiceGroups(groups) {
if ( currency ) cleanedService . widget . currency = currency ;
if ( symbols ) cleanedService . widget . symbols = symbols ;
if ( inboxTag ) cleanedService . widget . inboxTag = inboxTag ;
if ( type === "docker" ) {
if ( server ) cleanedService . widget . server = server ;
@ -5,26 +5,13 @@ import useWidgetAPI from "utils/proxy/use-widget-api";
export default function Component ( { service } ) {
const { widget } = service ;
const { data : inboxData , error : inboxError } = useWidgetAPI ( widget , "inbox" ,
{
query : ` tag: ${ widget . inboxTag } ` ,
format : "json" ,
fields : "count"
} ) ;
const { data : statisticsData , error : statisticsError } = useWidgetAPI ( widget , "statistics" ) ;
const { data : documentData , error : documentError } = useWidgetAPI ( widget , "documents" ,
{
fields : "count" ,
format : "json" ,
} ) ;
if ( inboxError || documentError ) {
const finalError = inboxError ? ? documentError ;
return < Container error = { finalError } / > ;
if ( statisticsError ) {
return < Container error = { statisticsError } / > ;
}
if ( ! inboxData || ! document Data) {
if ( ! statisticsData ) {
return (
< Container service = { service } >
< Block label = "paperlessngx.inbox" / >
@ -35,8 +22,8 @@ export default function Component({ service }) {
return (
< Container service = { service } >
<Block label = "paperlessngx.inbox" value = { inboxData. count } / >
< Block label = "paperlessngx.total" value = { documentData. count } / >
{statisticsData . documents _inbox !== undefined && <Block label = "paperlessngx.inbox" value = { statisticsData. documents _inbox } / > }
< Block label = "paperlessngx.total" value = { statisticsData. documents _total } / >
< / Container >
) ;
}
@ -5,18 +5,10 @@ const widget = {
proxyHandler : genericProxyHandler ,
mappings : {
"inbox" : {
endpoint : "documents/" ,
params : [ "format" , "query" , "fields" ] ,
"statistics" : {
endpoint : "statistics/?format=json" ,
validate : [
"count"
]
} ,
"documents" : {
endpoint : "documents/" ,
params : [ "format" , "fields" ] ,
validate : [
"count"
"documents_total"
]
} ,
} ,