```
{
"API_HOST": "string",
- "VOCABULARY_URL": "string"
+ "VOCABULARY_URL": "string",
+ "FILE_VIEWERS_CONFIG_URL": "string",
}
```
Local path, or any URL that allows cross-origin requests. See
[Vocabulary JSON file example](public/vocabulary-example.json).
+### FILE_VIEWERS_CONFIG_URL
+Local path, or any URL that allows cross-origin requests. See:
+
+[File viewers config file example](public/file-viewers-example.json)
+
+[File viewers config scheme](src/models/file-viewers-config.ts)
+
### Licensing
Arvados is Free Software. See COPYING for information about Arvados Free
--- /dev/null
+[
+ {
+ "name": "File browser",
+ "extensions": [
+ ".txt",
+ ".zip"
+ ],
+ "url": "https://doc.arvados.org",
+ "filePathParam": "filePath"
+ },
+ {
+ "name": "Collection browser",
+ "extensions": [],
+ "collections": true,
+ "url": "https://doc.arvados.org",
+ "filePathParam": "collectionPath"
+ },
+ {
+ "name": "Universal browser",
+ "collections": true,
+ "url": "https://doc.arvados.org",
+ "filePathParam": "filePath"
+ }
+]
\ No newline at end of file
websocketUrl: string;
workbenchUrl: string;
vocabularyUrl: string;
+ fileViewersConfigUrl: string;
}
export const fetchConfig = () => {
websocketUrl: '',
workbenchUrl: '',
vocabularyUrl: '',
+ fileViewersConfigUrl: '',
...config
});
interface ConfigJSON {
API_HOST: string;
VOCABULARY_URL: string;
+ FILE_VIEWERS_CONFIG_URL: string;
}
const getDefaultConfig = (): ConfigJSON => ({
API_HOST: process.env.REACT_APP_ARVADOS_API_HOST || "",
VOCABULARY_URL: "",
+ FILE_VIEWERS_CONFIG_URL: "",
});
const getDiscoveryURL = (apiHost: string) => `${window.location.protocol}//${apiHost}/discovery/v1/apis/arvados/v1/rest`;