Skip to content

Commit c18c0fa

Browse files
Pass federation info to modals and wizards (#230)
And one more in the DiscoveryToolbar
1 parent c52e566 commit c18c0fa

8 files changed

+20
-11
lines changed

src/components/DiscoveryToolbar.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</template>
4141
</Processes>
4242

43-
<UdfRuntimes v-if="hasUdfRuntimes" class="category" :runtimes="udfRuntimes" :searchTerm="searchTerm" :offerDetails="false" :collapsed="collapsed" :hideDeprecated="!showDeprecated" :hideExperimental="!showExperimental">
43+
<UdfRuntimes v-if="hasUdfRuntimes" class="category" :runtimes="udfRuntimes" :searchTerm="searchTerm" :offerDetails="false" :collapsed="collapsed" :hideDeprecated="!showDeprecated" :hideExperimental="!showExperimental" :federation="federation">
4444
<template #summary="{ summary, item }">
4545
<div class="discovery-entity" :draggable="supportsRunUdf" @dragstart="onDrag($event, 'udf', {runtime: summary.identifier, version: item.default})">
4646
<div class="discovery-info" @click="showUdfInfo(summary.identifier, item)">

src/components/modals/FileFormatModal.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<template>
22
<Modal ref="modal" width="50%" :title="title" @closed="$emit('closed')">
3-
<FileFormat :id="id" :format="format" :type="type"></FileFormat>
3+
<FileFormat :id="id" :format="format" :type="type" :federation="federation"></FileFormat>
44
</Modal>
55
</template>
66

77
<script>
8+
import Utils from '../../utils.js';
89
import Modal from './Modal.vue';
910
import FileFormat from '@openeo/vue-components/components/FileFormat.vue';
1011
@@ -26,6 +27,7 @@ export default {
2627
}
2728
},
2829
computed: {
30+
...Utils.mapState(['federation']),
2931
title() {
3032
return this.format.title || this.id;
3133
}

src/components/modals/ProcessModal.vue

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="docgen">
44
<!-- ToDo: Implement processUrl -->
55
<!-- ToDo: Show info (badge?) that process is custom -->
6-
<Process :process="process" :provideDownload="false" :showGraph="true">
6+
<Process :process="process" :provideDownload="false" :showGraph="true" :federation="federation">
77
<template #process-graph>
88
<Editor :value="process" :editable="false" class="infoViewer" id="pgInfoViewer" />
99
</template>
@@ -31,6 +31,7 @@ export default {
3131
}
3232
},
3333
computed: {
34+
...Utils.mapState(['federation']),
3435
minWidth() {
3536
if (Utils.isObject(this.process) && this.process.process_graph) {
3637
return "80%";

src/components/modals/ProcessParameterModal.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@
99
See below for details about this parameter:
1010
</span>
1111
</p>
12-
<ProcessParameter :parameter="parameter" />
12+
<ProcessParameter :parameter="parameter" :federation="federation" />
1313
</div>
1414
</Modal>
1515
</template>
1616

1717
<script>
18+
import Utils from '../../utils.js';
1819
import Modal from './Modal.vue';
1920
import ProcessParameter from '@openeo/vue-components/components/internal/ProcessParameter.vue';
2021
@@ -34,6 +35,7 @@ export default {
3435
}
3536
},
3637
computed: {
38+
...Utils.mapState(['federation']),
3739
title() {
3840
return this.parameter.name || 'Unnamed Parameter';
3941
}

src/components/modals/ServerInfoModal.vue

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
<Capabilities :capabilities="capabilities" :url="url" />
55

66
<h3>File formats</h3>
7-
<FileFormats :formats="fileFormats" searchTerm="" :heading="null" />
7+
<FileFormats :formats="fileFormats" searchTerm="" :heading="null" :federation="federation" :missing="federationMissing.fileFormats"/>
88

99
<h3>Secondary web services</h3>
10-
<ServiceTypes :services="serviceTypes" searchTerm="" :heading="null" />
10+
<ServiceTypes :services="serviceTypes" searchTerm="" :heading="null" :federation="federation" />
1111

1212
<h3>Runtimes for user-defined functions (UDF)</h3>
13-
<UdfRuntimes :runtimes="udfRuntimes" searchTerm="" :heading="null" />
13+
<UdfRuntimes :runtimes="udfRuntimes" searchTerm="" :heading="null" :federation="federation" />
1414
</div>
1515
</Modal>
1616
</template>
@@ -34,6 +34,7 @@ export default {
3434
},
3535
computed: {
3636
...Utils.mapState(['connection', 'serviceTypes', 'udfRuntimes']),
37+
...Utils.mapState(['federation', 'federationMissing']),
3738
...Utils.mapGetters(['fileFormats']),
3839
capabilities() {
3940
return this.connection.capabilities().toJSON();

src/components/modals/UdfRuntimeModal.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<template>
22
<Modal width="80%" :title="title" @closed="$emit('closed')">
3-
<UdfRuntime :id="id" :runtime="data" :version="version"></UdfRuntime>
3+
<UdfRuntime :id="id" :runtime="data" :version="version" :federation="federation"></UdfRuntime>
44
</Modal>
55
</template>
66

77
<script>
8+
import Utils from '../../utils.js';
89
import Modal from './Modal.vue';
910
import UdfRuntime from '@openeo/vue-components/components/UdfRuntime.vue';
1011
@@ -26,6 +27,7 @@ export default {
2627
}
2728
},
2829
computed: {
30+
...Utils.mapState(['federation']),
2931
title() {
3032
return this.data.title || this.id;
3133
}

src/components/wizards/tabs/ChooseCollection.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div class="step choose-collection">
33
<p>Please select the collection which you want to download data for.</p>
4-
<Collections heading="" :collections="filteredCollections" :offerDetails="false">
4+
<Collections heading="" :collections="filteredCollections" :offerDetails="false" :federation="federation" :missing="federationMissing.collections">
55
<template #summary="{ item }">
66
<div :class="{element: true, selected: item.id == value}">
77
<div class="summary" @click="update(item.id)">
@@ -39,7 +39,7 @@ export default {
3939
}
4040
},
4141
computed: {
42-
...Utils.mapState(['collections']),
42+
...Utils.mapState(['collections', 'federation', 'federationMissing']),
4343
filteredCollections() {
4444
if (typeof this.filter === 'function') {
4545
return this.collections.filter(this.filter);

src/components/wizards/tabs/ChooseUserDefinedProcess.vue

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div class="step choose-process">
33
<p>Please select the user-defined process to execute:</p>
4-
<Processes heading="" :processes="filteredProcesses" :offerDetails="false">
4+
<Processes heading="" :processes="filteredProcesses" :offerDetails="false" :federation="federation" :missing="federationMissing.processes">
55
<template #summary="{ item }">
66
<div :class="{element: true, selected: item.id == value}">
77
<div class="summary" @click="update(item)">
@@ -47,6 +47,7 @@ export default {
4747
},
4848
computed: {
4949
...Utils.mapGetters(['processes']),
50+
...Utils.mapState(['federation', 'federationMissing']),
5051
filteredProcesses() {
5152
return this.processes.namespace(this.namespace || 'user');
5253
}

0 commit comments

Comments
 (0)