Disable the secure cookie flag in development

This makes it easier to test the dashboard locally.
This commit is contained in:
Sam Van Campenhout
2025-03-12 16:52:01 +01:00
parent b97b545add
commit 6cae455d46
10 changed files with 309 additions and 17 deletions

View File

@@ -261,6 +261,26 @@ defmodule Dispatcher do
Proxy.forward(conn, path, "http://resource/reports/")
end
match "/log-entries/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://resource/log-entries/")
end
match "/log-levels/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://resource/log-levels/")
end
match "/status-codes/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://resource/status-codes/")
end
match "/log-sources/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://resource/log-sources/")
end
match "/remote-data-objects/*path", %{accept: [:json], layer: :api} do
Proxy.forward(conn, path, "http://resource/remote-data-objects/")
end
###############
# LOGIN
###############

View File

@@ -0,0 +1,33 @@
INSERT DATA {
GRAPH <http://mu.semte.ch/graphs/public> {
<http://data.lblod.info/id/log-levels/0986a9b6-b543-4629-8ef8-08928ae42430> a <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/rlog#Level> ;
<http://mu.semte.ch/vocabularies/core/uuid> "0986a9b6-b543-4629-8ef8-08928ae42430" ;
<http://persistence.uni-leipzig.org/nlp2rdf/ontologies/rlog#priority> 1 ;
<http://www.w3.org/2004/02/skos/core#prefLabel> "TRACE" .
<http://data.lblod.info/id/log-levels/fe6473d5-ac83-450c-83f8-3546357c7117> a <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/rlog#Level> ;
<http://mu.semte.ch/vocabularies/core/uuid> "fe6473d5-ac83-450c-83f8-3546357c7117" ;
<http://persistence.uni-leipzig.org/nlp2rdf/ontologies/rlog#priority> 2 ;
<http://www.w3.org/2004/02/skos/core#prefLabel> "DEBUG" .
<http://data.lblod.info/id/log-levels/6f92baad-b4a1-42ce-8bdf-e28218b27ff9> a <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/rlog#Level> ;
<http://mu.semte.ch/vocabularies/core/uuid> "6f92baad-b4a1-42ce-8bdf-e28218b27ff9" ;
<http://persistence.uni-leipzig.org/nlp2rdf/ontologies/rlog#priority> 3 ;
<http://www.w3.org/2004/02/skos/core#prefLabel> "INFO" .
<http://data.lblod.info/id/log-levels/62d2516b-e6b8-4866-aad1-e8347f2cdc70> a <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/rlog#Level> ;
<http://mu.semte.ch/vocabularies/core/uuid> "62d2516b-e6b8-4866-aad1-e8347f2cdc70" ;
<http://persistence.uni-leipzig.org/nlp2rdf/ontologies/rlog#priority> 4 ;
<http://www.w3.org/2004/02/skos/core#prefLabel> "WARN" .
<http://data.lblod.info/id/log-levels/3af9ebe1-e6a8-495c-a392-16ced1f38ef1> a <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/rlog#Level> ;
<http://mu.semte.ch/vocabularies/core/uuid> "3af9ebe1-e6a8-495c-a392-16ced1f38ef1" ;
<http://persistence.uni-leipzig.org/nlp2rdf/ontologies/rlog#priority> 5 ;
<http://www.w3.org/2004/02/skos/core#prefLabel> "ERROR" .
<http://data.lblod.info/id/log-levels/c679f915-1fdd-4b50-938d-6b565aa31278> a <http://persistence.uni-leipzig.org/nlp2rdf/ontologies/rlog#Level> ;
<http://mu.semte.ch/vocabularies/core/uuid> "c679f915-1fdd-4b50-938d-6b565aa31278" ;
<http://persistence.uni-leipzig.org/nlp2rdf/ontologies/rlog#priority> 6 ;
<http://www.w3.org/2004/02/skos/core#prefLabel> "FATAL" .
}
}

View File

@@ -0,0 +1,7 @@
INSERT DATA {
GRAPH <http://mu.semte.ch/graphs/public> {
<http://data.lblod.info/id/log-sources/c7806563-25a4-46c8-9be2-a0cdf0db1f98> a <http://mu.semte.ch/vocabularies/ext/LogSource> ;
<http://mu.semte.ch/vocabularies/core/uuid> "c7806563-25a4-46c8-9be2-a0cdf0db1f98" ;
<http://www.w3.org/2004/02/skos/core#prefLabel> "Acmidm login service" .
}
}

View File

@@ -17,8 +17,10 @@
(read-domain-file "domain.json")
(read-domain-file "auth.json")
(read-domain-file "change-events.json")
(read-domain-file "files-domain.lisp")
(read-domain-file "file.json")
(read-domain-file "dcat.json")
(read-domain-file "privacy-centric-service.json")
(read-domain-file "job.json")
(read-domain-file "report.json")
(read-domain-file "log.json")
(read-domain-file "harvest.json")

107
config/resources/file.json Normal file
View File

@@ -0,0 +1,107 @@
{
"version": "0.1",
"prefixes": {
"adms": "http://www.w3.org/ns/adms#",
"dct": "http://purl.org/dc/terms/",
"dbpedia": "http://dbpedia.org/ontology/",
"nfo": "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#",
"nie": "http://www.semanticdesktop.org/ontologies/2007/01/19/nie#",
"rpioHttp": "http://redpencil.data.gift/vocabularies/http/",
"skos": "http://www.w3.org/2004/02/skos/core#",
"task": "http://redpencil.data.gift/vocabularies/tasks/"
},
"resources": {
"files": {
"name": "file",
"class": "nfo:FileDataObject",
"attributes": {
"filename": {
"type": "string",
"predicate": "nfo:fileName"
},
"format": {
"type": "string",
"predicate": "dct:format"
},
"size": {
"type": "number",
"predicate": "nfo:fileSize"
},
"extension": {
"type": "string",
"predicate": "dbpedia:fileExtension"
},
"created": {
"type": "datetime",
"predicate": "nfo:fileCreated"
}
},
"relationships": {
"download": {
"predicate": "nie:dataSource",
"target": "file",
"cardinality": "one",
"inverse": true
},
"data-container": {
"predicate": "task:hasFile",
"target": "data-container",
"cardinality": "one",
"inverse": true
}
},
"features": ["include-uri"],
"new-resource-base": "http://data.lblod.info/files/"
},
"remote-data-objects": {
"name": "remote-data-object",
"class": "nfo:RemoteDataObject",
"attributes": {
"source": {
"type": "url",
"predicate": "nie:url"
},
"created": {
"type": "datetime",
"predicate": "dct:created"
},
"modified": {
"type": "datetime",
"predicate": "dct:modified"
},
"request-header": {
"type": "url",
"predicate": "rpioHttp:requestHeader"
},
"status": {
"type": "url",
"predicate": "adms:status"
},
"comment": {
"type": "string",
"predicate": "skos:comment"
},
"creator": {
"type": "url",
"predicate": "dct:creator"
}
},
"relationships": {
"file": {
"predicate": "nie:dataSource",
"target": "file",
"cardinality": "one",
"inverse": true
},
"harvesting-collection": {
"predicate": "dct:hasPart",
"target": "harvesting-collection",
"cardinality": "one",
"inverse": true
}
},
"features": ["include-uri"],
"new-resource-base": "http://data.lblod.info/id/remote-data-objects/"
}
}
}

View File

@@ -1,16 +0,0 @@
(define-resource file ()
:class (s-prefix "nfo:FileDataObject")
:properties `((:filename :string ,(s-prefix "nfo:fileName"))
(:format :string ,(s-prefix "dct:format"))
(:size :number ,(s-prefix "nfo:fileSize"))
(:extension :string ,(s-prefix "dbpedia:fileExtension"))
(:created :datetime ,(s-prefix "nfo:fileCreated")))
:has-one `((file :via ,(s-prefix "nie:dataSource")
:inverse t
:as "download")
(data-container :via ,(s-prefix "task:hasFile")
:inverse t
:as "data-container"))
:resource-base (s-url "http://data.lblod.info/files/")
:features `(no-pagination-defaults include-uri)
:on-path "files")

View File

@@ -0,0 +1,40 @@
{
"version": "0.1",
"prefixes": {
"adms": "http://www.w3.org/ns/adms#",
"dct": "http://purl.org/dc/terms/",
"hrvst": "http://lblod.data.gift/vocabularies/harvesting/",
"task": "http://redpencil.data.gift/vocabularies/tasks/"
},
"resources": {
"harvesting-collections": {
"name": "harvesting-collection",
"class": "hrvst:HarvestingCollection",
"attributes": {
"status": {
"type": "url",
"predicate": "adms:status"
},
"creator": {
"type": "url",
"predicate": "dct:creator"
}
},
"relationships": {
"remote-data-objects": {
"predicate": "dct:hasPart",
"target": "remote-data-object",
"cardinality": "many"
},
"data-container": {
"predicate": "task:hasHarvestingCollection",
"target": "data-container",
"cardinality": "many",
"inverse": true
}
},
"features": ["include-uri"],
"new-resource-base": "http://data.lblod.info/id/harvesting-collection/"
}
}
}

View File

@@ -127,6 +127,11 @@
}
},
"relationships": {
"harvesting-collections": {
"predicate": "task:hasHarvestingCollection",
"target": "harvesting-collection",
"cardinality": "many"
},
"result-from-tasks": {
"predicate": "task:resultsContainer",
"target": "task",

92
config/resources/log.json Normal file
View File

@@ -0,0 +1,92 @@
{
"version": "0.1",
"prefixes": {
"dct": "http://purl.org/dc/terms/",
"ext": "http://mu.semte.ch/vocabularies/ext/",
"rlog": "http://persistence.uni-leipzig.org/nlp2rdf/ontologies/rlog#",
"skos": "http://www.w3.org/2004/02/skos/core#"
},
"resources": {
"log-entries": {
"name": "log-entry",
"class": "rlog:Entry",
"attributes": {
"class-name": {
"type": "url",
"predicate": "rlog:className"
},
"message": {
"type": "string",
"predicate": "rlog:message"
},
"specific-information": {
"type": "string",
"predicate": "ext:specificInformation"
},
"datetime": {
"type": "datetime",
"predicate": "rlog:date"
}
},
"relationships": {
"log-level": {
"predicate": "rlog:level",
"target": "log-level",
"cardinality": "one"
},
"status-code": {
"predicate": "rlog:hasCode",
"target": "status-code",
"cardinality": "one"
},
"log-source": {
"predicate": "dct:source",
"target": "log-source",
"cardinality": "one"
}
},
"features": ["include-uri"],
"new-resource-base": "http://data.lblod.info/id/log-entries/"
},
"log-levels": {
"name": "log-level",
"class": "rlog:Level",
"attributes": {
"priority": {
"type": "number",
"predicate": "rlog:priority"
},
"label": {
"type": "string",
"predicate": "skos:prefLabel"
}
},
"features": ["include-uri"],
"new-resource-base": "http://data.lblod.info/id/log-levels/"
},
"status-codes": {
"name": "status-code",
"class": "rlog:StatusCode",
"attributes": {
"code": {
"type": "number",
"predicate": "rlog:codeId"
}
},
"features": ["include-uri"],
"new-resource-base": "http://data.lblod.info/id/status-codes/"
},
"log-sources": {
"name": "log-source",
"class": "ext:LogSource",
"attributes": {
"label": {
"type": "string",
"predicate": "skos:prefLabel"
}
},
"features": ["include-uri"],
"new-resource-base": "http://data.lblod.info/id/log-sources/"
}
}
}

View File

@@ -5,6 +5,8 @@ services:
restart: "no"
ports:
- "80:80"
environment:
SESSION_COOKIE_SECURE: "off"
dispatcher:
restart: "no"
triplestore: