Commit b47b156d authored by fcroci's avatar fcroci
Browse files

Merge branch 'develop' into 'main'

Release merge

See merge request !20
parents a12d90bb 1f2118f5
......@@ -6,7 +6,7 @@
<booleanAttribute key="M2_OFFLINE" value="false"/>
<stringAttribute key="M2_PROFILES" value=""/>
<listAttribute key="M2_PROPERTIES"/>
<stringAttribute key="M2_RUNTIME" value="apache-maven-3.3.9"/>
<stringAttribute key="M2_RUNTIME" value="apache-maven-3.6.3"/>
<booleanAttribute key="M2_SKIP_TESTS" value="true"/>
<intAttribute key="M2_THREADS" value="1"/>
<booleanAttribute key="M2_UPDATE_SNAPSHOTS" value="false"/>
......
......@@ -6,7 +6,7 @@
<booleanAttribute key="M2_OFFLINE" value="false"/>
<stringAttribute key="M2_PROFILES" value=""/>
<listAttribute key="M2_PROPERTIES"/>
<stringAttribute key="M2_RUNTIME" value="apache-maven-3.3.9"/>
<stringAttribute key="M2_RUNTIME" value="apache-maven-3.6.3"/>
<booleanAttribute key="M2_SKIP_TESTS" value="true"/>
<intAttribute key="M2_THREADS" value="1"/>
<booleanAttribute key="M2_UPDATE_SNAPSHOTS" value="false"/>
......
......@@ -2985,6 +2985,51 @@
"integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
"dev": true
},
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"ssri": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz",
......@@ -2993,6 +3038,28 @@
"requires": {
"minipass": "^3.1.1"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
}
}
}
},
......@@ -13716,75 +13783,6 @@
}
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-loading-overlay": {
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/vue-loading-overlay/-/vue-loading-overlay-5.0.3.tgz",
......
......@@ -6,7 +6,7 @@
<groupId>ch.ethz.id.sws.doi</groupId>
<artifactId>doi-online-gui</artifactId>
<packaging>war</packaging>
<version>1.0.2</version>
<version>1.0.3</version>
<name>DOI Online GUI</name>
<scm>
......
......@@ -23,13 +23,13 @@
"colUnhandledErrors": "Unbehandelte Fehler",
"colBatchStatus": "Batch Status",
"colCommands": "Befehle",
"footerTotal": "Total",
"footerTotal": "Total",
"confirmBoxText": "Soll die Batch Anforderung {name} für das Repositorium {repository} wirklich übermittelt werden?",
"modalSuccessTitle": "Bestätigung",
"modalFullImportText": "FullImport Batch Anforderung für {name} wurde übermittelt.",
"modalImportText": "Import Batch Anforderung für {name} wurde übermittelt.",
"modalUpdateText": "Update Batch Anforderung für {name} wurde übermittelt.",
"modalFullExportText": "FullExport Batch Anforderung für {name} wurde übermittelt.",
"modalFullExportText": "FullExport Batch Anforderung für {name} wurde übermittelt.",
"modalExportText": "Export Batch Anforderung für {name} wurde übermittelt.",
"modalClearText": "Clear Batch Anforderung für {name} wurde übermittelt.",
"modalFailureTitle": "Fehlgeschlagen",
......@@ -171,6 +171,8 @@
"labelHarvestTime": "Zeitplan",
"labelCronInfo": "<a target='_blank' href='https://freeformatter.com/cron-expression-generator-quartz.html'>(cron expression)</a>",
"labelDisable": "Zeitplan deaktiviert",
"labelTombstoneURL": "Tombstone URL",
"errInvalidTombstoneURL": "Geben Sie eine gültige URL ein",
"grpHarvesting": "Harvesting",
"labelCreationDate": "Erstellungsdatum",
"labelLastUpdate": "Letzte Aktualisierung",
......@@ -196,6 +198,7 @@
"labelDOI": "DOI",
"errInvalidURL": "Geben Sie eine gültige URL ein",
"errRequiredURL": "Eine URL ist erforderlich",
"errInvalidDOIUrl": "Die URL muss mit dem DOI Set Präfix beginnen oder der Tombstone URL entsprechen",
"labelURL": "URL",
"grpRepository": "Repository",
"labelName": "Name",
......@@ -384,7 +387,7 @@
"Do",
"Fr",
"Sa"
]
]
},
"confirmBox": {
"ok": {
......@@ -395,7 +398,7 @@
"label": "Abbruch",
"aria-label": "Abbruch"
},
"title": "Bitte bestätigen"
"title": "Bitte bestätigen"
}
},
"layout": {
......
......@@ -23,13 +23,13 @@
"colUnhandledErrors": "Unhandled Errors",
"colBatchStatus": "Batch Status",
"colCommands": "Commands",
"footerTotal": "Total",
"footerTotal": "Total",
"confirmBoxText": "Do you really want to initiate batch request {name} for repository {repository}?",
"modalSuccessTitle": "Confirmation",
"modalFullImportText": "FullImport batch request for {name} has been submitted.",
"modalImportText": "Import batch request for {name} has been submitted.",
"modalUpdateText": "Update batch request for {name} has been submitted.",
"modalFullExportText": "FullExport batch request for {name} has been submitted.",
"modalFullExportText": "FullExport batch request for {name} has been submitted.",
"modalExportText": "Export batch request for {name} has been submitted.",
"modalClearText": "Clear batch request for {name} has been submitted.",
"modalFailureTitle": "Failure",
......@@ -176,6 +176,8 @@
"labelLastUpdate": "Last Update",
"labelLastImport": "Last Import",
"labelLastExport": "Last Export",
"labelTombstoneURL": "Tombstone URL",
"errInvalidTombstoneURL": "Enter a valid URL",
"grpXSLT": "XSLT Transformation",
"labelXSLT": "XSLT",
"grpDataCite": "Data Cite",
......@@ -196,6 +198,7 @@
"labelDOI": "DOI",
"errInvalidURL": "Enter a valid URL",
"errRequiredURL": "Enter an URL",
"errInvalidDOIUrl": "The URL must start with the DOI Set Prefix or equal the Tombstone URL",
"labelURL": "URL",
"grpRepository": "Repository",
"labelName": "Name",
......@@ -384,7 +387,7 @@
"Th",
"Fr",
"Sa"
]
]
},
"confirmBox": {
"ok": {
......@@ -395,7 +398,7 @@
"label": "Cancel",
"aria-label": "Cancel"
},
"title": "Please confirm"
"title": "Please confirm"
}
},
"layout": {
......
......@@ -124,14 +124,14 @@
<p>{{ modalText }}</p>
</div>
</template>
</Modal>
<ConfirmBox ref="confirmBox"></ConfirmBox>
</Modal>
<ConfirmBox ref="confirmBox"></ConfirmBox>
</template>
<script>
import Logger from 'js-logger'
import Modal from '@/components/fw/Modal'
import ConfirmBox from '@/components/fw/ConfirmBox'
import Modal from '@/components/fw/Modal'
import ConfirmBox from '@/components/fw/ConfirmBox'
import DateUtils from '@/mixins/DateUtils'
import DOIOnlineServices from '@/services/DOIOnlineServices'
......@@ -140,9 +140,9 @@ export default {
mixins: [DateUtils],
components: {
components: {
Modal,
ConfirmBox
ConfirmBox
},
data: () => {
......@@ -184,10 +184,10 @@ export default {
Logger.debug("REST streamDashbaord: " + JSON.stringify(streamedData) + ", isCompleted =" + isCompleted)
})
},
onClickFullImport(entry) {
onClickFullImport(entry) {
this.$refs.confirmBox.openModal(this.$t('app.views.index.dashboardTable.confirmBoxText', {name: 'FullImport Batch', repository: entry.name}), () => this.startFullImport(entry), null)
},
startFullImport(entry) {
startFullImport(entry) {
this.restError = null
let loader = this.$loading.show({
container: null,
......@@ -196,8 +196,8 @@ export default {
this.restServices.startFullImport(entry.id,
() => {
loader.hide()
this.modalText = this.$t('app.views.index.dashboardTable.modalFullImportText', {name: entry.name})
loader.hide()
this.modalText = this.$t('app.views.index.dashboardTable.modalFullImportText', {name: entry.name})
this.$refs.modalBatchInfo.openModal(this.$t('app.views.index.dashboardTable.modalSuccessTitle'))
entry['has-manual-batch-pending'] = true
......@@ -213,10 +213,10 @@ export default {
}
)
},
onClickImport(entry) {
onClickImport(entry) {
this.$refs.confirmBox.openModal(this.$t('app.views.index.dashboardTable.confirmBoxText', {name: 'Import Batch', repository: entry.name}), () => this.startImport(entry), null)
},
startImport(entry) {
startImport(entry) {
this.restError = null
let loader = this.$loading.show({
container: null,
......@@ -225,8 +225,8 @@ export default {
this.restServices.startImport(entry.id,
() => {
loader.hide()
this.modalText = this.$t('app.views.index.dashboardTable.modalImportText', {name: entry.name})
loader.hide()
this.modalText = this.$t('app.views.index.dashboardTable.modalImportText', {name: entry.name})
this.$refs.modalBatchInfo.openModal(this.$t('app.views.index.dashboardTable.modalSuccessTitle'))
entry['has-manual-batch-pending'] = true
......@@ -242,10 +242,10 @@ export default {
}
)
},
onClickUpdate(entry) {
onClickUpdate(entry) {
this.$refs.confirmBox.openModal(this.$t('app.views.index.dashboardTable.confirmBoxText', {name: 'Update Batch', repository: entry.name}), () => this.startkUpdate(entry), null)
},
startkUpdate(entry) {
startkUpdate(entry) {
this.restError = null
let loader = this.$loading.show({
container: null,
......@@ -271,10 +271,10 @@ export default {
}
)
},
onClickFullExport(entry) {
onClickFullExport(entry) {
this.$refs.confirmBox.openModal(this.$t('app.views.index.dashboardTable.confirmBoxText', {name: 'FullExport Batch', repository: entry.name}), () => this.startFullExport(entry), null)
},
startFullExport(entry) {
startFullExport(entry) {
this.restError = null
let loader = this.$loading.show({
container: null,
......@@ -283,8 +283,8 @@ export default {
this.restServices.startFullExport(entry.id,
() => {
loader.hide()
this.modalText = this.$t('app.views.index.dashboardTable.modalFullExportText', {name: entry.name})
loader.hide()
this.modalText = this.$t('app.views.index.dashboardTable.modalFullExportText', {name: entry.name})
this.$refs.modalBatchInfo.openModal(this.$t('app.views.index.dashboardTable.modalSuccessTitle'))
entry['has-manual-batch-pending'] = true
......@@ -300,10 +300,10 @@ export default {
}
)
},
onClickExport(entry) {
onClickExport(entry) {
this.$refs.confirmBox.openModal(this.$t('app.views.index.dashboardTable.confirmBoxText', {name: 'Export Batch', repository: entry.name}), () => this.startExport(entry), null)
},
startExport(entry) {
startExport(entry) {
this.restError = null
let loader = this.$loading.show({
container: null,
......@@ -329,10 +329,10 @@ export default {
}
)
},
onClickClear(entry) {
onClickClear(entry) {
this.$refs.confirmBox.openModal(this.$t('app.views.index.dashboardTable.confirmBoxText', {name: 'Clear Batch', repository: entry.name}), () => this.startClear(entry), null)
},
startClear(entry) {
startClear(entry) {
this.restError = null
let loader = this.$loading.show({
container: null,
......
......@@ -96,6 +96,10 @@
class="error"
v-if="v$.entry['url'].required.$invalid && v$.entry['url'].$error"
>{{ $t('app.views.showdoidetails.errRequiredURL') }}</div>
<div
class="error"
v-if="v$.entry['url'].doiUrl.$invalid && v$.entry['url'].$error"
>{{ $t('app.views.showdoidetails.errInvalidDOIUrl') }}</div>
<label for="detailForm:url">{{ $t('app.views.showdoidetails.labelURL') }}</label>
</div>
<div class="form-cell-1" style="width:4rem">
......@@ -420,7 +424,30 @@ export default {
validations: {
entry: {
'doi': { required },
'url': { required, url },
'url': {
required,
url,
doiUrl: function(enteredUrl) {
if (this.entry['pool-id']) {
var selectedPool = this.poolArray.find((pool) => {
return pool['id'] === this.entry['pool-id']
})
if (selectedPool && enteredUrl) {
if (enteredUrl.startsWith(selectedPool['url-prefix']) ||
enteredUrl.replace('http://', 'https://').startsWith(selectedPool['url-prefix']) ||
enteredUrl.replace('https://', 'http://').startsWith(selectedPool['url-prefix'])) {
return true
}
if (selectedPool['doi-tombstone'] && enteredUrl === selectedPool['doi-tombstone']) {
return true
}
}
}
return false
}
},
'pool-id': { required }
},
metadata: {
......
......@@ -221,6 +221,26 @@
/>
<label for="detailForm:cronDisabled">{{ $t('app.views.showrepodetails.labelDisable') }}</label>
</div>
<div class="form-cell-8"
v-bind:class="{ 'form-group--error': v$.entry['doi-tombstone'].$error }">
<input
id="detailForm:doiTombstone"
type="text"
maxlength="255"
name="detailForm:doiTombstone"
placeholder="--"
v-model="entry['doi-tombstone']"
v-bind:disabled="allDisabled"
v-on:input="delayedValidation(v$.entry['doi-tombstone'])"
/>
<div
class="error"
v-if="v$.entry['server-url'].url.$invalid && v$.entry['doi-tombstone'].$error"
>{{ $t('app.views.showrepodetails.errInvalidTombstoneURL') }}</div>
<label for="detailForm:doiTombstone">{{ $t('app.views.showrepodetails.labelTombstoneURL') }}</label>
</div>
</div>
</fieldset>
......@@ -378,7 +398,7 @@ export default {
isShowPassword: false,
entry: {},
poolArray: [],
restServices: new DOIOnlineServices()
restServices: new DOIOnlineServices(),
}
},
......@@ -422,7 +442,8 @@ export default {
},
'url-prefix': { url},
'cron-schedule': { cronScheduleFormat },
'import-type-code': { required }
'import-type-code': { required },
'doi-tombstone': { url }
}
},
......@@ -443,7 +464,8 @@ export default {
this.allDisabled = true
} else {
this.entry = {
'cron-disabled': 0
'cron-disabled': 0,
'doi-tombstone' : "http://www.library.ethz.ch/invaliddoi.html"
}
this.allDisabled = false
}
......
......@@ -69,9 +69,9 @@ module.exports = {
// This proxy mapping is for the application services (discover, whoami, log)
'/app-services-v1': {
// Use this target for JS-DEV->ENTW scenario:
// target: 'http://ois-dev-red1.ethz.ch:7080/doi-online-servicesEntw14/services/v1/',
// target: 'http://ois-dev-red1.ethz.ch:7081/doi-online-servicesEntw14/services/v1/',
// Use this target for JS-DEV->DEV scenario:
target: 'http://localhost:7001/webappDev0210/services/v1/',
target: 'http://localhost:7001/webappDev0315/services/v1/',
secure: false,
logLevel: 'debug',
......@@ -88,9 +88,9 @@ module.exports = {
// scenario.
'/doi-online-services-v1': {
// Use this target for JS-DEV->ENTW scenario:
// target: 'http://ois-dev-red1.ethz.ch:7080/doi-online-servicesEntw14/services/v1',
// target: 'http://ois-dev-red1.ethz.ch:7081/doi-online-servicesEntw14/services/v1',
// Use this target for JS-DEV->DEV scenario:
target: 'http://localhost:7001/webappDev0210/services/v1',
target: 'http://localhost:7001/webappDev0315/services/v1',
secure: false,
logLevel: 'debug',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment