/
AppModel.js
1245 lines (1142 loc) · 50.8 KB
/
AppModel.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*global define */
define(['jquery', 'underscore', 'backbone'],
function($, _, Backbone) {
'use strict';
/**
* @class AppModel
* @classdesc A utility model that contains top-level configuration and storage for the application
* @name AppModel
* @extends Backbone.Model
* @constructor
*/
var AppModel = Backbone.Model.extend(
/** @lends AppModel.prototype */ {
defaults: _.extend(
/** @lends AppConfig.prototype */{
//TODO: These attributes are stored in the AppModel, but shouldn't be set in the AppConfig,
//so we need to add docs for them in a separate place
headerType: 'default',
searchMode: MetacatUI.mapKey ? 'map' : 'list',
searchHistory: [],
page: 0,
previousPid: null,
lastPid: null,
anchorId: null,
profileUsername: null,
/**
* The theme name to use
* @type {string}
* @default "default"
*/
theme: "default",
/**
* The default page title.
* @type {string}
*/
title: MetacatUI.themeTitle || "Metacat Data Catalog",
/**
* The name of this repository. This is used throughout the interface in different
* messages and page content.
* @type {string}
* @default "Metacat Data Catalog"
*/
repositoryName: MetacatUI.themeTitle || "Metacat Data Catalog",
/**
* The e-mail address that people should contact when they need help with
* submitting datasets, resolving error messages, etc.
* @type {string}
* @default knb-help@nceas.ucsb.edu
*/
emailContact: "knb-help@nceas.ucsb.edu",
/**
* Your Google Maps API key, which is used to diplay interactive maps on the search
* views and static maps on dataset landing pages.
* If a Google Maps API key is no specified, the maps will be omitted from the interface.
* Sign up for Google Maps services at https://console.developers.google.com/
* @type {string}
* @example "AIzaSyCYyHnbIokUEpMx5M61ButwgNGX8fIHUs"
* @default null
*/
mapKey: null,
/**
* Your Google Analytics API key, which is used to send page view and custom events
* to the Google Analytics service.
* This service is optional in MetacatUI.
* Sign up for Google Analytics services at https://analytics.google.com/analytics/web/
* @type {string}
* @example "UA-74622301-1"
* @default null
*/
googleAnalyticsKey: null,
/**
* The node identifier for this repository. This is set dynamically by retrieving the
* DataONE Coordinating Node document and finding this repository in the Node list.
* (see https://cn.dataone.org/cn/v2/node).
* If this repository is not registered with DataONE, then set this node id by copying
* the node id from your node info at https://your-repo-site.com/metacat/d1/mn/v2/node
* @type {string}
* @example "urn:node:METACAT"
* @default null
*/
nodeId: null,
/**
* Enable or disable the user profiles. If enabled, users will see a "My profile" link
* and can view their datasets, metrics on those datasets, their groups, etc.
* @type {boolean}
* @default true
*/
enableUserProfiles: true,
/**
* Enable or disable the user settings view. If enabled, users will see a list of
* changeable settings - name, email, groups, portals, etc.
* @type {boolean}
* @default true
*/
enableUserProfileSettings: true,
/**
* The maximum dataset .zip file size, in bytes, that a user can download.
* Datasets whose total size are larger than this maximum will show a disabled
* "Download All" button, and users will be directed to download files individually.
* This is useful for preventing the Metacat package service from getting overloaded.
* @type {number}
* @default 3000000000
*/
maxDownloadSize: 3000000000,
/**
* Add a message that will display during a certain time period. This is useful when
* displaying a warning message about planned outages/maintenance, or alert users to other
* important information.
* If this attribute is left blank, no message will display, even if there is a start and end time specified.
* If there are is no start or end time specified, this message will display until you remove it here.
*
* @type {string}
* @default null
*/
temporaryMessage: null,
/**
* If there is a temporaryMessage specified, it will display after this start time.
* Remember that Dates are in GMT time!
* @type {Date}
* @default null
*/
temporaryMessageStartTime: null,
/**
* If there is a temporaryMessage specified, it will display before this end time.
* Remember that Dates are in GMT time!
* @type {Date}
* @default null
*/
temporaryMessageEndTime: null,
/**
* Additional HTML classes to give the temporary message element. Use these to style the message.
* @type {string}
* @default "warning"
*/
temporaryMessageClasses: "warning",
/**
* A jQuery selector for the element that the temporary message will be displayed in.
* @type {string}
* @default "#Navbar"
*/
temporaryMessageContainer: "#Navbar",
/**
* Show or hide the source repository logo in the search result rows
* @type {boolean}
* @default false
*/
displayRepoLogosInSearchResults: false,
/**
* Show or hide the Download button in the search result rows
* @type {boolean}
* @default false
*/
displayDownloadButtonInSearchResults: false,
/**
* If set to false, some parts of the app will send POST HTTP requests to the
* Solr search index via the `/query/solr` DataONE API.
* Set this configuration to true if using Metacat 2.10.2 or earlier
* @type {boolean}
*/
disableQueryPOSTs: false,
/** If set to true, some parts of the app will use the Solr Join Query syntax
* when sending queries to the `/query/solr` DataONE API.
* If this is not enabled, then some parts of the UI may not work if a query has too
* many characters or has too many boolean clauses. This impacts the "Metrics" tabs of portals/collections,
* at least.
* The Solr Join Query Parser as added in Solr 4.0.0-ALPHA (I believe!): https://archive.apache.org/dist/lucene/solr/4.0.0/changes/Changes.html#4.0.0-alpha.new_features
* About the Solr Join Query Parser: https://lucene.apache.org/solr/guide/8_5/other-parsers.html#join-query-parser
* WARNING: At some point, MetacatUI will deprecate this configuration and will REQUIRE Solr Join Queries
* @type {boolean}
*/
enableSolrJoins: false,
/**
* The search filters that will be displayed in the search views. Add or remove
* filter names from this array to show or hide them. See "example" to see all the
* filter options.
* @type {string[]}
* @default ["all", "attribute", "documents", "creator", "dataYear", "pubYear", "id", "taxon", "spatial"]
* @example ["all", "annotation", "attribute", "documents", "creator", "dataYear", "pubYear", "id", "taxon", "spatial"]
*/
defaultSearchFilters: ["all", "attribute", "documents", "creator", "dataYear", "pubYear", "id", "taxon", "spatial"],
/**
* Enable to show Whole Tale features
* @type {Boolean}
* @default false
*/
showWholeTaleFeatures: false,
/**
* The WholeTale environments that are exposed on the dataset landing pages
* @type {string[]}
* @default ["RStudio", "Jupyter Notebook"]
*/
taleEnvironments: ["RStudio", "Jupyter Notebook"],
/**
* The Whole Tale endpoint
* @type {string}
* @default 'https://girder.wholetale.org/api/v1/integration/dataone'
*/
dashboardUrl: 'https://girder.wholetale.org/api/v1/integration/dataone',
/**
* A list of all the required fields in the EML Editor.
* Any field set to `true` will prevent the user from saving the Editor until a value has been given
* Any EML field not supported in this list cannot be required.
* @type {object}
* @property {boolean} abstract - Default: true
* @property {boolean} alternateIdentifier - Default: false
* @property {boolean} funding - Default: false
* @property {boolean} generalTaxonomicCoverage - Default: false
* @property {boolean} taxonCoverage - Default: false. If true, at least one taxonomic rank and value will be required.
* @property {boolean} geoCoverage - Default: false. If true, at least one geographic coverage description and point/bounding box will be required.
* @property {boolean} intellectualRights - Default: true
* @property {boolean} keywordSets - Default: false. If true, at least one keyword will be required.
* @property {boolean} methods - Default: false. If true, at least one method step will be required.
* @property {boolean} samplingDescription - Default: false
* @property {boolean} studyExtentDescription - Default: false
* @property {boolean} temporalCoverage - Default: false. If true, at least a beginDate will be required.
* @property {boolean} title - Default: true. EML documents always require a title. Only set this to false if you are extending MetacatUI to ensure a title another way.
*/
emlEditorRequiredFields: {
abstract: true,
alternateIdentifier: false,
funding: false,
generalTaxonomicCoverage: false,
taxonCoverage: false,
geoCoverage: false,
intellectualRights: true,
keywordSets: false,
methods: false,
samplingDescription: false,
studyExtentDescription: false,
temporalCoverage: false,
title: true
},
/**
* The metadata formats that are editable in the EditorView. Metadata types not listed
* here will not show an Edit button.
* @type {string[]}
*/
editableFormats: ["eml://ecoinformatics.org/eml-2.1.1"],
/**
* This error message is displayed when the Editor encounters an error saving
* @type {string}
*/
editorSaveErrorMsg: "Not all of your changes could be submitted.",
/**
* This error message is displayed when the Editor encounters an error saving, and a plain-text draft is saved instead
* @type {string}
*/
editorSaveErrorMsgWithDraft: "Not all of your changes could be submitted, but a draft " +
"has been saved which can be accessed by our support team. Please contact us.",
/**
* A list of keyword thesauri options for the user to choose from in the EML Editor.
* A "None" option will also always display.
* @type {object[]}
* @property {string} label - A readable and short label for the keyword thesaurus that is displayed in the UI
* @property {string} thesaurus - The exact keyword thesaurus name that will be saved in the EML
*/
emlKeywordThesauri: [{
label: "GCMD",
thesaurus: "NASA Global Change Master Directory (GCMD)"
}],
/**
* The base URL for the repository. This only needs to be changed if the repository
* is hosted at a different origin than the MetacatUI origin. This URL is used to contruct all
* of the DataONE REST API URLs. If you are testing MetacatUI against a development repository
* at an external location, this is where you would set that external repository URL.
* @type {string}
* @default window.location.origin || (window.location.protocol + "//" + window.location.host)
*/
baseUrl: window.location.origin || (window.location.protocol + "//" + window.location.host),
/**
* The directory that metacat is installed in at the `baseUrl`. For example, if you
* have metacat installed in the tomcat webapps directory as `metacat`, then this should be set
* to "/metacat". Or if you renamed the metacat webapp to `catalog`, then it should be `/catalog`.
* @type {string}
* @default "/metacat"
*/
context: MetacatUI.AppConfig.metacatContext || '/metacat',
/**
* The URL fragment for the DataONE Member Node (MN) API.
* @type {string}
* @default '/d1/mn/v2'
*/
d1Service: '/d1/mn/v2',
/**
* The base URL of the DataONE Coordinating Node (CN). CHange this if you
* are testing a deployment in a development environment.
* @type {string}
* @default "https://cn.dataone.org/"
* @example "https://cn-stage.test.dataone.org/""
*/
d1CNBaseUrl: "https://cn.dataone.org/",
/**
* The URL fragment for the DataONE Coordinating Node (CN) API.
* @type {string}
* @default 'cn/v2'
*/
d1CNService: "cn/v2",
/**
* The URL for the DataONE listNodes() API. This URL is contructed dynamically when the
* AppModel is initialized. Only override this if you are an advanced user and have a reason to!
* (see https://releases.dataone.org/online/api-documentation-v2.0/apis/CN_APIs.html#CNCore.listNodes)
* @type {string}
*/
nodeServiceUrl: null,
/**
* The URL for the DataONE View API. This URL is contructed dynamically when the
* AppModel is initialized. Only override this if you are an advanced user and have a reason to!
* (see https://releases.dataone.org/online/api-documentation-v2.0/apis/MN_APIs.html#module-MNView)
* @type {string}
*/
viewServiceUrl: null,
/**
* The URL for the DataONE getPackage() API. This URL is contructed dynamically when the
* AppModel is initialized. Only override this if you are an advanced user and have a reason to!
* (see https://releases.dataone.org/online/api-documentation-v2.0/apis/MN_APIs.html#MNPackage.getPackage)
*
* @type {string}
*/
packageServiceUrl: null,
/**
* The URL for the Metacat Publish service. This URL is contructed dynamically when the
* AppModel is initialized. Only override this if you are an advanced user and have a reason to!
* @type {string}
*/
publishServiceUrl: null,
/**
* The URL for the DataONE isAuthorized() API. This URL is contructed dynamically when the
* AppModel is initialized. Only override this if you are an advanced user and have a reason to!
* (see https://releases.dataone.org/online/api-documentation-v2.0/apis/MN_APIs.html#MNAuthorization.isAuthorized)
* @type {string}
*/
authServiceUrl: null,
/**
* The URL for the DataONE query API. This URL is contructed dynamically when the
* AppModel is initialized. Only override this if you are an advanced user and have a reason to!
* (see https://releases.dataone.org/online/api-documentation-v2.0/apis/MN_APIs.html#MNQuery.query)
* @type {string}
*/
queryServiceUrl: null,
/**
* The URL for the DataONE reserveIdentifier() API. This URL is contructed dynamically when the
* AppModel is initialized. Only override this if you are an advanced user and have a reason to!
* (see https://releases.dataone.org/online/api-documentation-v2.0/apis/CN_APIs.html#CNCore.reserveIdentifier)
* @type {string}
*/
reserveServiceUrl: null,
/**
* The URL for the DataONE system metadata API. This URL is contructed dynamically when the
* AppModel is initialized. Only override this if you are an advanced user and have a reason to!
* (see https://releases.dataone.org/online/api-documentation-v2.0/apis/MN_APIs.html#MNRead.getSystemMetadata
* and https://releases.dataone.org/online/api-documentation-v2.0/apis/MN_APIs.html#MNStorage.updateSystemMetadata)
* @type {string}
*/
metaServiceUrl: null,
/**
* The URL for the DataONE system metadata API. This URL is contructed dynamically when the
* AppModel is initialized. Only override this if you are an advanced user and have a reason to!
* (see https://releases.dataone.org/online/api-documentation-v2.0/apis/MN_APIs.html#MNRead.getSystemMetadata
* and https://releases.dataone.org/online/api-documentation-v2.0/apis/MN_APIs.html#MNStorage.updateSystemMetadata)
* @type {string}
*/
objectServiceUrl: null,
/**
* The URL for the DataONE Formats API. This URL is contructed dynamically when the
* AppModel is initialized. Only override this if you are an advanced user and have a reason to!
* (see https://releases.dataone.org/online/api-documentation-v2.0/apis/CN_APIs.html#CNCore.listFormats)
* @type {string}
*/
formatsServiceUrl: null,
/**
* The URL fragment for the DataONE Formats API. This is combined with the AppConfig#formatsServiceUrl
* @type {string}
* @default "/formats"
*/
formatsUrl: "/formats",
/**
* If true, parts of the UI (most notably, "funding" field in the dataset editor)
* may look up NSF Award information
* @type {boolean}
* @default false
*/
useNSFAwardAPI: false,
/**
* The URL for the NSF Award API, which can be used by the {@link LookupModel}
* to look up award information for the dataset editor or other views
* @type {string}
* @default "https://api.nsf.gov/services/v1/awards.json"
*/
grantsUrl: "https://api.nsf.gov/services/v1/awards.json",
/**
* The base URL for the ORCID REST services
* @type {string}
* @default "https:/orcid.org"
*/
orcidBaseUrl: "https:/orcid.org",
/**
* The URL for the ORCID search API, which can be used to search for information
* about people using their ORCID, email, name, etc.
* This URL is constructed dynamically once the {@link AppModel} is initialized.
* @type {string}
*/
orcidSearchUrl: null,
/**
* The URL for the Metacat API. The Metacat API has been deprecated and is kept here
* for compatability with Metacat repositories that are using the old x509 certificate
* authentication mechanism. This is deprecated since authentication is now done via
* the DataONE Portal service using auth tokens. (Using the {@link AppConfig#tokenUrl})
* This URL is contructed dynamically when the AppModel is initialized.
* Only override this if you are an advanced user and have a reason to!
* @type {string}
*/
metacatServiceUrl: null,
/**
* If false, the /monitor/status (the service that returns the status of various DataONE services) will not be used.
* @type {boolean}
*/
enableMonitorStatus: true,
/**
* The URL for the service that returns the status of various DataONE services.
* The only supported status so far is the search index queue -- the number of
* objects that are waiting to be indexed in the Solr search index.
* This URL is contructed dynamically when the
* AppModel is initialized. Only override this if you are an advanced user and have a reason to!
* @type {string}
*/
monitorStatusUrl: "",
/**
* If true, users can sign in using CILogon as the identity provider.
* ORCID is the only recommended identity provider. CILogon may be deprecated
* in the future.
* @type {boolean}
* @default false
*/
enableCILogonSignIn: false,
/**
* The URL for the DataONE Sign In API using CILogon as the identity provider
* This URL is constructed dynamically once the {@link AppModel} is initialized.
* @type {string}
*/
signInUrl: null,
/**
* The URL for the DataONE Sign Out API
* This URL is constructed dynamically once the {@link AppModel} is initialized.
* @type {string}
*/
signOutUrl: null,
/**
* The URL for the DataONE Sign In API using ORCID as the identity provider
* This URL is constructed dynamically once the {@link AppModel} is initialized.
* @type {string}
*/
signInUrlOrcid: null,
/**
* Enable DataONE LDAP authentication. If true, users can sign in from an LDAP account that is in the DataONE CN LDAP directory.
* This is not recommended, as DataONE is moving towards supporting only ORCID logins for users.
* This LDAP authentication is separate from the File-based authentication for the Metacat Admin interface.
* @type {boolean}
* @default false
*/
enableLdapSignIn: false,
/**
* The URL for the DataONE Sign In API using LDAP as the identity provider
* This URL is constructed dynamically once the {@link AppModel} is initialized.
* @type {string}
*/
signInUrlLdap: null,
/**
* The URL for the DataONE Token API using ORCID as the identity provider
* This URL is constructed dynamically once the {@link AppModel} is initialized.
* @type {string}
*/
tokenUrl: null,
/**
* The URL for the DataONE echoCredentials() API
* This URL is constructed dynamically once the {@link AppModel} is initialized.
* (see https://releases.dataone.org/online/api-documentation-v2.0/apis/CN_APIs.html#CNDiagnostic.echoCredentials)
* @type {string}
*/
checkTokenUrl: null,
/**
* The URL for the DataONE Identity API
* This URL is constructed dynamically once the {@link AppModel} is initialized.
* (see https://releases.dataone.org/online/api-documentation-v2.0/apis/CN_APIs.html#module-CNIdentity)
* @type {string}
*/
accountsUrl: null,
/**
* The URL for the DataONE Pending Maps API
* This URL is constructed dynamically once the {@link AppModel} is initialized.
* (see https://releases.dataone.org/online/api-documentation-v2.0/apis/CN_APIs.html#CNIdentity.getPendingMapIdentity)
* @type {string}
*/
pendingMapsUrl: null,
/**
* The URL for the DataONE mapIdentity() API
* This URL is constructed dynamically once the {@link AppModel} is initialized.
* (see https://releases.dataone.org/online/api-documentation-v2.0/apis/CN_APIs.html#CNIdentity.mapIdentity)
* @type {string}
*/
accountsMapsUrl: null,
/**
* The URL for the DataONE Groups API
* This URL is constructed dynamically once the {@link AppModel} is initialized.
* (see https://releases.dataone.org/online/api-documentation-v2.0/apis/CN_APIs.html#CNIdentity.createGroup)
* @type {string}
*/
groupsUrl: null,
/**
* The URL for the DataONE metadata assessment service
* @type {string}
* @default "https://docker-ucsb-4.dataone.org:30443/quality"
*/
mdqBaseUrl: "https://docker-ucsb-4.dataone.org:30443/quality",
/**
* Metadata Assessment Suite IDs for the dataset assessment reports.
* @type {string[]}
* @default ["FAIR.suite.1"]
*/
mdqSuiteIds: ["FAIR.suite.1"],
/**
* Metadata Assessment Suite labels for the dataset assessment reports
* @type {string[]}
* @default ["FAIR Suite v1.0"]
*/
mdqSuiteLabels: ["FAIR Suite v1.0"],
/**
* Metadata Assessment Suite IDs for the aggregated assessment charts
* @type {string[]}
* @default ["FAIR.suite.1"]
*/
mdqAggregatedSuiteIds: ["FAIR.suite.1"],
/**
* Metadata Assessment Suite labels for the aggregated assessment charts
* @type {string[]}
* @default ["FAIR.suite.1"]
*/
mdqAggregatedSuiteLabels: ["FAIR Suite v1.0"],
/**
* The metadata formats for which to display metadata assessment reports
* @type {string[]}
* @default ["eml*", "https://eml*", "*isotc211*"]
*/
mdqFormatIds:["eml*", "https://eml*", "*isotc211*"],
/**
* Metrics endpoint url
* @type {string}
*/
metricsUrl: 'https://logproc-stage-ucsb-1.test.dataone.org/metrics',
/**
* Hide or show the aggregated citations chart in the StatsView.
* These charts are only available for DataONE Plus members or Hosted Repositories.
* (see https://dataone.org)
* @type {boolean}
* @default true
*/
hideSummaryCitationsChart: true,
/**
* Hide or show the aggregated downloads chart in the StatsView
* These charts are only available for DataONE Plus members or Hosted Repositories.
* (see https://dataone.org)
* @type {boolean}
* @default true
*/
hideSummaryDownloadsChart: true,
/**
* Hide or show the aggregated metadata assessment chart in the StatsView
* These charts are only available for DataONE Plus members or Hosted Repositories.
* (see https://dataone.org)
* @type {boolean}
* @default true
*/
hideSummaryMetadataAssessment: true,
/**
* Hide or show the aggregated views chart in the StatsView
* These charts are only available for DataONE Plus members or Hosted Repositories.
* (see https://dataone.org)
* @type {boolean}
* @default true
*/
hideSummaryViewsChart: true,
/**
* List of Repositories that are DataONE Plus Members
* DataONE Plus features are displayed only for these members.
* @type {string[]}
* @default ["urn:node:ARCTIC"]
*/
dataonePlusMembers: ["urn:node:ARCTIC", "urn:node:ESS_DIVE", "urn:node:KNB"],
/**
* Metrics flag for the Dataset Landing Page
* Enable this flag to enable metrics display
* @type {boolean}
* @default true
*/
displayDatasetMetrics: true,
/**
* If true, displays the dataset metrics tooltips on the metrics buttons.
* Turn off all dataset metrics displays using the {@link AppConfig#displayDatasetMetrics}
* @type {boolean}
* @default true
*/
displayDatasetMetricsTooltip: true,
/**
* If true, displays the datasets metric modal windows on the dataset landing page
* Turn off all dataset metrics displays using the {@link AppConfig#displayDatasetMetrics}
* @type {boolean}
* @default true
*/
displayMetricModals: true,
/**
* If true, displays the dataset citation metrics on the dataset landing page
* Turn off all dataset metrics displays using the {@link AppConfig#displayDatasetMetrics}
* @type {boolean}
* @default true
*/
displayDatasetCitationMetric: true,
/**
* If true, displays the dataset download metrics on the dataset landing page
* Turn off all dataset metrics displays using the {@link AppConfig#displayDatasetMetrics}
* @type {boolean}
* @default true
*/
displayDatasetDownloadMetric: true,
/**
* If true, displays the dataset view metrics on the dataset landing page
* Turn off all dataset metrics displays using the {@link AppConfig#displayDatasetMetrics}
* @type {boolean}
* @default true
*/
displayDatasetViewMetric: true,
/**
* If true, displays the "Edit" button on the dataset landing page
* @type {boolean}
* @default true
*/
displayDatasetEditButton: true,
/**
* If true, displays the metadata assessment metrics on the dataset landing page
* @type {boolean}
* @default false
*/
displayDatasetQualityMetric: false,
/**
* If true, displays the WholeTale "Analyze" button on the dataset landing page
* @type {boolean}
* @default false
*/
displayDatasetAnalyzeButton: false,
/**
* If true, displays various buttons on the dataset landing page for dataset owners
* @type {boolean}
* @default false
*/
displayDatasetControls: true,
/** Hide metrics display for SolrResult models that match the given properties.
* Properties can be functions, which are given the SolrResult model value as a parameter.
* Turn off all dataset metrics displays using the {@link AppConfig#displayDatasetMetrics}
* @type {object}
* @example
* {
* formatId: "eml://ecoinformatics.org/eml-2.1.1",
* isPublic: true,
* dateUploaded: function(date){
* return new Date(date) < new Date('1995-12-17T03:24:00');
* }
* }
* This example would hide metrics for any objects that are:
* EML 2.1.1 OR public OR were uploaded before 12/17/1995.
*/
hideMetricsWhen: null,
/**
* If true, the dataset landing pages will generate Schema.org-compliant JSONLD
* and insert it into the page.
* @type {boolean}
* @default true
*/
isJSONLDEnabled: true,
/**
* If true, users can see a "Publish" button in the MetadataView, which makes the metadata
* document public and gives it a DOI identifier.
* If false, the button will be hidden completely.
* @type {boolean}
* @default true
*/
enablePublishDOI: true,
/**
* A list of users or groups who exclusively will be able to see and use the "Publish" button,
* which makes the metadata document public and gives it a DOI identifier.
* Anyone not in this list will not be able to see the Publish button.
* `enablePublishDOI` must be set to `true` for this to take effect.
* @type {string[]}
*/
enablePublishDOIForSubjects: [],
/**
* If true, users can change the AccessPolicy for their objects.
* @type {boolean}
* @default true
*/
allowAccessPolicyChanges: true,
/**
* The default Access Policy set on new objects uploaded to the repository.
* Each literal object here gets set directly on an AccessRule model.
* See the AccessRule model list of default attributes for options on what to set here.
* @see {@link AccessRule}
* @type {object[]}
*/
defaultAccessPolicy: [{
subject: "public",
read: true
}],
/**
* The user-facing name for editing the Access Policy. This is displayed as the header of the AccessPolicyView, for example
* @type {string}
*/
accessPolicyName: "Sharing options",
/**
* @type {object}
* @property {boolean} accessRuleOptions.read - If true, users will be able to give others read access to their DataONE objects
* @property {boolean} accessRuleOptions.write - If true, users will be able to give others write access to their DataONE objects
* @property {boolean} accessRuleOptions.changePermission - If true, users will be able to give others changePermission access to their DataONE objects
*/
accessRuleOptions: {
read: true,
write: true,
changePermission: true
},
/**
* @type {object}
* @property {boolean} accessRuleOptionNames.read - The user-facing name of the "read" access in Access Rules
* @property {boolean} accessRuleOptionNames.write - The user-facing name of the "write" access in Access Rules
* @property {boolean} accessRuleOptionNames.changePermission - The user-facing name of the "changePermission" access in Access Rules
*/
accessRuleOptionNames: {
read: "Can view",
write: "Can edit",
changePermission: "Is owner"
},
/**
* If false, the rightsHolder of a resource will not be displayed in the AccessPolicyView.
* @type {boolean}
* @default true
*/
displayRightsHolderInAccessPolicy: true,
/**
* If false, users will not be able to change the rightsHolder of a resource in the AccessPolicyView
* @type {boolean}
* @default true
*/
allowChangeRightsHolder: true,
/**
* A list of group subjects that will be hidden in the AccessPolicy view to
* everyone except those in the group. This is useful for preventing users from
* removing repository administrative groups from access policies.
* @type {string[]}
*/
hiddenSubjectsInAccessPolicy: [],
/**
* If true, the public/private toggle will be displayed in the Sharing Options for portals.
* @type {boolean}
* @default true
*/
showPortalPublicToggle: true,
/**
* The public/private toggle will be displayed in the Sharing Options for portals for only
* the given users or groups. To display the public/private toggle for everyone,
* set `showPortalPublicToggle` to true and keep this array empty.
* @type {string[]}
*/
showPortalPublicToggleForSubjects: [],
/**
* If true, the public/private toggle will be displayed in the Sharing Options for datasets.
* @type {boolean}
* @default true
*/
showDatasetPublicToggle: true,
/**
* Set to false to hide the display of "My Portals", which shows the user's current portals
* @type {boolean}
* @default true
*/
showMyPortals: true,
/**
* The user-facing term for portals in lower-case and in singular form.
* e.g. "portal"
* @type {string}
* @default "portal"
*/
portalTermSingular: "portal",
/**
* The user-facing term for portals in lower-case and in plural form.
* e.g. "portals". This allows for portal terms with irregular plurals.
* @type {string}
* @default "portals"
*/
portalTermPlural: "portals",
/**
* Set to false to prevent ANYONE from creating a new portal.
* @type {boolean}
* @default true
*/
enableCreatePortals: true,
/**
* Limits only the following people or groups to create new portals.
* @type {string[]}
*/
limitPortalsToSubjects: [],
/**
* This message will display when a user tries to create a new Portal in the PortalEditor
* when they are not associated with a whitelisted subject in the `limitPortalsToSubjects` list
* @type {string}
*/
portalEditNotAuthCreateMessage: "You have not been authorized to create new portals. Please contact us with any questions.",
/**
* This message will display when a user tries to access the Portal Editor for a portal
* for which they do not have write permission.
* @type {string}
*/
portalEditNotAuthEditMessage: "The portal owner has not granted you permission to edit this portal. Please contact the owner to be given edit permission.",
/**
* This message will display when a user tries to create a new portal when they have exceeded their DataONE portal quota
* @type {string}
*/
portalEditNoQuotaMessage: "You have already reached the maximum number of portals for your membership level.",
/**
* This message will display when there is any non-specific error during the save process of the PortalEditor.
* @type {string}
*/
portalEditSaveErrorMsg: "Something went wrong while attempting to save your changes.",
/**
* The list of fields that should be required in the portal editor.
* Set individual properties to `true` to require them in the portal editor.
* @type {object}
* @property {boolean} label - Default: true
* @property {boolean} name - Default: true
* @property {boolean} description - Default: false
* @property {boolean} sectionTitle - Default: true
* @property {boolean} sectionIntroduction - Default: false
* @property {boolean} logo - Default: false
*/
portalEditorRequiredFields: {
label: true,
name: true,
description: false,
sectionTitle: true,
sectionIntroduction: false,
logo: false,
//The following fields are not yet supported as required fields in the portal editor
//TODO: Add support for requiring the below fields
sectionImage: false,
acknowledgments: false,
acknowledgmentsLogos: false,
awards: false,
associatedParties: false
},
/**
* The list of portals labels that no one should be able to create portals with
* @type {string[]}
*/
portalLabelBlockList: [
"Dataone",
'urn:node:CN', 'CN', 'cn',
'urn:node:CNUNM1', 'CNUNM1', 'cn-unm-1',
'urn:node:CNUCSB1', 'CNUCSB1', 'cn-ucsb-1',
'urn:node:CNORC1', 'CNORC1', 'cn-orc-1',
'urn:node:KNB', 'KNB', 'KNB Data Repository',
'urn:node:ESA', 'ESA', 'ESA Data Registry',
'urn:node:SANPARKS', 'SANPARKS', 'SANParks Data Repository',
'urn:node:ORNLDAAC', 'ORNLDAAC', 'ORNL DAAC',
'urn:node:LTER', 'LTER', 'U.S. LTER Network',
'urn:node:CDL', 'CDL', 'UC3 Merritt',
'urn:node:PISCO', 'PISCO', 'PISCO MN',
'urn:node:ONEShare', 'ONEShare', 'ONEShare DataONE Member Node',
'urn:node:mnORC1', 'mnORC1', 'DataONE ORC Dedicated Replica Server',
'urn:node:mnUNM1', 'mnUNM1', 'DataONE UNM Dedicated Replica Server',
'urn:node:mnUCSB1', 'mnUCSB1', 'DataONE UCSB Dedicated Replica Server',
'urn:node:TFRI', 'TFRI', 'TFRI Data Catalog',
'urn:node:USANPN', 'USANPN', 'USA National Phenology Network',
'urn:node:SEAD', 'SEAD', 'SEAD Virtual Archive',
'urn:node:GOA', 'GOA', 'Gulf of Alaska Data Portal',
'urn:node:KUBI', 'KUBI', 'University of Kansas - Biodiversity Institute',
'urn:node:LTER_EUROPE', 'LTER_EUROPE', 'LTER Europe Member Node',
'urn:node:DRYAD', 'DRYAD', 'Dryad Digital Repository',
'urn:node:CLOEBIRD', 'CLOEBIRD', 'Cornell Lab of Ornithology - eBird',
'urn:node:EDACGSTORE', 'EDACGSTORE', 'EDAC Gstore Repository',
'urn:node:IOE', 'IOE', 'Montana IoE Data Repository',
'urn:node:US_MPC', 'US_MPC', 'Minnesota Population Center',
'urn:node:EDORA', 'EDORA', 'Environmental Data for the Oak Ridge Area (EDORA)',
'urn:node:RGD', 'RGD', 'Regional and Global biogeochemical dynamics Data (RGD)',
'urn:node:GLEON', 'GLEON', 'GLEON Data Repository',
'urn:node:IARC', 'IARC', 'IARC Data Archive',
'urn:node:NMEPSCOR', 'NMEPSCOR', 'NM EPSCoR Tier 4 Node',
'urn:node:TERN', 'TERN', 'TERN Australia',
'urn:node:NKN', 'NKN', 'Northwest Knowledge Network',
'urn:node:USGS_SDC', 'USGS_SDC', 'USGS Science Data Catalog',
'urn:node:NRDC', 'NRDC', 'NRDC DataONE member node',
'urn:node:NCEI', 'NCEI', 'NOAA NCEI Environmental Data Archive',
'urn:node:PPBIO', 'PPBIO', 'PPBio',
'urn:node:NEON', 'NEON', 'NEON Member Node',
'urn:node:TDAR', 'TDAR', 'The Digital Archaeological Record',
'urn:node:ARCTIC', 'ARCTIC', 'Arctic Data Center',
'urn:node:BCODMO', 'BCODMO', 'Biological and Chemical Oceanography Data Management Office (BCO-DMO) ',
'urn:node:GRIIDC', 'GRIIDC', 'Gulf of Mexico Research Initiative Information and Data Cooperative (GRIIDC)',
'urn:node:R2R', 'R2R', 'Rolling Deck to Repository (R2R)',
'urn:node:EDI', 'EDI', 'Environmental Data Initiative',
'urn:node:UIC', 'UIC', 'A Member Node for University of Illinois at Chicago.',
'urn:node:RW', 'RW', 'Research Workspace',
'urn:node:FEMC', 'FEMC', 'Forest Ecosystem Monitoring Cooperative Member Node',
'urn:node:OTS_NDC', 'OTS_NDC', 'Organization for Tropical Studies - Neotropical Data Center',
'urn:node:PANGAEA', 'PANGAEA', 'PANGAEA',
'urn:node:ESS_DIVE', 'ESS_DIVE', 'ESS-DIVE: Deep Insight for Earth Science Data',
'urn:node:CAS_CERN', 'CAS_CERN', 'Chinese Ecosystem Research Network (CERN)',
'urn:node:FIGSHARE_CARY', 'FIGSHARE_CARY', 'Cary Institute of Ecosystem Studies (powered by Figshare)',
'urn:node:IEDA_EARTHCHEM', 'IEDA_EARTHCHEM', 'IEDA EARTHCHEM',
'urn:node:IEDA_USAP', 'IEDA_USAP', 'IEDA USAP',
'urn:node:IEDA_MGDL', 'IEDA_MGDL', 'IEDA MGDL',
'urn:node:METAGRIL', 'METAGRIL', 'metaGRIL',
'urn:node:ARM', 'ARM', 'ARM - Atmospheric Radiation Measurement Research Facility',
"urn:node:OPC", "OPC",
"urn:node:TNC_DANGERMOND", "dangermond", "TNC_DANGERMOND"
],
/** If true, then archived content is available in the search index.
* Set to false if this MetacatUI is using a Metacat version before 2.10.0
* @type {boolean}
* @default true
*/
archivedContentIsIndexed: true,
/**
* The default FilterGroups to use in the data catalog search (DataCatalogViewWithFilters)
* The DataCatalogViewWithFilters is only used in the EditCollectionView (when editing collections or portals), as of 2.9.0
* To change the default filters in the main data search view (DataCatalogView), edit the `defaultSearchFilters` attribute here.
* This is an array of literal objects that will be converted into FilterGroup models
* @type {object[]}
*/
defaultFilterGroups: [