Skip to content

Instantly share code, notes, and snippets.

Avatar

Nishu Goel NishuGoel

View GitHub Profile
View react_check
const SchedulerTable = (props: IProps) => {
const [jobItem, showJobItem] = useState(false);
const classes = useStyles();
const [anchorEl, setAnchor] = useState(null);
const [jobs, setJobs] = useState([] as IJobs[]);
const [loading, setLoading] = useState(true);
const { enqueueSnackbar } = useSnackbar();
const [jobId, setJobId] = useState(0);
const handleOpen = (event: any, id: number) => {
View Schedule_Schema
{"_id":"5ef07a387e39f40018b5eebd","Name":"Asda_Groceries","StoreName":"https://groceries.asda.com","RobotName":"Asda_Groceries","Active":true,"CronString":"* * * * *","WorkflowType":"CategoryDeep","InputDataFile":"Asda_Groceries_UK.txt","DetailTemplateName":"Adil_groceries.asda_DETAILS","DetailTemplateId":"5ee61cc87e39f40018b5eeab","Delimiter":",","OutputSchema":[{"id":"433f007c-1661-4594-aa5a-79ae44bfc9af","Type":"Extracted-field","FieldName":"name","FieldValue":"Detail","ExtractedFieldName":"name","ExtractedFieldId":"f6f95e59-4b3b-43ba-925a-177c901014df","ExtractedFieldType":"Detail"},{"id":"da664287-c648-4a5e-a917-aa26e99c94f8","Type":"Extracted-field","FieldName":"sku","FieldValue":"Detail","ExtractedFieldName":"sku","ExtractedFieldId":"adfd59a1-1f51-416f-946d-0613df7d288f","ExtractedFieldType":"Detail"},{"id":"b2d2ccea-ba5e-40f4-ad41-9eb7551793ea","Type":"Extracted-field","FieldName":"url","FieldValue":"Detail","ExtractedFieldName":"url","ExtractedFieldId":"81d36b88-ba98-4880-bef8-4996812505a2","Extracte
View check
{
"Output": [
{
"DetailURL": "https://www.kroger.com/p/bakery-fresh-goodness-chocolate-enrobed-cake-donuts-12-count/0001111004554",
"breadcrumbs": [
"Bakery",
"Donuts, Danishes, & Muffins"
],
"offer_info": "",
"slug": "bakery-fresh-goodness-chocolate-enrobed-cake-donuts-12-count",
View infra-control.json
[
{
"cluster_count_min": 1,
"cluster_count_max": 30,
"queue_buffer_count": 1000,
"consumer_max": 30,
"producer_max": 12
}
]
View user-task.json
[
{
"id": 1,
"user_id": 23,
"task_title": "Tesco.com Detail Scope",
"task_type": "",
"customer_id": 53,
"project_id": 70,
"priority_enum": 2,
"status_enum": 4,
View use-key-press-example.jsx
import { useState, useEffect } from 'react';
// Usage
function App() {
// Call our hook for each key that we'd like to monitor
const happyPress = useKeyPress('h');
const sadPress = useKeyPress('s');
const robotPress = useKeyPress('r');
const foxPress = useKeyPress('f');
View logger-service.factory.ts
import {DataService} from './data.service'
import {LoggerService} from './logger.service';
export function logServiceFactory(dataService: DataService){
let loggerService: LoggerService = new LoggerService(dataService);
dataService.sendData("From the log service factory");
return loggerService;
}
View useExisting
constructor(private dataService: DataService);
// takes to ExtendDataService
OR
constructor(private extendDataService: ExtendDataService);
// also takes to ExtendDataService
View ExtendDataService
class DataService implements ExtendDataService {
sendData(){
console.log('extend data service called!')
}
}