Sort all nodes when loading.

pull/3/head
Dave Page 2016-03-16 10:31:20 +00:00
parent 2fb6ccf5b2
commit 41805d40b5
14 changed files with 21 additions and 15 deletions

View File

@ -96,7 +96,7 @@ class ServerGroupView(NodeView):
for sg in ServerGroup.query.filter_by(
user_id=current_user.id
):
).order_by(name):
res.append({
'id': sg.id,
'name': sg.name

View File

@ -379,7 +379,7 @@ class ServerNode(PGChildNodeView):
"""
servers = Server.query.filter_by(
user_id=current_user.id,
servergroup_id=gid)
servergroup_id=gid).order_by(name)
sg = ServerGroup.query.filter_by(
user_id=current_user.id,
id=gid

View File

@ -1,3 +1,3 @@
SELECT e.oid, e.evtname AS name
FROM pg_event_trigger e
ORDER BY e.evtname
FROM pg_event_trigger e
ORDER BY e.evtname

View File

@ -13,4 +13,4 @@ WHERE
(
{{ CATALOGS.LIST('nsp') }}
)
ORDER BY 1, nspname;
ORDER BY 2;

View File

@ -13,4 +13,4 @@ WHERE
(
{{ CATALOGS.LIST('nsp') }}
)
ORDER BY 1, nspname;
ORDER BY 2;

View File

@ -14,4 +14,4 @@ WHERE
(
{{ CATALOGS.LIST('nsp') }}
)
ORDER BY 1, nspname;
ORDER BY 2;

View File

@ -14,4 +14,4 @@ WHERE
(
{{ CATALOGS.LIST('nsp') }}
)
ORDER BY 1, nspname;
ORDER BY 2;

View File

@ -18,4 +18,4 @@ WHERE
NOT (
{{ CATALOGS.LIST('nsp') }}
)
ORDER BY 1, nspname;
ORDER BY nspname;

View File

@ -18,4 +18,4 @@ WHERE
NOT (
{{ CATALOGS.LIST('nsp') }}
)
ORDER BY 1, nspname;
ORDER BY nspname;

View File

@ -18,4 +18,4 @@ WHERE
NOT (
{{ CATALOGS.LIST('nsp') }}
)
ORDER BY 1, nspname;
ORDER BY nspname;

View File

@ -18,4 +18,4 @@ WHERE
NOT (
{{ CATALOGS.LIST('nsp') }}
)
ORDER BY 1, nspname;
ORDER BY nspname;

View File

@ -4,5 +4,7 @@ SELECT
FROM
pg_database db
LEFT OUTER JOIN pg_tablespace ta ON db.dattablespace = ta.oid{% if did %}
WHERE db.oid={{ did|qtLiteral }}::OID{% endif %}
WHERE db.oid={{ did|qtLiteral }}::OID{% endif %};
ORDER BY datname;

View File

@ -5,4 +5,6 @@ FROM
pg_database db
LEFT OUTER JOIN pg_tablespace ta ON db.dattablespace = ta.oid{% if did %}
WHERE db.oid={{ did|qtLiteral }}::OID {% endif %};
WHERE db.oid={{ did|qtLiteral }}::OID {% endif %}
ORDER BY datname;

View File

@ -5,4 +5,6 @@ FROM
pg_database db
LEFT OUTER JOIN pg_tablespace ta ON db.dattablespace = ta.oid{% if did %}
WHERE db.oid={{ did|qtLiteral }}::OID{% endif %};
WHERE db.oid={{ did|qtLiteral }}::OID{% endif %}
ORDER BY datname;