rails_db_admin 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/rails_db_admin/erp_app/desktop/base_controller.rb +3 -0
- data/lib/rails_db_admin/version.rb +1 -1
- data/public/javascripts/erp_app/desktop/applications/rails_db_admin/database_combo.js +4 -3
- data/public/javascripts/erp_app/desktop/applications/rails_db_admin/module.js +401 -405
- data/public/javascripts/erp_app/desktop/applications/rails_db_admin/query_panel.js +196 -190
- data/public/javascripts/erp_app/desktop/applications/rails_db_admin/readonly_table_data_grid.js +2 -5
- data/spec/controllers/rails_db_admin/erp_app/desktop/base_controller_spec.rb +50 -70
- data/spec/controllers/rails_db_admin/erp_app/desktop/queries_controller_spec.rb +15 -17
- metadata +7 -7
@@ -9,6 +9,9 @@ module RailsDbAdmin
|
|
9
9
|
Rails.configuration.database_configuration.each do |k, v|
|
10
10
|
result[:databases] << {:display => k, :value => k}
|
11
11
|
end
|
12
|
+
|
13
|
+
result[:databases].delete_if{|v| v[:value] == Rails.env}
|
14
|
+
result[:databases].unshift({:value => Rails.env, :display => Rails.env})
|
12
15
|
|
13
16
|
render :json => result
|
14
17
|
end
|
@@ -4,7 +4,6 @@ Ext.define("Compass.ErpApp.Desktop.Applications.RailsDbAdmin.DatabaseComboBox",{
|
|
4
4
|
initComponent: function() {
|
5
5
|
|
6
6
|
var databaseJsonStore = new Ext.data.Store({
|
7
|
-
autoLoad:true,
|
8
7
|
timeout:60000,
|
9
8
|
proxy: {
|
10
9
|
type: 'ajax',
|
@@ -38,12 +37,14 @@ Ext.define("Compass.ErpApp.Desktop.Applications.RailsDbAdmin.DatabaseComboBox",{
|
|
38
37
|
triggerAction:'all',
|
39
38
|
editable:false,
|
40
39
|
forceSelection:true,
|
41
|
-
|
42
|
-
//value:'development',
|
40
|
+
queryMode: 'local',
|
43
41
|
listeners:{
|
44
42
|
'select':function(combo, record, index){
|
45
43
|
// switch databases
|
46
44
|
combo.initialConfig.module.connectToDatatbase();
|
45
|
+
},
|
46
|
+
render:function(combo){
|
47
|
+
combo.getStore().load();
|
47
48
|
}
|
48
49
|
}
|
49
50
|
}, config);
|