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

Commit

Permalink
Merge pull request #235 from asm-products/staging
Browse files Browse the repository at this point in the history
Staging to Master
  • Loading branch information
madflojo committed Apr 24, 2015
2 parents 7332c9d + 03a348f commit 3bbe61e
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 17 deletions.
6 changes: 6 additions & 0 deletions src/web/instance/web.cfg.default
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,9 @@ SUBSCRIPTIONS = {
'interval': 'month'
}
}
DATACENTERS = {
'choices' : {
("dc1queue", 'DigitalOcean - nyc2'),
("dc2queue", 'DigitalOcean - sfo1')
}
}
7 changes: 7 additions & 0 deletions src/web/instance/web.cfg.example
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,10 @@ SUBSCRIPTIONS = {
'interval': 'month'
}
}
DATACENTERS = {
'choices' : {
("dc1queue", 'DigitalOcean - nyc2'),
("dc2queue", 'DigitalOcean - sfo1')
}
}

7 changes: 7 additions & 0 deletions src/web/instance/web_sample.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,10 @@ SUBSCRIPTIONS = {
'interval': 'month'
}
}
DATACENTERS = {
'choices' : {
("dc1queue", 'DigitalOcean - nyc2'),
("dc2queue", 'DigitalOcean - sfo1')
}
}

7 changes: 2 additions & 5 deletions src/web/monitorforms/datacenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@
from wtforms import SelectMultipleField
from wtforms.validators import DataRequired
from timer import TimerCheckForm

from web import app

class DatacenterCheckForm(TimerCheckForm):

''' Class that creates an datacenter form for the dashboard '''
dc_choices = [
("dc1queue", 'DigitalOcean - nyc2'),
("dc2queue", 'DigitalOcean - sfo1')
]
dc_choices = app.config['DATACENTERS']['choices']

datacenter = SelectMultipleField(
"Datacenter",
Expand Down
14 changes: 14 additions & 0 deletions src/web/templates/assembly.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<script type="text/javascript">
;(function(p,l,o,w,i){if(!p[i]){p.__asml=p.__asml||[];
p.__asml.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)
};p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1;
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","https://d1uxm17u44dmmr.cloudfront.net/1.0.0/asml.js","asml"));

asml('create', 'fdc1605623bb4606f9f0c6eaa37942cfbd519389');

{% if data['loggedin'] %}
asml('track', '{{ data['email_digest'] }}');
{% else %}
asml('track');
{% endif %}
</script>
1 change: 1 addition & 0 deletions src/web/templates/dash-footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
{% for item in data['js_bottom'] %}
{% include item %}
{% endfor %}
{% include "assembly.js" %}
{% block js %}{% endblock %}
</body>
</html>
27 changes: 15 additions & 12 deletions src/web/templates/footer.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<!-- FOOTER -->
<div class="footer">
<div class="container">
<!-- FOOTER -->
<div class="footer">
<div class="container">

<ul>
<li><a href="/pages/tos">Terms of Service</a></li>
<li><a href="/pages/faq">FAQ</a></li>
<li><a href="https://twitter.com/runbookio">Twitter</a></li>
<li><a href="mailto:support@runbook.io">Contact</a></li>
</ul>
<ul>
<li><a href="/pages/tos">Terms of Service</a></li>
<li><a href="/pages/faq">FAQ</a></li>
<li><a href="https://twitter.com/runbookio">Twitter</a></li>
<li><a href="mailto:support@runbook.io">Contact</a></li>
</ul>

</div>
</div>
<!-- end FOOTER -->
</div>
</div>
<!-- end FOOTER -->
{% include "assembly.js" %}
</body>
</html>
2 changes: 2 additions & 0 deletions src/web/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import os
import sys
import cookies
import md5

# Flask modules
from flask import Flask
Expand Down Expand Up @@ -73,6 +74,7 @@ def startData(user=None):
data['stripe_pubkey'] = app.config['STRIPE_PUBKEY']
data['subplans'] = user.subplans
data['subscription'] = user.subscription
data['email_digest'] = md5.new(user.email).hexdigest()
data['js_bottom'] = []
data['js_header'] = []
return data
Expand Down

0 comments on commit 3bbe61e

Please sign in to comment.