arkisto-platform / describo-online Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://describo.github.io
License: GNU General Public License v3.0
Home Page: https://describo.github.io
License: GNU General Public License v3.0
If you hit refresh (eg cos there's an annoying alert) then it goes back to the root of your data. I would expect it to refresh the screen where I am currently working).
If you change an item's ID to something that uses the arcp:// URI scheme it gets prepended with a # -- maybe this should be coded to comply with the JSON-LD spec so there are no surprises later.
If the node object contains the @id key, its value MUST be an absolute IRI, a relative IRI, or a compact IRI (including blank node identifiers). See § 3.3 Node Identifiers, § 4.4 Compact IRIs, and § 4.16 Identifying Blank Nodes for further discussion on @id values.
Source: https://json-ld.org/spec/latest/json-ld/#node-objects
Saving an entity template when one already exists doesn't seem to update the data. That is, add a prop to an entity and save the template and the template data isn't updated.
I presume this is not intended behavior.
Steps to reproduce:
Manage Collection Data Files
.Expected behavior: Only the selected file will be added to the collection, as it happens with file that are located in the root folder.
This might be related to this Element UI bugreport.
Need a special URL component to produce an object with an @id and a url value
{ @id: 'http://.....' }
When adding files to the crate via the file selector a write back to the remote is not happening so the info from those files doesn't get written in unless a property is added to those entries.
@Heiss and I thought of a mechanism to allow 3rd party apps that embed Describo (like RDS) to manage profiles used in Describo on their own. This would allow us to modify and use profiles on the fly without having to worry about Describo knowing about them beforehand or Describo having to know about e.g. the current profile version for a specific repository service.
Proposal:
Sciebo RDS can use this field to manage the used profiles withouth changes in Describo. Sciebo RDS will take care of everything profile management related (like choosing the right version according to the repository service used or injected customization and adding new profiles), while Describo will simply use the profile provided in the request.
[1]
describo-online/test-iframe-mode.html
Line 36 in 109b232
Right now, the attribute set will only be filtered by the name
of an attribute. As people often won't be super familiar with the names of ro-crate attributes, filtering for whether a search term applies to the name
OR help
/description text of an attribute would give users a better chance to find what they are looking for.
It takes text values as options and produces
{@id: 'http:// .....' }
When working with the text commons profile Maria Weaver has added some RepositoryCollection entities as hasMember to another collection - these were showing in Describo but not getting written into the ro-crate-metadata.json - we went in and out of describo a few times and the entities persisted but were not written to disk.
Will have to get Maria to demo - as I have been unable to reproduce
When saving a crate file back to the storage layer check modification time of crate file on disk and if newer than updatedAt of the collection in the db, rename disk instance to ro-crate-metadata.${ISO timestamp}.conflict.json
before sending the serialisation from the db back to the storage layer.
Can we define in the profile some configuration that tells the UI to render a contributor field but when going to add one you get a dropdown of the sub contributor properties (e.g. annotator, depositor etc).
Potential UX issues: a user adds a contributor as annotator but then when the crate loads up next time we see the annotator field with the value. Is this an issue? To be determined.
Describo has two methods for authenticating users:
Describo is driven by a configuration file as documented at https://github.com/Arkisto-Platform/describo-online/blob/master/documentation/configuration.md:
Reva authentication will be similar to the okta flow. Following is a possible way to do it.
authentication
that defines the auth method for this installation 'okta' || 'reva'@components/Login.component.vue
and wire up to the /login
route in routes.js
OktaLoginComponent
or the RevaLoginComponent
@/components/RevaLogin.component.vue
which knows how to perform reva logins (in the Ailleron implementation you post to the API which then talks to Reva. Can this component talk to Reva directly the way the okta component does?`RevaLoginComponent
should then store the token in local | session storage and POST back to the API to create a session for the user (pretty much the same as what happens in @components/OktaLoginCallback.component
.http.service.getHeaders
to get the reva
token or okta
based on the authentication
property in the configurationOktaLoginComponent
and RevaLoginComponent
as vue plugins in https://github.com/Arkisto-Platform/describo-ui-plugins/session/reva
in @/routes/index.js
. It can be almost exactly like the handler for /session/okta
but calling reva to check the passed in token. Instantiate a DB session for the user to use the rest of the time in the same way as happens for the okta session.
@/middleware/demandKnownUser
with an option to handle authorization: reva ...
in the headers. Again, this will work the same way as okta where the session lookup happens on the db.While looking for a RO-Crate editor I just found Describo and tried the offline version and it is really impressive, thank you for your efforts!
Now I would like to try experimenting with Describo online and try to set up a local development environment. I have a couple of problems I couldn't find answers to reading through the wiki documentation.
First of all the architecture is not really clear to me: what is a backend and how does it relate to an auth provider and what is the postgresql dependency is used for when there's a backend?
This page states that "Authentication for describo is provided by Okta". But then the opening page also lists "reva configuration" as an authentication provider. And then it turns out that if ownCloud is the backend then ownCloud can be the auth provider as well.
So overall it is not clear what a backend is for, what an auth provider is for and how these can mix and match?
Then when I try to setup a local development environment following
https://github.com/Arkisto-Platform/describo-online/wiki/setting-up-for-development
step 3 is "Register your application with Microsoft" and 4. "Create an Okta organisation and setup your application". From my previous readings these should be optional steps rather than the actaul 3. or 4. steps, right? Moreover I would prefer not to use an external system like OneDrive and Okta if they arenot the actual target of my development.
What would really be helpful is an example with a docker-compose.yaml file, which sets up local dependencies for postgresql/backend/auth (ownCloud?, Minio?) and a configuration for Describo API and UI so that both of these can be run in development mode connecting to the services provided by the docker-compose.yaml.
Following discussion with @ptsefton
Add a layout property to each class defined in the profile that is an array of objects as follows:
"Dataset": {
"definition": "override",
"subClassOf": [],
"layout": [
{ name: "group1", description: "", inputs: [ "location", "name", "place"] },
{ name: "group2", description: "", inputs: [ "contributor", "annotator" ] }
{ name: "...", leftover things not grouped }
],
...
name
property defining the group namedescription
- optionalinputs
property with the ordered list of properties to include in this group.Any properties not defined in the layout must be added to the final tab in alphabetical order.
If a class does not have a layout property then properties must be listed in alphabetical order.
I am trying to use the latest version and both with the local and the onedrive configuration I get an error like this and ro-crate-metadata.json
doesn't get synced to neither to the local directory nor to onedrive (the temp ro-crate-metadata.json
exists and readable):
api_1 | 2022-09-29T12:35:53.217Z DEBUG: GET: /load/:service
api_1 | 2022-09-29T12:35:53.221Z DEBUG: POST: /profile
api_1 | 2022-09-29T12:35:53.264Z DEBUG: List folder: local /home/xxx/19
api_1 | 2022-09-29T12:35:53.355Z DEBUG: loading crate file @ /srv/tmp/b2303d0d-3ecc-4a96-ab04-977b7ad39109/current/ro-crate-metadata.json
api_1 | 2022-09-29T12:35:53.356Z DEBUG: Minting a new collection for this crate
api_1 | 2022-09-29T12:35:53.363Z DEBUG: Adding collection identifier to crate
api_1 | 2022-09-29T12:35:53.365Z DEBUG: Setting the collection id in the user session
api_1 | 2022-09-29T12:35:53.467Z ERROR: syncLocalFileToRemote: 2022/09/29 12:35:53 ERROR : : error listing: directory not found
api_1 | 2022/09/29 12:35:53 Failed to hashsum with 2 errors: last error was: directory not found
api_1 |
api_1 | Error: 2022/09/29 12:35:53 ERROR : : error listing: directory not found
api_1 | 2022/09/29 12:35:53 Failed to hashsum with 2 errors: last error was: directory not found
api_1 |
api_1 | at ChildProcess.<anonymous> (file:///srv/api/src/lib/file-browser_rclone.js:234:20)
api_1 | at ChildProcess.emit (events.js:400:28)
api_1 | at maybeClose (internal/child_process.js:1088:16)
api_1 | at Process.ChildProcess._handle.onexit (internal/child_process.js:296:5)
api_1 | 2022-09-29T12:35:53.469Z DEBUG: Loading the crate data into the database
api_1 | 2022-09-29T12:35:53.849Z DEBUG: GET: /entity/:entityId
api_1 | 2022-09-29T12:35:53.881Z DEBUG: POST: /definition
api_1 | 2022-09-29T12:35:53.929Z DEBUG: GET: /entity/:entityId/properties
My development-configuration.json is this:
{
"ui": {
"siteName": "Arkisto Platform - Describo",
"logo": "http://www.researchobject.org/ro-crate/assets/img/ro-crate.svg",
"login": "localhost",
"services": {
"localhost": true,
"onedrive": {
"clientId": "XXXXXXX",
"tenantId": "XXXXXXX",
"redirectUri": "http://localhost:9000/onedrive-callback"
}
},
"maxSessionLifetime": "86400",
"maxEntitiesPerTemplate": "100"
},
"api": {
"port": 8080,
"periodicProcessInterval": 300,
"typeDefinitions": "https://raw.githubusercontent.com/Arkisto-Platform/arkisto-type-definitions/master/types/type-definitions.json",
"typeDefinitionsLookup": "https://raw.githubusercontent.com/Arkisto-Platform/arkisto-type-definitions/master/types/type-definitions-lookup.json",
"session": {
"lifetime": {
"hours": 5
},
"secret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"services": {},
"applications": []
}
}
Update URL bar to keep state so back button works.
check browser console
When a user logs into describo and loads a folder, the API will communicate with the UI via socket io to send progress events for the user. If a second user then uses describo to do the same, the socket io comms will be seen by the first user in addition to the second user.
Obviously, the socket io comms need to be tied to a session so all users don't see them.
Currently if you add something to a property then that jumps to the top of the form. This is counter to the way forms normally work on the web and is confusing. (I know this was requested by someone, but IMO it is not a good UI choice - one we have the ability to split a profile into tabs or groups then the number of form fields showing at any one time will get smaller. Properties that are not essential can be shunted to an "Advanced" tab where they are out of sight for most users.
Save time in development. This feature might need to be turned off in production systems.
Add a property to the config to specify how old collections can be before being purged from the DB (max age) and associated code to do the cleanup.
The random IDs used should be prefixed with # as they are not URIs (paths)
This ticket is to list the requirements for describo profiles.
This is a revised development of the ideas @ https://github.com/Arkisto-Platform/describo/wiki/dsp-index. If a bullet point needs to be fleshed out further add a comment with the bullet point quoted and then follow on with the discussion.
Needs to allow the user to select a point on a map or draw a region and return a bbox.
If a point then create a GeoCoordinates entry.
If a bbox then create a GeoShape entry.
@ptsefton What do you think?
Problem: When I load this RO-Crate which contains some Classes, Properties and DefinedTerms for a vocabulary, and use this profile some of the links between items are are not picked up by Describo.
Things linked from the root dataset work OK:
But inter-item references get turned into Text fields:
Even when there are links to in the original crate:
{
"@id": "https://purl.archive.org/textcommons/terms#OrthographyTypeTerms",
"@type": "DefinedTermSet",
"hasDefinedTerm": [
{
"@id": "https://purl.archive.org/textcommons/terms#Handwritten"
},
{
"@id": "https://purl.archive.org/textcommons/terms#Typewritten"
},
{
"@id": "https://purl.archive.org/textcommons/terms#Typeset"
}
],
"name": "OrthographyTypeTerms"
},
I have tried re-linking using Describo, and that works, but if I remove the Describo Identifier and re-load the crate it reverts to the behaviour where it does not link.
If you do not provide okta
in ui.services
in configuration.json, then api container will not be started with error message: configuration.json not found
. For me, it has to be triggered in this line.
describo-online/api/src/common/index.js
Line 18 in 8ff05be
The error message is not very helpful, if other problems can trigger it, too.
Thank you.
See this example where the ID did not change but the @reverse link is actually correct.
{
"name": "alice",
"@id": "f0d9ca45-e662-4774-90f8-8c988ca64d96",
"@type": "Person",
"@reverse": {
"author": [
{
"@id": "http://orcid.org/test"
}
]
}
}
When linking to a new entity you type a name to create it - can we make it clearer where to click - instead of just clicking on the name below where you are typing, add a [Create] button beside to so you can click on either
Regarding Integrating Describo Online into owncloud: In the initial definition of the POST
session creation object, the key in L:4 is given as service
, whilst the example below shows the key as session
.
Looking at 23e2fca, I'm assuming that service
is the currently correct key name.
When the user clicks away from (say) the description field to another field it should auto save if possible.
When loading the following ro-crate in embedded mode
{
"@context": "https://w3id.org/ro/crate/1.1/context",
"@graph": [
{
"@type": "CreativeWork",
"@id": "ro-crate-metadata.json",
"conformsTo": {
"@id": "https://w3id.org/ro/crate/1.1"
},
"about": {
"@id": "./"
},
"identifier": [
{
"@id": "#:localid:describo:c20b02de-6832-4aa5-b8ba-a3f569b79809"
}
]
},
{
"@id": "./",
"@type": "Dataset",
"name": "RO Crate Name Test",
"@reverse": {}
}
]
}
I get the following screen that shows the default crate name instead of the one that is contained in the crate:
Is this expected behaviour?
Element plus offers a native dark mode, which could be triggered by e.g. window.postMessage
: https://element-plus.org/en-US/guide/dark-mode.html
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.