Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function apply() {
if (this.create) {
return;
}
if (this.isNetworkBusy && !scheduledApply) {
scheduledApply = setTimeout(() => {
scheduledApply = null;
apply.apply(this);
}, 100);
}
if (this.isNetworkBusy < 3 && hasChange()) {
// console.log('apply', JSON.stringify(changeSet, null, 2));
store.dispatch(Actions.PROXY_UPDATE, changeSet);
store.dispatch(Actions.PROXY_DATA_FETCH, {
proxyId: this[`active${proxyType}Id`],
needUI: false,
});
}
}
},
mapGetters({
autoApply: Getters.APP_AUTO_APPLY,
panel: Getters.MODULES_ACTIVE,
pipeline: Getters.PROXY_PIPELINE,
selectedSources: Getters.PROXY_SELECTED_IDS,
proxyToPanel: Getters.PROXY_TO_MODULE_MAP,
proxyToName: Getters.PROXY_NAME_MAP,
moduleMap: Getters.MODULES_MAP,
sourceToRepresentationMap: Getters.PROXY_SOURCE_TO_REPRESENTATION_MAP,
})
),
methods: Object.assign(
mapActions({
updatePipeline: Actions.PROXY_PIPELINE_FETCH,
updateProxy: Actions.PROXY_UPDATE,
}),
mapMutations({
updateSelectedSource: Mutations.PROXY_SELECTED_IDS_SET,
}),
{
updateVisibility({ id, visible }) {
this.updateProxy([
{
id: this.sourceToRepresentationMap[id],
value: visible ? 1 : 0,
name: 'Visibility',
},
]);
},
}
),