Skip to content

Commit

Permalink
Final Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mkalioby committed Jan 15, 2019
1 parent 8b5fe2c commit 830171b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion webapp/autoDeploy/autodeploy/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def clone(request):
token=csrf(request).get("csrf_token")
data="{scm: '%s', ip: '%s', port: '%s', project_name: '%s',csrfmiddlewaretoken: '%s' }" % (project.repo_type,server.ip,server.port,project.name,token)
return render_to_response("base.html", {"project":project,"ajax":True, "data": data, "dataType":"html",
"title":"Cloning "q+ project.name, "function":"clone"}, context_instance=RequestContext(request))
"title":"Cloning "+ project.name, "function":"clone"}, context_instance=RequestContext(request))

@login_required(redirect_field_name="redirect")
@csrf_protect
Expand Down
8 changes: 4 additions & 4 deletions webapp/autoDeploy/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
{% if ajax %}
<script type="text/javascript">
function renderNotification(title,msg) {
body = $("<div>").html( msg.text).text();
body = $("<div>").html( msg).text();
var options = {
body: body,
// image: "{{ STATIC_URL }}img/sdl_logo.png",
icon: "{{ STATIC_URL }}img/logo.png",
badge: "{{ STATIC_URL }}img/logo.png",
timestamp: new Date();
timestamp: new Date(),
}

var n = new Notification(title, options);
Expand All @@ -45,9 +45,9 @@
$.ajax({url:"{{ BASE_URL }}api/{{ function }}","method":"GET","dataType":"{{ dataType }}", success:function(data)
{
{{ function }}(data)
{% if function == "clone" %}
{% if function == "clone" %}
renderNotification("Cloned Successfully","Clone of {{ project.name }} done successfully")
{% elif function == "deploy %}
{% elif function == "deploy" %}
renderNotification("Deployed Successfully","Deployment of {{ project.name }} done successfully")

{% endif %}
Expand Down

0 comments on commit 830171b

Please sign in to comment.