in dialogflow-cx/vpc-sc-demo/frontend/src/StatusPollToggle.js [162:193]
bucket: getBucket(props.dataModel),
region: props.dataModel.projectData.region.current,
webhook_name: props.dataModel.projectData.webhook_name.current,
access_policy_title:
props.dataModel.projectData.accessPolicyTitle.current,
},
})
.then(res => res.data);
}
const enabled =
props.state.isUpdating.current ||
props.dataModel.projectData.project_id.current === '' ||
props.dataModel.projectData.project_id.current === null ||
typeof props.dataModel.validProjectId.current !== 'boolean' ||
props.dataModel.validProjectId.current === false ||
props.dataModel.loggedIn.current === false ||
props.dataModel.terraformLocked.current
? false
: true;
const {data} = useQuery(props.endpoint, queryFunction, {
refetchInterval: 10000,
onSuccess: onSuccess,
retry: false,
enabled: enabled,
});
useEffect(() => {
if (data && completed.current) {
completed.current = false;
props.state.status.set(data.status);
if (data.status === 'BLOCKED') {