Skip to content

Commit

Permalink
Show dataset version in subscription list and details (#16235)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Moreno authored Mar 31, 2021
1 parent 37dd9d3 commit 0f7c4ff
Show file tree
Hide file tree
Showing 11 changed files with 3,779 additions and 1,015 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ sudo make install
- Modify superadmin users activity endpoint to allow pagination [#16226](https://github.com/CartoDB/cartodb/pull/16226)
- Update cartodb-common to v1.1.1, which contains serveral logging fixes [#16182](https://github.com/CartoDB/cartodb/pull/16182)
- Read config for public statics compilation [#16234](https://github.com/CartoDB/cartodb/pull/16234)
- Show dataset version in subscription list and details [#16235](https://github.com/CartoDB/cartodb/pull/16235)
- Fix error that avoid to render Spatial Data Catalog properly in Internet Explorer [#16236](https://github.com/CartoDB/cartodb/pull/16236)

4.44.0 (2020-11-20)
-------------------
Expand Down
6 changes: 6 additions & 0 deletions babel.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
"corejs": 3
}
],
"@vue/cli-plugin-babel/preset",
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-transform-arrow-functions",
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-transform-classes",
"@babel/plugin-transform-object-assign",
Expand All @@ -25,9 +28,12 @@
"test": {
"presets": [
["@babel/env"],
"@vue/cli-plugin-babel/preset",
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-transform-arrow-functions",
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-transform-classes",
"@babel/plugin-transform-object-assign",
Expand Down
1 change: 1 addition & 0 deletions lib/assets/javascripts/do-catalog/main.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'babel-polyfill';
import Vue from 'vue';
import App from './App.vue';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}}</span>
/
<span class="text is-txtMainTextColor">{{
dataset.data_source_name
dataset.provider_name
}}</span>
</p>
<p class="text is-caption is-txtMainTextColor" v-else>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,28 @@
v-if="!dataset.is_geography && !minimal"
>
<div
class="grid-cell--col7 grid grid--align-end grid--no-wrap"
class="grid-cell--col9 grid grid--align-end grid--no-wrap"
>
<div class="license">
<p>License</p> {{ dataset.license_name }}
</div>
<div class="geography" :title="dataset.placetype_name">
<p>Placetype</p> {{ dataset.placetype_name }}
</div>
<div v-if="extra" class="aggregation">
<p>Temporal aggr.</p> {{ temporalAggregation }}
</div>
</div>
<div
class="grid-cell--col5 grid grid--align-end grid--space grid--no-wrap"
class="grid-cell--col3 grid grid--align-end grid--space grid--no-wrap"
>
<div class="aggregation">
<div v-if="extra" class="version">
<p>Version</p> {{ dataset.version }}
</div>
<div v-else class="aggregation">
<p>Temporal aggr.</p> {{ temporalAggregation }}
</div>

<div class="provider">
<img
:src="providerLogo"
Expand All @@ -64,19 +71,25 @@
</div>
<div class="extra text is-small grid u-mt--16" v-else-if="!minimal">
<div
class="grid-cell--col7 grid grid--align-end grid--no-wrap"
class="grid-cell--col9 grid grid--align-end grid--no-wrap"
>
<div class="license">
<p>License</p> {{ dataset.license_name }}
</div>
<div class="geography" :title="dataset.placetype_name">
<p>Placetype</p> {{ dataset.placetype_name }}
</div>
<div v-if="extra" class="aggregation">
<p>Geometry type</p> {{ geometryType }}
</div>
</div>
<div
class="grid-cell--col5 grid grid--align-end grid--space grid--no-wrap"
class="grid-cell--col3 grid grid--align-end grid--space grid--no-wrap"
>
<div class="aggregation">
<div v-if="extra" class="version">
<p>Version</p> {{ dataset.version }}
</div>
<div v-else class="aggregation">
<p>Geometry type</p> {{ geometryType }}
</div>
<div class="provider">
Expand Down Expand Up @@ -209,7 +222,7 @@ export default {
margin-bottom: 4px;
}
.license {
.license, .geography {
margin-right: 24px;
}
Expand Down
1 change: 1 addition & 0 deletions lib/assets/javascripts/new-dashboard/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import store from './store';
import router from './router';
import './directives';
import './core/trackers';
import './polyfills';

import App from './App';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@
{{ updateFrequency }}
</p>
</li>
<li class="u-mb--32 u-mb--12--tablet" v-if="hasSubscription">
<h4 class="text is-small is-txtSoftGrey u-mb--10">
Version
</h4>
<p class="text is-caption is-txtMainTextColor">
{{ dataset.version }}
</p>
</li>
<li
class="u-mb--32 u-mb--12--tablet"
v-if="!isGeography && dataset.geography_is_product && (dataset.geography_slug || dataset.geography_id)"
Expand Down Expand Up @@ -131,6 +139,14 @@ export default {
dataset: state => state.catalog.dataset,
keyVariables: state => state.catalog.keyVariables
}),
hasSubscription () {
return this.subscriptionInfo && ['requested', 'active', 'expired'].includes(this.subscriptionInfo.status);
},
subscriptionInfo () {
return this.$store.getters['catalog/getSubscriptionByDataset'](
this.dataset.id
);
},
temporalAggregation () {
return temporalAggregationName(this.dataset.temporal_aggregation);
},
Expand Down
3 changes: 3 additions & 0 deletions lib/assets/javascripts/new-dashboard/polyfills.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import 'core-js/features/array/find';
import 'core-js/features/array/includes';
import 'core-js/features/string/includes';
Loading

0 comments on commit 0f7c4ff

Please sign in to comment.