fix with subscription and removed print statements

community
Steve L. Nyemba 6 years ago
parent c2d188d556
commit 58e675c789

@ -91,6 +91,7 @@ def update_plan(uid,plan,auid=None):
url = ":protocol://:host/store/subscribe/smart-top"
url = url.replace(":protocol",CONFIG['protocol']).replace(":host",CONFIG['api'])
try:
args = {"type":SYS_STORE['class']['read'],"args":SYS_STORE['args']}
# reader = factory.instance(**args)
@ -99,9 +100,10 @@ def update_plan(uid,plan,auid=None):
headers['pid'] = plan
if auid is not None:
headers["auid"]=json.dumps([auid])
httpclient = requests.session()
r = httpclient.post(url,headers=headers)
#r = requests.post(url,headers=headers)
# httpclient = requests.session()
# r = httpclient.post(url,headers=headers)
r = requests.post(url,headers=headers)
return json.loads( r.text)
except Exception,e:
@ -135,11 +137,11 @@ def register() :
key = None
if 'key' not in session :
key = reader.view('users/uid_map',key=uid)
# if key :
# session['key'] = key
key = reader.view('users/uid_map',key=uid)
if key :
plans = reader.view('users/active_plan',key=str(key))
session['key'] = key
else:
plans = None
plan = body['plan'] if 'plan' in body else CONFIG['default_plan']#-- default plan
@ -156,7 +158,7 @@ def register() :
writer.write(label='hash',data=auid)
session['key'] = key
if plans :
if plans :
session['user-plan'] = plans
return ('',204)
return "",403

@ -1 +1 @@
Subproject commit 34df3788e1fea826703301741b32f7782b7ef455
Subproject commit 3599fff083f1661a1762992d3891210d6c3aec05

@ -55,7 +55,7 @@
height:90%;
}
.widget .chart iframe {
.widget .chart .info {
width:99%;
min-height:90%;
@ -125,7 +125,17 @@
.dialog .title { font-weight: bold; padding:4px; margin-bottom:4px; background:#f3f3f3; }
.dialog .title i {color:ff5733}
.dialog .message {padding:8px; font-family:verdana; min-height:10%}
@media screen and (min-width: 1280px){
@media screen and (min-width: 1024px){
.widget .chart {
display:grid;
grid-template-columns: 35% 35% 30%;
grid-template-rows:100%;
grid-gap:1px;
width:100%;
height:90%;
}
.widget .chart .info {
width:99%;
min-height:75%;

Loading…
Cancel
Save