Skip to content

Commit cd27b69

Browse files
Show FedMissingNotice in user content panels (#230)
1 parent bf6a524 commit cd27b69

8 files changed

+70
-51
lines changed

src/components/CustomProcessPanel.vue

+15-12
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
<template>
2-
<DataTable ref="table" fa :data="data" :columns="columns" :next="next" class="CustomProcessPanel">
3-
<template slot="toolbar">
4-
<AsyncButton title="Store the process in the process editor on the server" :fn="addProcessFromScript" v-show="supportsCreate" :disabled="!this.hasProcess" fa confirm icon="fas fa-plus">Add</AsyncButton>
5-
<SyncButton v-if="supportsList" :name="pluralizedName" :sync="reloadData" />
6-
<FullscreenButton :element="() => this.$el" />
7-
</template>
8-
<template #actions="p">
9-
<AsyncButton title="Show details about this process" :fn="() => processInfo(p.row)" v-show="supportsRead" fa icon="fas fa-info"></AsyncButton>
10-
<AsyncButton title="Edit this process in the process editor" confirm :fn="() => showInEditor(p.row)" v-show="supportsRead" fa icon="fas fa-project-diagram"></AsyncButton>
11-
<AsyncButton title="Delete this custom process from the server" :fn="() => deleteProcess(p.row)" v-show="supportsDelete" fa icon="fas fa-trash"></AsyncButton>
12-
</template>
13-
</DataTable>
2+
<div id="CustomProcessPanel">
3+
<FederationMissingNotice v-if="Array.isArray(missing) && missing.length > 0" :missing="missing" :federation="federation" :compact="true" />
4+
<DataTable ref="table" fa :data="data" :columns="columns" :next="next" class="CustomProcessPanel">
5+
<template slot="toolbar">
6+
<AsyncButton title="Store the process in the process editor on the server" :fn="addProcessFromScript" v-show="supportsCreate" :disabled="!this.hasProcess" fa confirm icon="fas fa-plus">Add</AsyncButton>
7+
<SyncButton v-if="supportsList" :name="pluralizedName" :sync="reloadData" />
8+
<FullscreenButton :element="() => this.$el" />
9+
</template>
10+
<template #actions="p">
11+
<AsyncButton title="Show details about this process" :fn="() => processInfo(p.row)" v-show="supportsRead" fa icon="fas fa-info"></AsyncButton>
12+
<AsyncButton title="Edit this process in the process editor" confirm :fn="() => showInEditor(p.row)" v-show="supportsRead" fa icon="fas fa-project-diagram"></AsyncButton>
13+
<AsyncButton title="Delete this custom process from the server" :fn="() => deleteProcess(p.row)" v-show="supportsDelete" fa icon="fas fa-trash"></AsyncButton>
14+
</template>
15+
</DataTable>
16+
</div>
1417
</template>
1518

1619
<script>

src/components/FilePanel.vue

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<template>
22
<div id="FilePanel" @dragenter="dropZoneInfo(true)" @dragleave="dropZoneInfo(false)" @drop="uploadFiles" @dragover="allowDrop">
33
<div class="dropZone" v-show="showUploadDropHint">To upload files, drop them here.</div>
4+
<FederationMissingNotice v-if="Array.isArray(missing) && missing.length > 0" :missing="missing" :federation="federation" :compact="true" />
45
<DataTable ref="table" fa :data="data" :columns="columns" :next="next">
56
<template slot="toolbar">
67
<div v-show="supportsCreate" class="upload">

src/components/JobPanel.vue

+24-21
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
11
<template>
2-
<DataTable ref="table" fa :data="data" :columns="columns" :next="next" class="JobPanel">
3-
<template slot="toolbar">
4-
<AsyncButton title="Create a new job from the process in the process editor for batch processing" :fn="createJobFromScript" v-show="supportsCreate" :disabled="!this.hasProcess" fa confirm icon="fas fa-plus">Create Batch Job</AsyncButton>
5-
<AsyncButton title="Run the process in the process editor directly and view the results without storing them permanently" :fn="executeProcess" v-show="supports('computeResult')" :disabled="!this.hasProcess" fa confirm icon="fas fa-play">Run now</AsyncButton>
6-
<SyncButton v-if="supportsList" :name="pluralizedName" :sync="reloadData" />
7-
<FullscreenButton :element="() => this.$el" />
8-
</template>
9-
<template #actions="p">
10-
<AsyncButton title="Show details about this job" :fn="() => showJobInfo(p.row)" v-show="supportsRead" fa icon="fas fa-info"></AsyncButton>
11-
<AsyncButton title="Create a cost and time estimate for this job" :fn="() => estimateJob(p.row)" v-show="supportsEstimate" fa icon="fas fa-file-invoice-dollar"></AsyncButton>
12-
<AsyncButton title="Edit the metadata of this job" :fn="() => editMetadata(p.row)" v-show="supportsUpdate" :disabled="!isJobInactive(p.row)" fa icon="fas fa-edit"></AsyncButton>
13-
<AsyncButton title="Edit the process of this job in the process editor" confirm :fn="() => showInEditor(p.row)" v-show="supportsRead" fa icon="fas fa-project-diagram"></AsyncButton>
14-
<AsyncButton title="Delete this job from the server, including all results" :fn="() => deleteJob(p.row)" v-show="supportsDelete" fa icon="fas fa-trash"></AsyncButton>
15-
<AsyncButton title="Start the processing on the server" :fn="() => queueJob(p.row)" v-show="supportsStart && isJobInactive(p.row)" fa icon="fas fa-play-circle"></AsyncButton>
16-
<AsyncButton title="Cancel the processing" :fn="() => cancelJob(p.row)" v-show="supportsStop && isJobActive(p.row)" fa icon="fas fa-stop-circle"></AsyncButton>
17-
<AsyncButton title="Download the results to your computer" :fn="() => downloadResults(p.row)" v-show="supportsDownloadResults && mayHaveResults(p.row)" fa icon="fas fa-download"></AsyncButton>
18-
<AsyncButton title="View the results" :fn="() => viewResults(p.row, true)" v-show="supportsDownloadResults && mayHaveResults(p.row)" fa icon="fas fa-eye"></AsyncButton>
19-
<AsyncButton title="Export and/or share this job" :fn="() => shareResults(p.row)" v-show="canShare && supports('downloadResults') && mayHaveResults(p.row)" fa icon="fas fa-share"></AsyncButton>
20-
<AsyncButton title="View the logs of this job" :fn="() => showLogs(p.row)" v-show="supportsDebug" fa icon="fas fa-bug"></AsyncButton>
21-
</template>
22-
</DataTable>
2+
<div id="JobPanel">
3+
<FederationMissingNotice v-if="Array.isArray(missing) && missing.length > 0" :missing="missing" :federation="federation" :compact="true" />
4+
<DataTable ref="table" fa :data="data" :columns="columns" :next="next" class="JobPanel">
5+
<template slot="toolbar">
6+
<AsyncButton title="Create a new job from the process in the process editor for batch processing" :fn="createJobFromScript" v-show="supportsCreate" :disabled="!this.hasProcess" fa confirm icon="fas fa-plus">Create Batch Job</AsyncButton>
7+
<AsyncButton title="Run the process in the process editor directly and view the results without storing them permanently" :fn="executeProcess" v-show="supports('computeResult')" :disabled="!this.hasProcess" fa confirm icon="fas fa-play">Run now</AsyncButton>
8+
<SyncButton v-if="supportsList" :name="pluralizedName" :sync="reloadData" />
9+
<FullscreenButton :element="() => this.$el" />
10+
</template>
11+
<template #actions="p">
12+
<AsyncButton title="Show details about this job" :fn="() => showJobInfo(p.row)" v-show="supportsRead" fa icon="fas fa-info"></AsyncButton>
13+
<AsyncButton title="Create a cost and time estimate for this job" :fn="() => estimateJob(p.row)" v-show="supportsEstimate" fa icon="fas fa-file-invoice-dollar"></AsyncButton>
14+
<AsyncButton title="Edit the metadata of this job" :fn="() => editMetadata(p.row)" v-show="supportsUpdate" :disabled="!isJobInactive(p.row)" fa icon="fas fa-edit"></AsyncButton>
15+
<AsyncButton title="Edit the process of this job in the process editor" confirm :fn="() => showInEditor(p.row)" v-show="supportsRead" fa icon="fas fa-project-diagram"></AsyncButton>
16+
<AsyncButton title="Delete this job from the server, including all results" :fn="() => deleteJob(p.row)" v-show="supportsDelete" fa icon="fas fa-trash"></AsyncButton>
17+
<AsyncButton title="Start the processing on the server" :fn="() => queueJob(p.row)" v-show="supportsStart && isJobInactive(p.row)" fa icon="fas fa-play-circle"></AsyncButton>
18+
<AsyncButton title="Cancel the processing" :fn="() => cancelJob(p.row)" v-show="supportsStop && isJobActive(p.row)" fa icon="fas fa-stop-circle"></AsyncButton>
19+
<AsyncButton title="Download the results to your computer" :fn="() => downloadResults(p.row)" v-show="supportsDownloadResults && mayHaveResults(p.row)" fa icon="fas fa-download"></AsyncButton>
20+
<AsyncButton title="View the results" :fn="() => viewResults(p.row, true)" v-show="supportsDownloadResults && mayHaveResults(p.row)" fa icon="fas fa-eye"></AsyncButton>
21+
<AsyncButton title="Export and/or share this job" :fn="() => shareResults(p.row)" v-show="canShare && supports('downloadResults') && mayHaveResults(p.row)" fa icon="fas fa-share"></AsyncButton>
22+
<AsyncButton title="View the logs of this job" :fn="() => showLogs(p.row)" v-show="supportsDebug" fa icon="fas fa-bug"></AsyncButton>
23+
</template>
24+
</DataTable>
25+
</div>
2326
</template>
2427

2528
<script>

src/components/ServicePanel.vue

+20-17
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
<template>
2-
<DataTable ref="table" fa :data="data" :columns="columns" :next="next" class="ServicePanel">
3-
<template slot="toolbar">
4-
<AsyncButton title="Create a new permanent service from the process in the process editor" :fn="createServiceFromScript" v-show="supportsCreate" :disabled="!this.hasProcess" fa confirm icon="fas fa-plus">Create</AsyncButton>
5-
<AsyncButton title="Quickly show the process on map without storing it permanently" :fn="quickViewServiceFromScript" v-show="supportsQuickView" :disabled="!this.hasProcess" fa confirm icon="fas fa-map">Show on Map</AsyncButton>
6-
<SyncButton v-if="supportsList" :name="pluralizedName" :sync="reloadData" />
7-
<FullscreenButton :element="() => this.$el" />
8-
</template>
9-
<template #actions="p">
10-
<AsyncButton title="Show details about this service" :fn="() => serviceInfo(p.row)" v-show="supportsRead" fa icon="fas fa-info"></AsyncButton>
11-
<AsyncButton title="Edit the metadata of this service" :fn="() => editMetadata(p.row)" v-show="supportsUpdate" fa icon="fas fa-edit"></AsyncButton>
12-
<AsyncButton title="Edit the process of this service in the process editor" confirm :fn="() => showInEditor(p.row)" v-show="supportsRead" fa icon="fas fa-project-diagram"></AsyncButton>
13-
<AsyncButton title="Delete this service from the server" :fn="() => deleteService(p.row)" v-show="supportsDelete" fa icon="fas fa-trash"></AsyncButton>
14-
<AsyncButton title="View this service" :fn="() => viewService(p.row)" v-show="p.row.enabled && isMapServiceSupported(p.row.type)" fa icon="fas fa-map"></AsyncButton>
15-
<AsyncButton title="Export and/or share this service" :fn="() => shareResults(p.row)" v-show="p.row.enabled && canShare" fa icon="fas fa-share"></AsyncButton>
16-
<AsyncButton title="View the logs of this service" :fn="() => showLogs(p.row)" v-show="supportsDebug" fa icon="fas fa-bug"></AsyncButton>
17-
</template>
18-
</DataTable>
2+
<div id="ServicePanel">
3+
<FederationMissingNotice v-if="Array.isArray(missing) && missing.length > 0" :missing="missing" :federation="federation" :compact="true" />
4+
<DataTable ref="table" fa :data="data" :columns="columns" :next="next" class="ServicePanel">
5+
<template slot="toolbar">
6+
<AsyncButton title="Create a new permanent service from the process in the process editor" :fn="createServiceFromScript" v-show="supportsCreate" :disabled="!this.hasProcess" fa confirm icon="fas fa-plus">Create</AsyncButton>
7+
<AsyncButton title="Quickly show the process on map without storing it permanently" :fn="quickViewServiceFromScript" v-show="supportsQuickView" :disabled="!this.hasProcess" fa confirm icon="fas fa-map">Show on Map</AsyncButton>
8+
<SyncButton v-if="supportsList" :name="pluralizedName" :sync="reloadData" />
9+
<FullscreenButton :element="() => this.$el" />
10+
</template>
11+
<template #actions="p">
12+
<AsyncButton title="Show details about this service" :fn="() => serviceInfo(p.row)" v-show="supportsRead" fa icon="fas fa-info"></AsyncButton>
13+
<AsyncButton title="Edit the metadata of this service" :fn="() => editMetadata(p.row)" v-show="supportsUpdate" fa icon="fas fa-edit"></AsyncButton>
14+
<AsyncButton title="Edit the process of this service in the process editor" confirm :fn="() => showInEditor(p.row)" v-show="supportsRead" fa icon="fas fa-project-diagram"></AsyncButton>
15+
<AsyncButton title="Delete this service from the server" :fn="() => deleteService(p.row)" v-show="supportsDelete" fa icon="fas fa-trash"></AsyncButton>
16+
<AsyncButton title="View this service" :fn="() => viewService(p.row)" v-show="p.row.enabled && isMapServiceSupported(p.row.type)" fa icon="fas fa-map"></AsyncButton>
17+
<AsyncButton title="Export and/or share this service" :fn="() => shareResults(p.row)" v-show="p.row.enabled && canShare" fa icon="fas fa-share"></AsyncButton>
18+
<AsyncButton title="View the logs of this service" :fn="() => showLogs(p.row)" v-show="supportsDebug" fa icon="fas fa-bug"></AsyncButton>
19+
</template>
20+
</DataTable>
21+
</div>
1922
</template>
2023

2124
<script>

src/components/UserWorkspace.vue

+3
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ export default {
6666

6767
<style lang="scss">
6868
#userContent {
69+
section.vue-component.federation-backends.compact { // the "section" is important to increase specificity and overwrite other rule elsewhere
70+
margin: 0.5em 0.5em 0;
71+
}
6972
.data-table {
7073
> .menu {
7174
padding: 0.5em;

src/components/WorkPanelMixin.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import DataTable from '@openeo/vue-components/components/DataTable.vue';
2+
import FederationMissingNotice from '@openeo/vue-components/components/FederationMissingNotice.vue';
23
import Utils from '../utils.js';
34

45
export default (namespace, singular, plural, loadInitially = true) => {
56
return {
67
components: {
7-
DataTable
8+
DataTable,
9+
FederationMissingNotice
810
},
911
data() {
1012
return {
@@ -23,6 +25,8 @@ export default (namespace, singular, plural, loadInitially = true) => {
2325
this.stopSyncTimer();
2426
},
2527
computed: {
28+
...Utils.mapState(['federation']),
29+
...Utils.mapState(namespace, ['missing']),
2630
...Utils.mapState(namespace, {data: namespace}),
2731
...Utils.mapState(namespace, ['pages', 'hasMore']),
2832
...Utils.mapGetters(namespace, ['supportsList', 'supportsCreate', 'supportsRead', 'supportsUpdate', 'supportsDelete']),

src/store/storeFactory.js

+1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ export default ({namespace, listFn, paginateFn, createFn, updateFn, deleteFn, re
112112
for (let d of data) {
113113
state[namespace].push(d);
114114
}
115+
state.missing = data['federation:missing']; // yes, accessing a property on an array
115116
}
116117
state.hasMore = state.pages ? state.pages.hasNextPage() : false;
117118
},

src/store/userProcesses.js

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export default storeFactory({
2121
.map(p => Object.assign(p, {namespace: 'user'}))
2222
.filter(p => (typeof p.id === 'string'))
2323
.sort(Utils.sortById);
24+
state.missing = data['federation:missing'];
2425
}
2526
}
2627
}

0 commit comments

Comments
 (0)