Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite9e42fa

Browse files
authored
Merge pull request#77 from cisco-ie/back_from_dead
Restoration of web container so the whole stack can work again
2 parents0ebd60d +c87a839 commite9e42fa

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

‎web/Dockerfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ WORKDIR /data/
33
RUN pip install --no-cache-dir pip==18.0
44
RUN pip install --no-cache-dir pipenv
55
COPY src/Pipfile Pipfile
6-
RUN apk add --no-cache --virtual .build-deps gcc musl-dev
6+
RUN apk add --no-cache --virtual .build-deps gccfile makemusl-dev libffi-dev libevent-dev
77
RUN pipenv --three install
88
RUN apk del .build-deps gcc musl-dev
99
COPY src/ .

‎web/src/Pipfile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ python-arango = "*"
1212
flask-wtf ="*"
1313
elasticsearch ="*"
1414
gevent ="*"
15+
email_validator ="*"
1516

1617

1718
[dev-packages]

‎web/src/web/views.py‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
from .importforms
2626
from .importapp
2727

28+
ARANGO_PORT=8529
29+
2830
@app.route('/')
2931
defindex():
3032
returnflask.render_template('index.html')
@@ -959,7 +961,7 @@ def map_datapath_calculation_single(name, description, equation, author, InCalcu
959961
calc_result_doc=check_collection_fields('DataPath',check_fields,calc_result)
960962
ifcalc_result_docisnotNone:
961963
calculation_result_ids.add(calc_result_doc.next()['_id'])
962-
client=ArangoClient(protocol='http',host='dbms')
964+
client=ArangoClient(hosts='http://dbms:{}'.format(ARANGO_PORT))
963965
db=client.db('tdm',username='root',password='tdm')
964966
calculation_collection=db.collection('Calculation')
965967
calculation_exists=calculation_collection.find({'name':name})
@@ -1032,7 +1034,7 @@ def map_datapath_single_by_key(basepath_key, matchpath_key, author, weight, anno
10321034
matchpath=fetch_datapath(matchpath_key)
10331035
ifnotmatchpath:
10341036
raiseException('Specified matching DataPath not found!')
1035-
client=ArangoClient(protocol='http',host='dbms')
1037+
client=ArangoClient(hosts='http://dbms:{}'.format(ARANGO_PORT))
10361038
db=client.db('tdm',username='root',password='tdm')
10371039
datapath_matches=db.collection('DataPathMatch')
10381040
datapath_match_exist=datapath_matches.find({'_from':basepath['_id'],'_to':matchpath['_id']})
@@ -1057,7 +1059,7 @@ def map_datapath_single_by_key(basepath_key, matchpath_key, author, weight, anno
10571059

10581060
defcheck_collection_fields(collection,fields,value,return_single=True,db=None):
10591061
ifdbisNone:
1060-
client=ArangoClient(protocol='http',host='dbms')
1062+
client=ArangoClient(hosts='http://dbms:{}'.format(ARANGO_PORT))
10611063
db=client.db('tdm',username='root',password='tdm')
10621064
collection_ref=db.collection(collection)
10631065
return_val=None
@@ -1077,7 +1079,7 @@ def check_collection_fields(collection, fields, value, return_single=True, db=No
10771079

10781080
defadd_mapping(edge_collection,from_id,to_id,body=None,check_bidirectional=True,db=None):
10791081
ifdbisNone:
1080-
client=ArangoClient(protocol='http',host='dbms')
1082+
client=ArangoClient(hosts='http://dbms:{}'.format(ARANGO_PORT))
10811083
db=client.db('tdm',username='root',password='tdm')
10821084
collection_ref=db.collection(edge_collection)
10831085
mapping=collection_ref.find({'_from':from_id,'_to':to_id})
@@ -1221,7 +1223,7 @@ def fetch_dump_mappings():
12211223

12221224
defquery_db(query,bind_vars=None,unlist=True):
12231225
"""Generically query database."""
1224-
client=ArangoClient(protocol='http',host='dbms')
1226+
client=ArangoClient(hosts='http://dbms:{}'.format(ARANGO_PORT))
12251227
db=client.db('tdm',username='root',password='tdm')
12261228
cursor=db.aql.execute(query,bind_vars=bind_vars)
12271229
# TODO: Pass as generator instead of fill array

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp