type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
ClassDeclaration
export class ToggleSelection implements Action { readonly type = TOGGLE_SELECTION; constructor(public payload: any) { } }
broadinstitute/firecloud-explorer
src/app/file-manager/actions/export-to-s3-item.actions.ts
TypeScript
ClassDeclaration
export class ToggleItemSelection implements Action { readonly type = TOGGLE_ITEM_SELECTION; constructor(public payload: any) { } }
broadinstitute/firecloud-explorer
src/app/file-manager/actions/export-to-s3-item.actions.ts
TypeScript
ClassDeclaration
export class AddItem implements Action { readonly type = ADD_ITEM; constructor(public payload: any) { } }
broadinstitute/firecloud-explorer
src/app/file-manager/actions/export-to-s3-item.actions.ts
TypeScript
ClassDeclaration
export class AddItems implements Action { readonly type = ADD_ITEMS; constructor(public payload: any) { } }
broadinstitute/firecloud-explorer
src/app/file-manager/actions/export-to-s3-item.actions.ts
TypeScript
ClassDeclaration
export class ProcessItem implements Action { readonly type = PROCESS_ITEM; constructor(public payload: any) { } }
broadinstitute/firecloud-explorer
src/app/file-manager/actions/export-to-s3-item.actions.ts
TypeScript
ClassDeclaration
export class ProcessItems implements Action { readonly type = PROCESS_ITEMS; constructor(public payload: any) { } }
broadinstitute/firecloud-explorer
src/app/file-manager/actions/export-to-s3-item.actions.ts
TypeScript
ClassDeclaration
export class CompleteItem implements Action { readonly type = COMPLETE_ITEM; constructor(public payload: any) { } }
broadinstitute/firecloud-explorer
src/app/file-manager/actions/export-to-s3-item.actions.ts
TypeScript
ClassDeclaration
export class CompleteItems implements Action { readonly type = COMPLETE_ITEMS; constructor(public payload: any) { } }
broadinstitute/firecloud-explorer
src/app/file-manager/actions/export-to-s3-item.actions.ts
TypeScript
ClassDeclaration
export class PauseItem implements Action { readonly type = PAUSE_ITEM; constructor(public payload: any) { } }
broadinstitute/firecloud-explorer
src/app/file-manager/actions/export-to-s3-item.actions.ts
TypeScript
ClassDeclaration
export class PauseItems implements Action { readonly type = PAUSE_ITEMS; constructor(public payload: any) { } }
broadinstitute/firecloud-explorer
src/app/file-manager/actions/export-to-s3-item.actions.ts
TypeScript
ClassDeclaration
export class CancelItem implements Action { readonly type = CANCEL_ITEM; constructor(public payload: any) { } }
broadinstitute/firecloud-explorer
src/app/file-manager/actions/export-to-s3-item.actions.ts
TypeScript
ClassDeclaration
export class CancelItems implements Action { readonly type = CANCEL_ITEMS; constructor(public payload: any) { } }
broadinstitute/firecloud-explorer
src/app/file-manager/actions/export-to-s3-item.actions.ts
TypeScript
ClassDeclaration
export class CancelAllItems implements Action { readonly type = CANCEL_ALL; constructor() { } }
broadinstitute/firecloud-explorer
src/app/file-manager/actions/export-to-s3-item.actions.ts
TypeScript
ClassDeclaration
export class FailItem implements Action { readonly type = FAIL_ITEM; constructor(public payload: any) { } }
broadinstitute/firecloud-explorer
src/app/file-manager/actions/export-to-s3-item.actions.ts
TypeScript
ClassDeclaration
export class FailItems implements Action { readonly type = FAIL_ITEMS; constructor(public payload: any) { } }
broadinstitute/firecloud-explorer
src/app/file-manager/actions/export-to-s3-item.actions.ts
TypeScript
ClassDeclaration
export class UpdateItem implements Action { readonly type = UPDATE_ITEM; constructor(public payload: any) { } }
broadinstitute/firecloud-explorer
src/app/file-manager/actions/export-to-s3-item.actions.ts
TypeScript
ClassDeclaration
export class RemoveItem implements Action { readonly type = REMOVE_ITEM; constructor(public payload: any) { } }
broadinstitute/firecloud-explorer
src/app/file-manager/actions/export-to-s3-item.actions.ts
TypeScript
ClassDeclaration
export class SelectItem implements Action { readonly type = SELECT_ITEM; constructor(public payload: any) { } }
broadinstitute/firecloud-explorer
src/app/file-manager/actions/export-to-s3-item.actions.ts
TypeScript
ClassDeclaration
export class UpdateProgress implements Action { readonly type = UPDATE_ITEM_PROGRESS; constructor(public payload: any) { } }
broadinstitute/firecloud-explorer
src/app/file-manager/actions/export-to-s3-item.actions.ts
TypeScript
TypeAliasDeclaration
export type All = Load | Filter | Reset | SelectAll | UnselectAll | ToggleSelection | ToggleItemSelection | AddItem | AddItems | ProcessItem | ProcessItems | CompleteItem | CompleteItems | PauseItem | PauseItems | CancelItem | CancelItems | CancelAllItems | FailItem | FailItems | UpdateItem | UpdateProgress | RemoveItem | SelectItem ;
broadinstitute/firecloud-explorer
src/app/file-manager/actions/export-to-s3-item.actions.ts
TypeScript
ArrowFunction
() => { beforeEach(() => { TestBed.configureTestingModule({ imports: [HttpClientTestingModule], providers: [ GroupService, RestService ] }); }); it('should be created', inject([GroupService], (service: GroupService) => { expect(service).toBeTruthy(); })); }
metal-messiah/mtn-data-suite
src/app/core/services/group.service.spec.ts
TypeScript
ArrowFunction
() => { TestBed.configureTestingModule({ imports: [HttpClientTestingModule], providers: [ GroupService, RestService ] }); }
metal-messiah/mtn-data-suite
src/app/core/services/group.service.spec.ts
TypeScript
ArrowFunction
(service: GroupService) => { expect(service).toBeTruthy(); }
metal-messiah/mtn-data-suite
src/app/core/services/group.service.spec.ts
TypeScript
FunctionDeclaration
function treeNodeKey(node: NodeId & {uid?: string}) { return node.uid || nodeKey(node); }
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
FunctionDeclaration
function getGraphSize(nodes: dagre.Node[]): {width: number; height: number} { let width = 0; let height = 0; nodes.forEach(node => { width = Math.max(node.x + node.width, width); height = Math.max(node.y + node.height, height); }); return {width, height}; }
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
FunctionDeclaration
function filterGraph(app: models.Application, filteredIndicatorParent: string, graph: dagre.graphlib.Graph, predicate: (node: ResourceTreeNode) => boolean) { const appKey = appNodeKey(app); let filtered = 0; graph.nodes().forEach(nodeId => { const node: ResourceTreeNode = graph.node(nodeId) as any; const parentIds = graph.predecessors(nodeId); if (node.root != null && !predicate(node) && appKey !== nodeId) { const childIds = graph.successors(nodeId); graph.removeNode(nodeId); filtered++; childIds.forEach((childId: any) => { parentIds.forEach((parentId: any) => { graph.setEdge(parentId, childId); }); }); } }); if (filtered) { graph.setNode(FILTERED_INDICATOR_NODE, {height: NODE_HEIGHT, width: NODE_WIDTH, count: filtered, type: NODE_TYPES.filteredIndicator}); graph.setEdge(filteredIndicatorParent, FILTERED_INDICATOR_NODE); } }
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
FunctionDeclaration
function compareNodes(first: ResourceTreeNode, second: ResourceTreeNode) { return `${(first.orphaned && '1') || '0'}/${nodeKey(first)}`.localeCompare(`${(second.orphaned && '1') || '0'}/${nodeKey(second)}`); }
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
FunctionDeclaration
function appNodeKey(app: models.Application) { return nodeKey({group: 'argoproj.io', kind: app.kind, name: app.metadata.name, namespace: app.metadata.namespace}); }
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
FunctionDeclaration
function renderFilteredNode(node: {count: number} & dagre.Node, onClearFilter: () => any) { const indicators = new Array<number>(); let count = Math.min(node.count - 1, 3); while (count > 0) { indicators.push(count--); } return ( <React.Fragment> <div className='application-resource-tree__node' style={{left: node.x, top: node.y, width: node.width, height: node.height}}
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
FunctionDeclaration
function renderTrafficNode(node: dagre.Node) { return ( <div style={{position: 'absolute', left: 0, top: node.y, width: node.width, height: node.height}}
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
FunctionDeclaration
function renderLoadBalancerNode(node: dagre.Node & {label: string; color: string}) { return ( <div className='application-resource-tree__node application-resource-tree__node--load-balancer' style={{ left: node.x, top: node.y, width: node.width, height: node.height }}
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
FunctionDeclaration
function renderResourceNode(props: ApplicationResourceTreeProps, id: string, node: (ResourceTreeNode) & dagre.Node) { const fullName = nodeKey(node); let comparisonStatus: models.SyncStatusCode = null; let healthState: models.HealthStatus = null; if (node.status || node.health) { comparisonStatus = node.status; healthState = node.health; } const appNode = isAppNode(node); const rootNode = !node.root; return ( <div onClick={() => props.onNodeClick && props.onNodeClick(fullName)}
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
FunctionDeclaration
function findNetworkTargets(nodes: ResourceTreeNode[], networkingInfo: models.ResourceNetworkingInfo): ResourceTreeNode[] { let result = new Array<ResourceTreeNode>(); const refs = new Set((networkingInfo.targetRefs || []).map(nodeKey)); result = result.concat(nodes.filter(target => refs.has(nodeKey(target)))); if (networkingInfo.targetLabels) { result = result.concat( nodes.filter(target => { if (target.networkingInfo && target.networkingInfo.labels) { return Object.keys(networkingInfo.targetLabels).every(key => networkingInfo.targetLabels[key] === target.networkingInfo.labels[key]); } return false; }) ); } return result; }
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
FunctionDeclaration
function processNode(node: ResourceTreeNode, root: ResourceTreeNode, colors?: string[]) { graph.setNode(treeNodeKey(node), {...node, width: NODE_WIDTH, height: NODE_HEIGHT, root}); (childrenByParentKey.get(treeNodeKey(node)) || []).sort(compareNodes).forEach(child => { graph.setEdge(treeNodeKey(node), treeNodeKey(child), {colors}); processNode(child, root, colors); }); }
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
darken => BASE_COLORS.map(item => color(item) .darken(darken) .hex() )
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
item => color(item) .darken(darken) .hex()
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
(first, second) => first.concat(second)
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
node => { width = Math.max(node.x + node.width, width); height = Math.max(node.y + node.height, height); }
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
nodeId => { const node: ResourceTreeNode = graph.node(nodeId) as any; const parentIds = graph.predecessors(nodeId); if (node.root != null && !predicate(node) && appKey !== nodeId) { const childIds = graph.successors(nodeId); graph.removeNode(nodeId); filtered++; childIds.forEach((childId: any) => { parentIds.forEach((parentId: any) => { graph.setEdge(parentId, childId); }); }); } }
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
(childId: any) => { parentIds.forEach((parentId: any) => { graph.setEdge(parentId, childId); }); }
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
(parentId: any) => { graph.setEdge(parentId, childId); }
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
i => ( <div key={i}
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
(tag, i) => ( <span title={`${tag.name}:${tag.value}`
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
target => refs.has(nodeKey(target))
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
target => { if (target.networkingInfo && target.networkingInfo.labels) { return Object.keys(networkingInfo.targetLabels).every(key => networkingInfo.targetLabels[key] === target.networkingInfo.labels[key]); } return false; }
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
key => networkingInfo.targetLabels[key] === target.networkingInfo.labels[key]
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
res => statusByKey.set(nodeKey(res), res)
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
node => ({...node, orphaned: false})
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
node => ({...node, orphaned: true})
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
node => { const status = statusByKey.get(nodeKey(node)); const resourceNode: ResourceTreeNode = {...node}; if (status) { resourceNode.health = status.health; resourceNode.status = status.status; resourceNode.hook = status.hook; resourceNode.requiresPruning = status.requiresPruning; } nodeByKey.set(treeNodeKey(node), resourceNode); }
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
node => node.networkingInfo
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
parent => { findNetworkTargets(networkNodes, parent.networkingInfo).forEach(child => { const children = childrenByParentKey.get(treeNodeKey(parent)) || []; hasParents.add(treeNodeKey(child)); children.push(child); childrenByParentKey.set(treeNodeKey(parent), children); }); }
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
child => { const children = childrenByParentKey.get(treeNodeKey(parent)) || []; hasParents.add(treeNodeKey(child)); children.push(child); childrenByParentKey.set(treeNodeKey(parent), children); }
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
node => !hasParents.has(treeNodeKey(node))
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
child => { (child.parentRefs || []).forEach(parent => { const children = childrenByParentKey.get(treeNodeKey(parent)) || []; children.push(child); childrenByParentKey.set(treeNodeKey(parent), children); }); }
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
parent => { const children = childrenByParentKey.get(treeNodeKey(parent)) || []; children.push(child); childrenByParentKey.set(treeNodeKey(parent), children); }
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
node => (node.parentRefs || []).length === 0
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
child => { graph.setEdge(treeNodeKey(node), treeNodeKey(child), {colors}); processNode(child, root, colors); }
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
root => (root.networkingInfo.ingress || []).length > 0
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
root => (root.networkingInfo.ingress || []).length === 0
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
root => treeNodeKey(root)
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
root => root.networkingInfo.ingress.map(ingress => ingress.hostname || ingress.ip)
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
ingress => ingress.hostname || ingress.ip
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
(key, i) => colorsBySource.set(key, TRAFFIC_COLORS[i % TRAFFIC_COLORS.length])
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
root => { const loadBalancers = root.networkingInfo.ingress.map(ingress => ingress.hostname || ingress.ip); processNode(root, root, loadBalancers.map(lb => colorsBySource.get(lb))); loadBalancers.forEach(key => { const loadBalancerNodeKey = `${EXTERNAL_TRAFFIC_NODE}:${key}`; graph.setNode(loadBalancerNodeKey, { height: NODE_HEIGHT, width: NODE_WIDTH, type: NODE_TYPES.externalLoadBalancer, label: key, color: colorsBySource.get(key) }); graph.setEdge(loadBalancerNodeKey, treeNodeKey(root), {colors: [colorsBySource.get(key)]}); graph.setEdge(EXTERNAL_TRAFFIC_NODE, loadBalancerNodeKey, {colors: [colorsBySource.get(key)]}); }); }
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
lb => colorsBySource.get(lb)
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
key => { const loadBalancerNodeKey = `${EXTERNAL_TRAFFIC_NODE}:${key}`; graph.setNode(loadBalancerNodeKey, { height: NODE_HEIGHT, width: NODE_WIDTH, type: NODE_TYPES.externalLoadBalancer, label: key, color: colorsBySource.get(key) }); graph.setEdge(loadBalancerNodeKey, treeNodeKey(root), {colors: [colorsBySource.get(key)]}); graph.setEdge(EXTERNAL_TRAFFIC_NODE, loadBalancerNodeKey, {colors: [colorsBySource.get(key)]}); }
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
root => { processNode(root, root, [colorsBySource.get(treeNodeKey(root))]); graph.setEdge(INTERNAL_TRAFFIC_NODE, treeNodeKey(root)); }
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
node => processNode(node, node)
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
root => graph.setEdge(appNodeKey(props.app), treeNodeKey(root))
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
edgeInfo => { const edge = graph.edge(edgeInfo); const colors = (edge.colors as string[]) || []; let backgroundImage: string; if (colors.length > 0) { const step = 100 / colors.length; const gradient = colors.map((lineColor, i) => { return `${lineColor} ${step * i}%, ${lineColor} ${step * i + step / 2}%, transparent ${step * i + step / 2}%, transparent ${step * (i + 1)}%`; }); backgroundImage = `linear-gradient(90deg, ${gradient})`; } const lines: Line[] = []; // don't render connections from hidden node representing internal traffic if (edgeInfo.v === INTERNAL_TRAFFIC_NODE || edgeInfo.w === INTERNAL_TRAFFIC_NODE) { return; } if (edge.points.length > 1) { for (let i = 1; i < edge.points.length; i++) { lines.push({x1: edge.points[i - 1].x, y1: edge.points[i - 1].y, x2: edge.points[i].x, y2: edge.points[i].y}); } } edges.push({from: edgeInfo.v, to: edgeInfo.w, lines, backgroundImage}); }
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
(lineColor, i) => { return `${lineColor} ${step * i}%, ${lineColor} ${step * i + step / 2}%, transparent ${step * i + step / 2}%, transparent ${step * (i + 1)}%`; }
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
id => graph.node(id)
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
key => { const node = graph.node(key); const nodeType = node.type; switch (nodeType) { case NODE_TYPES.filteredIndicator: return <React.Fragment key={key}>{renderFilteredNode(node as any, props.onClearFilter
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
edge => ( <div key={`${edge.from}-${edge.to}`
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
(line, i) => { const distance = Math.sqrt(Math.pow(line.x1 - line.x2, 2) + Math.pow(line.y1 - line.y2, 2)); const xMid = (line.x1 + line.x2) / 2; const yMid = (line.y1 + line.y2) / 2; const angle = (Math.atan2(line.y1 - line.y2, line.x1 - line.x2) * 180) / Math.PI; return ( <div className='application-resource-tree__line' key={i} style={{ width: distance, left: xMid - distance / 2, top: yMid, backgroundImage: edge.backgroundImage, transform: `translate(150px, 35px) rotate(${angle}deg)` }}
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
InterfaceDeclaration
export interface ResourceTreeNode extends models.ResourceNode { status?: models.SyncStatusCode; health?: models.HealthStatus; hook?: boolean; root?: ResourceTreeNode; requiresPruning?: boolean; orphaned?: boolean; }
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
InterfaceDeclaration
export interface ApplicationResourceTreeProps { app: models.Application; tree: models.ApplicationTree; useNetworkingHierarchy: boolean; nodeFilter: (node: ResourceTreeNode) => boolean; selectedNodeFullName?: string; onNodeClick?: (fullName: string) => any; nodeMenu?: (node: models.ResourceNode) => React.ReactNode; onClearFilter: () => any; showOrphanedResources: boolean; }
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
InterfaceDeclaration
interface Line { x1: number; y1: number; x2: number; y2: number; }
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
MethodDeclaration
classNames('application-resource-tree__node', { 'active': fullName
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
MethodDeclaration
classNames('application-resource-tree__node-kind-icon', { 'application-resource-tree__node-kind-icon--big': rootNode })
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
MethodDeclaration
classNames('application-resource-tree__node-status-icon', { 'application-resource-tree__node-status-icon--offset': rootNode })
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
MethodDeclaration
renderFilteredNode(node as any, props
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
MethodDeclaration
renderTrafficNode(node)
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
MethodDeclaration
renderLoadBalancerNode(node as any)
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
MethodDeclaration
renderResourceNode(props, key, node as
anarcher/argo-cd
ui/src/app/applications/components/application-resource-tree/application-resource-tree.tsx
TypeScript
ArrowFunction
(výchozí: místní nastavení systému)
Whalidarsya/FreedPaysCoin
src/qt/locale/bitcoin_cs.ts
TypeScript
ArrowFunction
(výchozí: 32190 nebo testovací síť: 32192)
Whalidarsya/FreedPaysCoin
src/qt/locale/bitcoin_cs.ts
TypeScript
ArrowFunction
(výchozí: 32191 nebo testovací síť: 32193)
Whalidarsya/FreedPaysCoin
src/qt/locale/bitcoin_cs.ts
TypeScript
ArrowFunction
(výchozí: 127.0.0.1)
Whalidarsya/FreedPaysCoin
src/qt/locale/bitcoin_cs.ts
TypeScript
ArrowFunction
(výchozí: 100)
Whalidarsya/FreedPaysCoin
src/qt/locale/bitcoin_cs.ts
TypeScript
FunctionDeclaration
export function handleResponse(request: SearchRequest, response: SearchResponse) { if (response.timed_out) { getNotifications().toasts.addWarning({ title: i18n.translate('data.search.searchSource.fetch.requestTimedOutNotificationMessage', { defaultMessage: 'Data might be incomplete because your request timed out', }), }); } if (response._shards && response._shards.failed) { const title = i18n.translate('data.search.searchSource.fetch.shardsFailedNotificationMessage', { defaultMessage: '{shardsFailed} of {shardsTotal} shards failed', values: { shardsFailed: response._shards.failed, shardsTotal: response._shards.total, }, }); const description = i18n.translate( 'data.search.searchSource.fetch.shardsFailedNotificationDescription', { defaultMessage: 'The data you are seeing might be incomplete or wrong.', } ); const text = toMountPoint( <> {description} <EuiSpacer size="s" /> <ShardFailureOpenModalButton request={request.body as ShardFailureRequest} response={response as ShardFailureResponse} title={title} /> </> ); getNotifications().toasts.addWarning({ title, text }); } return response; }
6paklata/kibana
src/plugins/data/public/search/fetch/handle_response.tsx
TypeScript
ArrowFunction
() => { it('the component should render', () => { const { getByTestId, container } = renderWithTheme( <HACheckbox {...props} /> ); if (shouldRender) { expect(getByTestId('ha-checkbox')).toBeVisible(); } else { expect(container).toBeEmptyDOMElement(); } }); it('should call the onChange function on click', () => { const { container } = renderWithTheme(<HACheckbox {...props} />); const checkbox = container.querySelector('input'); if (!checkbox && shouldRender) { fail('Checkbox input not found'); } if (checkbox && !shouldRender) { fail( 'High Availability Checkbox was rendered, but no price was provided.' ); } if (checkbox) { fireEvent.click(checkbox); expect(props.onChange).toHaveBeenCalled(); } }); }
adigit123/manager
packages/manager/src/features/Kubernetes/KubeCheckoutBar/HACheckbox.test.tsx
TypeScript
ArrowFunction
() => { const { getByTestId, container } = renderWithTheme( <HACheckbox {...props} /> ); if (shouldRender) { expect(getByTestId('ha-checkbox')).toBeVisible(); } else { expect(container).toBeEmptyDOMElement(); } }
adigit123/manager
packages/manager/src/features/Kubernetes/KubeCheckoutBar/HACheckbox.test.tsx
TypeScript
ArrowFunction
() => { const { container } = renderWithTheme(<HACheckbox {...props} />); const checkbox = container.querySelector('input'); if (!checkbox && shouldRender) { fail('Checkbox input not found'); } if (checkbox && !shouldRender) { fail( 'High Availability Checkbox was rendered, but no price was provided.' ); } if (checkbox) { fireEvent.click(checkbox); expect(props.onChange).toHaveBeenCalled(); } }
adigit123/manager
packages/manager/src/features/Kubernetes/KubeCheckoutBar/HACheckbox.test.tsx
TypeScript
ClassDeclaration
/** Provides operations to count the resources in the collection. */ export class CountRequestBuilder { /** Path parameters for the request */ private readonly pathParameters: Record<string, unknown>; /** The request adapter to use to execute the requests. */ private readonly requestAdapter: RequestAdapter; /** Url template to use to build the URL for the current request builder */ private readonly urlTemplate: string; /** * Instantiates a new CountRequestBuilder and sets the default values. * @param pathParameters The raw url or the Url template parameters for the request. * @param requestAdapter The request adapter to use to execute the requests. */ public constructor(pathParameters: Record<string, unknown> | string | undefined, requestAdapter: RequestAdapter) { if(!pathParameters) throw new Error("pathParameters cannot be undefined"); if(!requestAdapter) throw new Error("requestAdapter cannot be undefined"); this.urlTemplate = "{+baseurl}/me/joinedTeams/{team%2Did}/schedule/swapShiftsChangeRequests/$count"; const urlTplParams = getPathParameters(pathParameters); this.pathParameters = urlTplParams; this.requestAdapter = requestAdapter; }; /** * Get the number of the resource * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @returns a RequestInformation */ public createGetRequestInformation(requestConfiguration?: CountRequestBuilderGetRequestConfiguration | undefined) : RequestInformation { const requestInfo = new RequestInformation(); requestInfo.urlTemplate = this.urlTemplate; requestInfo.pathParameters = this.pathParameters; requestInfo.httpMethod = HttpMethod.GET; if (requestConfiguration) { requestInfo.addRequestHeaders(requestConfiguration.headers); requestInfo.addRequestOptions(requestConfiguration.options); } return requestInfo; }; /** * Get the number of the resource * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param responseHandler Response handler to use in place of the default response handling provided by the core service * @returns a Promise of Integer */ public get(requestConfiguration?: CountRequestBuilderGetRequestConfiguration | undefined, responseHandler?: ResponseHandler | undefined) : Promise<number | undefined> { const requestInfo = this.createGetRequestInformation( requestConfiguration ); const errorMapping: Record<string, ParsableFactory<Parsable>> = { "4XX": createODataErrorFromDiscriminatorValue, "5XX": createODataErrorFromDiscriminatorValue, }; return this.requestAdapter?.sendPrimitiveAsync<number>(requestInfo, "number", responseHandler, errorMapping) ?? Promise.reject(new Error('http core is null')); }; }
microsoftgraph/msgraph-sdk-typescript
src/me/joinedTeams/item/schedule/swapShiftsChangeRequests/count/countRequestBuilder.ts
TypeScript
MethodDeclaration
/** * Get the number of the resource * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @returns a RequestInformation */ public createGetRequestInformation(requestConfiguration?: CountRequestBuilderGetRequestConfiguration | undefined) : RequestInformation { const requestInfo = new RequestInformation(); requestInfo.urlTemplate = this.urlTemplate; requestInfo.pathParameters = this.pathParameters; requestInfo.httpMethod = HttpMethod.GET; if (requestConfiguration) { requestInfo.addRequestHeaders(requestConfiguration.headers); requestInfo.addRequestOptions(requestConfiguration.options); } return requestInfo; }
microsoftgraph/msgraph-sdk-typescript
src/me/joinedTeams/item/schedule/swapShiftsChangeRequests/count/countRequestBuilder.ts
TypeScript
MethodDeclaration
/** * Get the number of the resource * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @param responseHandler Response handler to use in place of the default response handling provided by the core service * @returns a Promise of Integer */ public get(requestConfiguration?: CountRequestBuilderGetRequestConfiguration | undefined, responseHandler?: ResponseHandler | undefined) : Promise<number | undefined> { const requestInfo = this.createGetRequestInformation( requestConfiguration ); const errorMapping: Record<string, ParsableFactory<Parsable>> = { "4XX": createODataErrorFromDiscriminatorValue, "5XX": createODataErrorFromDiscriminatorValue, }; return this.requestAdapter?.sendPrimitiveAsync<number>(requestInfo, "number", responseHandler, errorMapping) ?? Promise.reject(new Error('http core is null')); }
microsoftgraph/msgraph-sdk-typescript
src/me/joinedTeams/item/schedule/swapShiftsChangeRequests/count/countRequestBuilder.ts
TypeScript
ArrowFunction
res =>{ console.log(res); this.user = { realm : res.realm, email : res.email, password : null, cfmPassword : null } }
RaikireHiuduo/beems-angular
web-app/src/app/user-profile/user-profile.component.ts
TypeScript
ArrowFunction
err => { console.log(err); }
RaikireHiuduo/beems-angular
web-app/src/app/user-profile/user-profile.component.ts
TypeScript