Skip to content
This repository has been archived by the owner on Dec 26, 2022. It is now read-only.

Internal 172 canvas bug #180

Merged
merged 6 commits into from
Jul 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ services:
- "IS_LOCAL=True"
- MG_ALPHAS=master_graph:9080
- GRAPL_LOG_LEVEL=${GRAPL_LOG_LEVEL:-ERROR}
- GRAPL_DGRAPH_TTL_S=${GRAPL_DGRAPH_TTL_S:-600}
- GRAPL_DGRAPH_TTL_S=${GRAPL_DGRAPH_TTL_S:-31536000}
- GRAPL_TTL_DELETE_BATCH_SIZE=${GRAPL_TTL_DELETE_BATCH_SIZE:-10}
tty: true
links:
Expand Down
17 changes: 13 additions & 4 deletions src/js/graphql_endpoint/modules/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ const getLensByName = async (dg_client, lensName) => {
uid,
dgraph_type: dgraph.type,
lens_type,
scope {
scope @filter(has(node_key)) {
uid,
dgraph_type: dgraph.type,
expand(_all_)
Expand Down Expand Up @@ -364,13 +364,17 @@ const getRisksFromNode = async (dg_client, nodeUid) => {
const query = `
query all($a: string)
{
all(func: uid($a))
all(func: uid($a)) @cascade
{
uid,
dgraph_type: dgraph.type
node_key
risks {
uid,
uid
dgraph_type: dgraph.type
expand(_all_),
node_key
analyzer_name
risk_score
}
}
}`;
Expand Down Expand Up @@ -416,8 +420,13 @@ const handleLensScope = async (parent, args) => {
const lens_name = args.lens_name;

const lens = await getLensByName(dg_client, lens_name);
lens["scope"] = lens["scope"] || [];

for (const node of lens["scope"]) {
// node.uid = parseInt(node.uid, 16);
if(!node.dgraph_type){
console.warn("No DGraph Type", node)
}
// for every node in our lens scope, get its neighbors

const nodeEdges = await getNeighborsFromNode(dg_client, node["uid"]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

ORIGIN_OVERRIDE = os.environ.get("ORIGIN_OVERRIDE", None)

LOGGER.debug("Origin: ", origin)
LOGGER.debug("Origin: ", ORIGIN)
app = Chalice(app_name="model-plugin-deployer")


Expand Down
Loading