Merge branch 'master' into feature/ch120967/include-connections-in-user-migrations

pull/16287/head
cgonzalez 3 years ago
commit 7aaee607a6

@ -11,6 +11,7 @@ Development
* Include DB connections, all parameters for Oauth connections, and the relationship between synchronizations and connections, in User migrations [#16287](https://github.com/CartoDB/cartodb/pull/16287)
### Bug fixes / enhancements
- Remove all references to Spatial Data Catalog and Kepler GL maps in on-premises [#16293](https://github.com/CartoDB/cartodb/pull/16293)
- Guard code for vizjson users [#16267](https://github.com/CartoDB/cartodb/pull/16267)
- Guard code for Users and Visualizations [#16265](https://github.com/CartoDB/cartodb/pull/16265)
- Use the organization user's data while editing a user from organization settings [#16280](https://github.com/CartoDB/cartodb/pull/16280)

@ -45,13 +45,13 @@
:message="$t('FeedbackMessage.message')"
@click.native.stop.prevent="toggleDropdown"/>
<NotificationPopup
v-if="!popupWasShown('popups.DataObservatorySamples')"
<!-- <NotificationPopup
v-if="!popupWasShown('popups.DataObservatorySamples') && !isOnPremise"
class="notification-popup"
:title="$t('DataObservatorySamples.title')"
:message="$t('DataObservatorySamples.message', { path: this.$router.resolve({ name: 'spatial-data-catalog' }).href })"
:messageHasHTML="true"
@click.native="markPopupAsRead('popups.DataObservatorySamples')"/>
@click.native="markPopupAsRead('popups.DataObservatorySamples')"/> -->
<!-- <NotificationPopup
v-if="!popupWasShown('popups.directDBConnection') && hasDBFFActive"

@ -15,7 +15,7 @@
<span>{{ $t('DataPage.tabs.subscriptions') }}</span>
</router-link>
</div>
<router-link :to="{ name: 'spatial-data-catalog' }" class="tabs__item title is-small u-flex u-flex__align--center right" exact active-class="is-active">
<router-link v-if="!isOnPremise" :to="{ name: 'spatial-data-catalog' }" class="tabs__item title is-small u-flex u-flex__align--center right" exact active-class="is-active">
<span>{{ $t('DataPage.tabs.catalog') }}</span>
</router-link>
</SecondaryNavigation>
@ -40,7 +40,8 @@ export default {
connections: state => state.connectors.connections
}),
...mapGetters({
hasBigqueryConnection: 'connectors/hasBigqueryConnection'
hasBigqueryConnection: 'connectors/hasBigqueryConnection',
isOnPremise: 'config/isOnPremise'
}),
isDatasetPage () {
return isAllowed(this.$route.params.filter);

@ -3,13 +3,14 @@
<li class="MapsTabs__item">
<button class="button button--ghost MapsTabs__link" :class="{'is-active': cartoMapsVisible}" @click="showCartoMaps">{{ $t('MapsPage.tabs.carto') }}</button>
</li>
<li class="MapsTabs__item">
<li v-if="!isOnPremise" class="MapsTabs__item">
<button class="button button--ghost MapsTabs__link" :class="{'is-active': keplerMapsVisible}" @click="showKeplerMaps">{{ $t('MapsPage.tabs.external') }}</button>
</li>
</ul>
</template>
<script>
import { mapGetters } from 'vuex';
export default {
name: 'MapTabs',
props: {
@ -22,6 +23,11 @@ export default {
default: false
}
},
computed: {
...mapGetters({
isOnPremise: 'config/isOnPremise'
})
},
methods: {
showCartoMaps () {
this.$emit('showCartoMaps');

@ -63,7 +63,13 @@ export default {
isFetching: state => {
return state.recentContent.isFetching;
},
recentContent: state => state.recentContent.list
recentContent: state => {
if (state.config.cartodb_com_hosted) {
return state.recentContent.list.filter(l => l.type !== 'keplergl');
} else {
return state.recentContent.list;
}
}
})
},
methods: {

@ -5,7 +5,7 @@
<router-link :to="{ name: 'maps' }" class="tabs__item title is-small" exact active-class="is-active" :class="{'is-active': isCartoPage }">
<span>{{ $t('MapsPage.tabs.carto') }}</span>
</router-link>
<router-link :to="{ name: 'external' }" class="tabs__item title is-small" active-class="is-active">
<router-link v-if="!isOnPremise" :to="{ name: 'external' }" class="tabs__item title is-small" active-class="is-active">
<span>{{ $t('MapsPage.tabs.external') }}</span>
</router-link>
</div>
@ -18,6 +18,7 @@
import Page from 'new-dashboard/components/Page';
import SecondaryNavigation from 'new-dashboard/components/SecondaryNavigation';
import { mapGetters } from 'vuex';
export default {
name: 'MapsPage',
@ -26,6 +27,9 @@ export default {
SecondaryNavigation
},
computed: {
...mapGetters({
isOnPremise: 'config/isOnPremise'
}),
isCartoPage () {
return (this.$route || {}).name === 'maps';
}

@ -84,14 +84,6 @@ const routes = [
}
]
},
{
path: 'spatial-data-catalog',
name: 'spatial-data-catalog',
component: Catalog,
meta: {
title: () => 'Spatial Data Catalog | CARTO'
}
},
{
path: '',
component: Datasets,
@ -106,8 +98,21 @@ const routes = [
]
}
]
},
{
}
];
// If is not on-premise then create paths for spatial-data-catalog
if (!store.state.config.cartodb_com_hosted) {
routes[0].children.unshift({
path: 'spatial-data-catalog',
name: 'spatial-data-catalog',
component: Catalog,
meta: {
title: () => 'Spatial Data Catalog | CARTO'
}
});
routes.push({
path: '/datasets/spatial-data-catalog/:entity_type/:entity_id',
component: CatalogDataset,
meta: {
@ -139,8 +144,8 @@ const routes = [
}
}
]
}
];
});
}
if (store.state.user.do_enabled) {
routes[0].children.unshift({

@ -16,7 +16,10 @@ const config = {
url_prefix: CARTOUserData.base_url,
plan_url: CARTOData.plan_url
},
getters: {},
getters: {
// If `cartodb_com_hosted` is true then we're running in an on-prem.
isOnPremise: state => state.cartodb_com_hosted
},
mutations: {},
actions: {}
};

@ -14,7 +14,6 @@ exports[`NavigationBar.vue should have is-user-notification class when the user
<div class="navbar-avatar" style="background-image: url(//cartodb-libs.global.ssl.fastly.net/cartodbui/assets/unversioned/images/avatars/avatar_ghost_yellow.png);"></div>
<userdropdown-stub baseurl="" usermodel="[object Object]"></userdropdown-stub>
<!---->
<notificationpopup-stub title="DataObservatorySamples.title" message="DataObservatorySamples.message" messagehashtml="true" class="notification-popup"></notificationpopup-stub>
</div> <span class="navbar-searchClose"><img svg-inline="" src="../../assets/icons/navbar/close.svg"></span>
</div>
</nav>
@ -34,7 +33,6 @@ exports[`NavigationBar.vue should render regular navbar with search input open 1
<div class="navbar-avatar" style="background-image: url(//cartodb-libs.global.ssl.fastly.net/cartodbui/assets/unversioned/images/avatars/avatar_ghost_yellow.png);"></div>
<userdropdown-stub baseurl="" usermodel="[object Object]"></userdropdown-stub>
<!---->
<notificationpopup-stub title="DataObservatorySamples.title" message="DataObservatorySamples.message" messagehashtml="true" class="notification-popup"></notificationpopup-stub>
</div> <span class="navbar-searchClose"><img svg-inline="" src="../../assets/icons/navbar/close.svg"></span>
</div>
</nav>
@ -54,7 +52,6 @@ exports[`NavigationBar.vue should render regular navbar with user dropdown close
<div class="navbar-avatar" style="background-image: url(//cartodb-libs.global.ssl.fastly.net/cartodbui/assets/unversioned/images/avatars/avatar_ghost_yellow.png);"></div>
<userdropdown-stub baseurl="" usermodel="[object Object]"></userdropdown-stub>
<!---->
<notificationpopup-stub title="DataObservatorySamples.title" message="DataObservatorySamples.message" messagehashtml="true" class="notification-popup"></notificationpopup-stub>
</div> <span class="navbar-searchClose"><img svg-inline="" src="../../assets/icons/navbar/close.svg"></span>
</div>
</nav>
@ -74,7 +71,6 @@ exports[`NavigationBar.vue should render regular navbar with user dropdown close
<div class="navbar-avatar" style="background-image: url(//cartodb-libs.global.ssl.fastly.net/cartodbui/assets/unversioned/images/avatars/avatar_ghost_yellow.png);"></div>
<userdropdown-stub baseurl="" usermodel="[object Object]"></userdropdown-stub>
<notificationpopup-stub title="FeedbackMessage.title" message="FeedbackMessage.message" class="notification-popup"></notificationpopup-stub>
<notificationpopup-stub title="DataObservatorySamples.title" message="DataObservatorySamples.message" messagehashtml="true" class="notification-popup"></notificationpopup-stub>
</div> <span class="navbar-searchClose"><img svg-inline="" src="../../assets/icons/navbar/close.svg"></span>
</div>
</nav>
@ -94,7 +90,6 @@ exports[`NavigationBar.vue should render regular navbar with user dropdown open
<div class="navbar-avatar" style="background-image: url(//cartodb-libs.global.ssl.fastly.net/cartodbui/assets/unversioned/images/avatars/avatar_ghost_yellow.png);"></div>
<userdropdown-stub baseurl="" usermodel="[object Object]" open="true"></userdropdown-stub>
<!---->
<notificationpopup-stub title="DataObservatorySamples.title" message="DataObservatorySamples.message" messagehashtml="true" class="notification-popup"></notificationpopup-stub>
</div> <span class="navbar-searchClose"><img svg-inline="" src="../../assets/icons/navbar/close.svg"></span>
</div>
</nav>

@ -1,4 +1,5 @@
import { shallowMount } from '@vue/test-utils';
import { createLocalVue, shallowMount } from '@vue/test-utils';
import Vuex from 'vuex';
import RecentSection from 'new-dashboard/pages/Home/RecentSection/RecentSection';
import visualizations from '../../fixtures/visualizations';
import datasets from '../../fixtures/datasets';
@ -8,6 +9,20 @@ const recentContentList = [
datasets.visualizations[0]
];
const localVue = createLocalVue();
localVue.use(Vuex);
let store = new Vuex.Store({
state: {
config: {
cartodb_com_hosted: false
},
recentContent: {
list: recentContentList
}
}
});
describe('RecentSection.vue', () => {
let recentSectionComponent, pushSpy;
@ -15,19 +30,14 @@ describe('RecentSection.vue', () => {
pushSpy = jest.fn();
recentSectionComponent = shallowMount(RecentSection, {
store,
mocks: {
$t: key => key,
$store: {
state: {
recentContent: {
list: recentContentList
}
}
},
$router: {
push: pushSpy
}
}
},
localVue
});
});

2
package-lock.json generated

@ -1,6 +1,6 @@
{
"name": "cartodb-ui",
"version": "1.0.0-assets.245",
"version": "1.0.0-assets.246",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

@ -1,6 +1,6 @@
{
"name": "cartodb-ui",
"version": "1.0.0-assets.245",
"version": "1.0.0-assets.246",
"description": "CARTO UI frontend",
"repository": {
"type": "git",

Loading…
Cancel
Save