Skip to content

Commit d1237b5

Browse files
authored
Merge pull request #753 from globocom/dev
Dev
2 parents 42eccb3 + 9102fee commit d1237b5

File tree

11 files changed

+16939
-8
lines changed

11 files changed

+16939
-8
lines changed

dbaas/admin/static/admin/css/datatables.css

Lines changed: 592 additions & 0 deletions
Large diffs are not rendered by default.

dbaas/admin/static/admin/css/datatables.min.css

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dbaas/admin/static/admin/js/datatables.js

Lines changed: 15633 additions & 0 deletions
Large diffs are not rendered by default.

dbaas/admin/static/admin/js/datatables.min.js

Lines changed: 213 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dbaas/admin/templates/admin/base.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<link rel="stylesheet" type="text/css" href="{% static "admin/css/bootstrap.min.css" %}" />
1515
<link rel="stylesheet" type="text/css" href="{% static "admin/css/bootstrap-responsive.min.css" %}" />
1616
<link rel="stylesheet" type="text/css" href="{% static "admin/css/notification.css" %}" />
17+
<link rel="stylesheet" type="text/css" href="{% static "admin/css/datatables.min.css" %}" />
1718

1819
<!-- Font Awesome -->
1920
<link rel="stylesheet" href="{% static "assets/css/font-awesome.min.css" %}">
@@ -192,6 +193,7 @@
192193
{% endblock js_footer_commons %}
193194
<script type="text/javascript" src="{% static 'admin/js/mustache2.js' %}"></script>
194195
<script type="text/javascript" src="{% static 'admin/js/notification.js' %}"></script>
196+
<script type="text/javascript" src="{% static 'admin/js/datatables.min.js' %}"></script>
195197

196198
<script type="text/javascript">
197199
Base.init(

dbaas/admin/templates/admin/base_site.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
{% if config_docs_url %}
1515
<a href="{{ config_docs_url }}" target="_blank" class="brand" id="site-docs">Docs</a>
1616
{% endif %}
17+
<a href="http://dbmonitor.globoi.com" target="_blank" class="brand" id="site-db-monitor">DBMonitor</a>
18+
1719
{% endblock %}
1820

1921
{% block nav-global %}{% endblock %}

dbaas/admin/templates/admin/index.html

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ <h2>{% trans 'My Actions' %}</h2>
7575
<div class="span12 app-list">
7676
{% endif %}
7777
{% if app_list %}
78-
<h2>{% trans 'Apps' %}</h2>
78+
<h2 id="apps-list-title">{% trans 'Apps' %}</h2>
7979
{% for app in app_list %}
80-
<table summary="{% blocktrans with name=app.name %}Models available in the {{ name }} application.{% endblocktrans %}" class="table table-striped table-hover table-bordered table-condensed">
80+
<table summary="{% blocktrans with name=app.name %}Models available in the {{ name }} application.{% endblocktrans %}" class="table table-striped table-hover table-bordered table-condensed" id="app-{{ app.app_label }}">
8181
<thead>
8282
<tr>
8383
<th colspan="4">
@@ -161,8 +161,18 @@ <h3>
161161
}
162162
}
163163

164+
reorder_apps = function(){
165+
first_app = 'logical';
166+
app = $(`#app-${first_app}`);
167+
app.clone().insertAfter('#apps-list-title')
168+
app.remove();
169+
}
170+
164171
$(window).resize(swap_if_necessary);
165-
$(document).ready(swap_if_necessary);
172+
$(document).ready(function() {
173+
reorder_apps();
174+
swap_if_necessary();
175+
});
166176
})(django.jQuery);
167177
</script>
168178
{% endblock js_footer %}

dbaas/drivers/redis.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,7 @@ def get_cluster_client(self, instance, default_timeout=False):
678678
{'host': instance.address, 'port': instance.port}
679679
for instance in self.instances_filtered
680680
],
681+
max_connections=None,
681682
password=self.databaseinfra.password,
682683
socket_timeout=REDIS_CONNECTION_DEFAULT_TIMEOUT if default_timeout else self.connection_timeout_in_seconds,
683684
socket_connect_timeout=REDIS_CONNECTION_SOCKET_TIMEOUT if default_timeout else self.connection_socket_timeout_in_seconds,

dbaas/logical/migrations/0036_auto__add_field_databasehistory_apps_bind_name.py

Lines changed: 385 additions & 0 deletions
Large diffs are not rendered by default.

dbaas/logical/models.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ class DatabaseHistory(models.Model):
9797
description = models.TextField(
9898
verbose_name=_("Description"), null=True, blank=True
9999
)
100+
apps_bind_name = models.TextField(
101+
verbose_name=_("apps_bind_name"), null=True, blank=True
102+
)
100103

101104

102105
class Database(BaseModel):

0 commit comments

Comments
 (0)