Skip to content

Commit

Permalink
Merge pull request #77 from SmartReports/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
matteotolloso authored Jan 11, 2024
2 parents 4e56923 + 1135109 commit 951de2b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
16 changes: 15 additions & 1 deletion smartreport_app/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,18 @@ def mail_final_presentation():
img.add_header('Content-ID', '<{name}>'.format(name=image))
img.add_header('Content-Disposition', 'inline', filename=image)
msg.attach(img)
print(msg.send(fail_silently=False))
print(msg.send(fail_silently=False))


def send_sms():
command = '\
curl -X POST \
-H "Authorization: Bearer 6ece5154b6e446c1a11f798da819e5ab"\
-H "Content-Type: application/json" -d "\
{\
"from": "447520652538",\
"to": [ " " ],\
"body": "Enter test message here"\
}"\
"https://sms.api.sinch.com/xms/v1/fe0559cd9a074aec9cd5947b64ab91c9/batches"\
'
4 changes: 2 additions & 2 deletions smartreport_app/kb_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ def kb_interface(params):
dataset['fill'] = False
dataset['borderColor'] = colors[i%len(colors)]
dataset['backgroundColor'] = transp_colors[i%len(colors)]
dataset['tension'] = 0
dataset['tension'] = 0.6
if predict:
dashed_dataset = {}
dashed_dataset['fill'] = False
dashed_dataset['borderColor'] = colors[i%len(colors)]
dashed_dataset['backgroundColor'] = transp_colors[i%len(colors)]
dashed_dataset['tension'] = 0.8
dashed_dataset['tension'] = 0
dashed_dataset['label'] = kb_resp['name'] + ' ' +'Prediction'
dashed_dataset['data'] = []

Expand Down
4 changes: 0 additions & 4 deletions smartreport_app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,6 @@ def list(self, request):
if 'chart_type' not in params:
return Response({"message": "The required parameter 'chart_type' is missing"}, status=status.HTTP_400_BAD_REQUEST)

# TODO remove after testing
if params["chart_type"] == 'line':
params['predict'] = True

if list_of_KB_uids == []:
return Response({"message": "No kpis found"}, status=status.HTTP_400_BAD_REQUEST)

Expand Down

0 comments on commit 951de2b

Please sign in to comment.