MCPcopy Create free account
hub / github.com/Snapchat/dagger-browser / ModuleSummary

Function ModuleSummary

browser/src/components/ModuleSummary.tsx:16–52  ·  view source on GitHub ↗
({ componentName, moduleName, graphManager, weightService }: Props)

Source from the content-addressed store, hash-verified

14};
15
16export function ModuleSummary({ componentName, moduleName, graphManager, weightService }: Props) {
17 const graphModule = graphManager.getModule(componentName, moduleName);
18 const history = useHistory();
19
20 if (!graphModule) {
21 return (
22 <div>
23 Cannot find ${graphModule} module in ${componentName} graph
24 </div>
25 );
26 }
27
28 return (
29 <div className="card">
30 <div className="card-content">
31 <div className="card-title">
32 Module: {graphModule.key}
33 </div>
34
35 <h6>Bindings</h6>
36 {graphModule.bindings.map(node => {
37 return (
38 <NodeLink
39 key={node!.key}
40 weight={weightService.getWeight(ALL_COMPONENTS, node!.key)}
41 scoped={true}
42 node={node!}
43 onSelect={node => {
44 history.push(Routes.GraphNode(componentName, node));
45 }}
46 />
47 );
48 })}
49 </div>
50 </div>
51 );
52}

Callers

nothing calls this directly

Calls 2

getModuleMethod · 0.80
getWeightMethod · 0.65

Tested by

no test coverage detected