3
3
<b-alert v-if =" errored" variant =" danger" show >
4
4
<p >{{ _entity.message }}</p >
5
5
<p >Please note that some servers don't allow external access via web browsers (e.g., when CORS headers are not present).</p >
6
+ <p >Errored URL: {{ url }}</p >
6
7
<p ><a href =" #" @click =" $router.go(-1)" >Go back</a ></p >
7
8
</b-alert >
8
9
<b-spinner v-else-if =" !loaded" label =" Loading..." ></b-spinner >
124
125
striped
125
126
/>
126
127
</b-tab >
128
+ <AssetTab
129
+ v-if =" visibleTabs.includes('assets')"
130
+ :assets =" assets"
131
+ :bands =" bands"
132
+ :hasBands =" hasBands"
133
+ :active =" false"
134
+ ></AssetTab >
127
135
</b-tabs >
128
136
</b-col >
129
137
<b-col
132
140
>
133
141
<b-card bg-variant =" light" >
134
142
<div v-if =" spatialExtent" id =" locator-map" />
135
- <div class =" table-responsive metadata" >
136
- <table class =" table" >
137
- <tbody >
138
- <tr >
139
- <td class =" group" colspan =" 2" >
140
- <h4 >Metadata</h4 >
141
- </td >
142
- </tr >
143
- <tr >
144
- <td class =" title" >STAC Version</td >
145
- <td >{{ stacVersion }}</td >
146
- </tr >
147
- <tr v-if =" keywords" >
148
- <td class =" title" >Keywords</td >
149
- <td >{{ keywords }}</td >
150
- </tr >
151
- <tr v-if =" license" >
152
- <td class =" title" >License</td >
153
- <!-- eslint-disable-next-line vue/no-v-html -->
154
- <td v-html =" license" />
155
- </tr >
156
- <tr v-if =" temporalExtent" >
157
- <td class =" title" >Temporal Extent</td >
158
- <td >{{ temporalExtent }}</td >
159
- </tr >
160
- <template v-for =" (props , ext ) in propertyList " >
161
- <tr v-if =" ext" :key =" ext" >
162
- <td class =" group" colspan =" 2" >
163
- <h4 >{{ ext }}</h4 >
164
- </td >
165
- </tr >
166
- <tr v-for =" prop in props" :key =" prop.key" >
167
- <td class =" title" >
168
- <!-- eslint-disable-next-line vue/no-v-html -->
169
- <span :title =" prop.key" v-html =" prop.label" />
170
- </td >
171
- <!-- eslint-disable-next-line vue/no-v-html -->
172
- <td v-html =" prop.value" />
173
- </tr >
174
- </template >
175
- <template v-if =" providers " >
176
- <tr >
177
- <td colspan =" 2" class =" group" >
178
- <h4 >
179
- <template v-if =" providers .length === 1 " >
180
- Provider
181
- </template >
182
- <template v-if =" providers .length !== 1 " >
183
- Providers
184
- </template >
185
- </h4 >
186
- </td >
187
- </tr >
188
- <template v-for =" (provider , index ) in providers " >
189
- <tr :key =" provider.url + index" >
190
- <td colspan =" 2" class =" provider" >
191
- <a :href =" provider.url" >{{ provider.name }}</a >
192
- <em v-if =" provider.roles"
193
- >({{(Array.isArray(provider.roles) ? provider.roles : []).join(", ") }})</em
194
- >
195
- <!-- eslint-disable-next-line vue/no-v-html vue/max-attributes-per-line -->
196
- <div
197
- v-if =" provider.description"
198
- class =" description"
199
- v-html =" provider.description"
200
- />
201
- </td >
202
- </tr >
203
- </template >
204
- </template >
205
- </tbody >
206
- </table >
207
- </div >
143
+ <MetadataSidebar
144
+ :properties =" properties"
145
+ :summaries =" summaries"
146
+ :stacVersion =" stacVersion"
147
+ :keywords =" keywords"
148
+ :license =" license"
149
+ :temporalExtent =" temporalExtent"
150
+ :providers =" providers"
151
+ />
208
152
</b-card >
209
153
</b-col >
210
154
</b-row >
@@ -227,6 +171,10 @@ import Leaflet from "leaflet";
227
171
import { mapActions , mapGetters } from " vuex" ;
228
172
229
173
import common from " ./common" ;
174
+ import AssetTab from ' ./AssetTab.vue'
175
+ import MetadataSidebar from ' ./MetadataSidebar.vue'
176
+
177
+ import { transformCatalog } from " ../migrate"
230
178
231
179
const ITEMS_PER_PAGE = 25 ;
232
180
@@ -259,6 +207,7 @@ export default {
259
207
required: true
260
208
}
261
209
},
210
+ components: { AssetTab, MetadataSidebar },
262
211
data () {
263
212
return {
264
213
externalItemCount: 0 ,
@@ -359,6 +308,9 @@ export default {
359
308
computed: {
360
309
... common .computed ,
361
310
... mapGetters ([" getEntity" ]),
311
+ _entity () {
312
+ return transformCatalog (this .getEntity (this .url ));
313
+ },
362
314
_description () {
363
315
return this .catalog .description ;
364
316
},
@@ -595,6 +547,9 @@ export default {
595
547
596
548
return dataCatalog;
597
549
},
550
+ properties () {
551
+ return this ._properties ;
552
+ },
598
553
spatialExtent () {
599
554
const { spatial } = this .extent ;
600
555
@@ -611,9 +566,8 @@ export default {
611
566
612
567
return bbox;
613
568
},
614
- stacVersion () {
615
- // REQUIRED
616
- return this .catalog .stac_version ;
569
+ summaries () {
570
+ return this .catalog .summaries ;
617
571
},
618
572
tabIndex: {
619
573
get : function () {
@@ -654,7 +608,9 @@ export default {
654
608
return [
655
609
this .childCount > 0 && " catalogs" ,
656
610
(this .hasExternalItems || this .itemCount > 0 ) && " items" ,
657
- this .bands .length > 0 && " bands"
611
+ this .bands .length > 0 && " bands" ,
612
+ this .summaries && " summaries" ,
613
+ this .assets && this .assets .length > 0 && " assets"
658
614
].filter (x => x != null && x !== false );
659
615
}
660
616
},
@@ -771,8 +727,8 @@ export default {
771
727
},
772
728
syncWithQueryState (qs ) {
773
729
this .selectedTab = qs .t ;
774
- this .currentChildPage = Number (qs .cp ) || this . currentChildPage ;
775
- this .currentItemPage = Number (qs .ip ) || this . currentItemPage ;
730
+ this .currentChildPage = Number (qs .cp ) || 1 ;
731
+ this .currentItemPage = Number (qs .ip ) || 1 ;
776
732
777
733
// If we have external items, the b-table needs to "stay" on page 1 as
778
734
// the items list only contains the number of items we want to show.
0 commit comments