📄 isc_dbconsole.js
字号:
,isc.A.setDefaultDB=function(_1){var _2={appInputs:{dbName:_1}};this.adminConsole.performOperation("setDefaultDB",null,this.getID()+".setDefaultDBCallback(data)",_2)},isc.A.setDefaultDBCallback=function(_1){isc.say("Default database is now: <b>"+_1+"<p><i>Please wait for the container to reload before continuing."+"<br>Note that you may need to explicitly restart your servlet engine if you"+" encounter difficulty accessing this database.</i>")},isc.A.testDB=function(){if(!this.dbForm.validate())return;var _1=this.dbForm.getValue("dbName");var _2=this.dbForm.getValues();var _3={appInputs:{dbName:_1,dbConfig:_2},willHandleError:true};this.adminConsole.performOperation("testDB",null,this.getID()+".testDBCallback(data)",_3)},isc.A.testDBCallback=function(_1){isc.say(_1,{title:"Result of test"})},isc.A.saveDB=function(){if(!this.dbForm.validate())return;isc.RPCManager.startQueue();this.adminConsole.performOperation("saveDBConfig",this.dbForm.getValues(),this.getID()+".saveDBCallback(data)");this.getDefinedDatabases();isc.RPCManager.sendQueue()},isc.A.saveDBCallback=function(_1){var _2=this.dbForm.getValue('dbName');isc.say("Saved configuration for database '"+_2+"."+"<p><i>Please wait for the container to reload before continuing."+"<br>Note that you may need to explicitly restart your servlet engine if you"+" encounter difficulty accessing this database.</i>")});isc.B._maxIndex=isc.C+9;isc.defineClass("DBForm","DynamicForm");isc.A=isc.DBForm.getPrototype();isc.A.titleWidth=200;isc.A.items=[{type:"text",title:"Database Name",name:"dbName",required:true},{change:"form.setDBFormDefaults()",type:"select",valueMap:{db2:"DB2",hsqldb:"HSQLDB",mysql:"MySQL",oracle:"Oracle",postgresql:"PostgreSQL",sqlserver:"SQLServer"},title:"Database Type",name:"database.type",required:true,redrawOnChange:true},{change:"form.setDBFormDefaults()",type:"select",valueMap:{dataSource:"DataSource",driverManager:"DriverManager",jndi:"App Server (JNDI)"},title:"Obtain Connections Using",name:"interface.type",required:true,redrawOnChange:true},{type:"hidden",defaultValue:"_container_",name:"driver.context"},{type:"text",hint:"e.g. jdbc/myDB",title:"JNDI Name",name:"name",showIf:"form.getValue('interface.type') == 'jndi'",validators:[{type:"requiredIf",expression:"item.isVisible()"}]},{type:"text",width:300,title:"Driver Implementer",name:"driver",validators:[{type:"requiredIf",expression:"item.isVisible()"}],showIf:"form.getValue('interface.type') != 'jndi'"},{change:"form.setDBFormDefaults()",type:"checkbox",title:"Specify explicit JDBC URL",name:"useURL",redrawOnChange:true,showIf:"form.getValue('interface.type') == 'driverManager'",_constructor:"FormItem"},{type:"text",width:400,title:"Driver URL",name:"driver.url",validators:[{type:"requiredIf",expression:"item.isVisible()"}],showIf:"form.getValue('useURL') && form.getValue('interface.type') != 'jndi'"},{type:"text",defaultValue:"localhost",title:"Server Name",name:"driver.serverName",validators:[{type:"requiredIf",expression:"item.isVisible()"}],showIf:"form.dsShowIf()"},{type:"text",title:"Port Number",name:"driver.portNumber",validators:[{type:"requiredIf",expression:"item.isVisible()"}],showIf:"form.dsShowIf()"},{type:"text",title:"Database Name/SID",name:"driver.databaseName",validators:[{type:"requiredIf",expression:"item.isVisible()"}],showIf:"form.dsShowIf()"},{type:"text",title:"User",name:"driver.user",validators:[{type:"requiredIf",expression:"item.isVisible()"}],showIf:"form.dsShowIf()"},{type:"text",title:"Password",name:"driver.password",required:false,showIf:"form.dsShowIf()"},{title:"Driver Name",name:"driver.driverName",validators:[{type:"requiredIf",expression:"item.isVisible()"}],showIf:"form.getValue('interface.type') == 'driverManager' && !form.getValue('useURL')"},{defaultValue:"thin",title:"Driver Type",name:"driver.driverType",validators:[{type:"requiredIf",expression:"item.isVisible()"}],showIf:"form.getValue('interface.type') == 'dataSource' && form.getValue('database.type') == 'oracle'"},{defaultValue:"tcp",title:"Network Protocol",name:"driver.networkProtocol",showIf:"form.getValue('interface.type') == 'dataSource'"},{type:"checkbox",title:"Enable ISC Connection Pooling",name:"pool.enabled",showIf:"form.getValue('interface.type') != 'jndi'"}];isc.A=isc.DBForm.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.dsShowIf=function(){return(this.getValue('interface.type')!='jndi'&&!this.getValue('useURL'))},isc.A.setDBFormDefaults=function(){var _1=this;var _2=_1.getValue('database.type');var _3=_1.getValue('interface.type');if(_3=='jndi')return;var _4='';if(_2=='mysql')_4='3306';else if(_2=='postgresql')_4='5432';else if(_2=='oracle')_4='1521';else if(_2=='sqlserver')_4='1433';else if(_2=='db2')_4='6789'_1.setValue('driver.portNumber',_4);var _5='';if(_3=='dataSource'){if(_2=='oracle')_5='oracle.jdbc.pool.OracleDataSource';if(_2=='mysql')_5='com.mysql.jdbc.jdbc2.optional.MysqlDataSource';if(_2=='sqlserver')_5='com.microsoft.jdbc.sqlserver.SQLServerDriver';if(_2=='postgresql')_5='';if(_2=='db2')_5='COM.ibm.db2.jdbc.DB2DataSource'}if(_3=='driverManager'){if(_2=='oracle')_5='oracle.jdbc.driver.OracleDriver';if(_2=='mysql')_5='org.gjt.mm.mysql.Driver';if(_2=='sqlserver')_5='';if(_2=='postgresql')_5='org.postgresql.Driver';if(_2=='db2')_5=''}else{_1.setValue('useURL',false)}_1.setValue('driver',_5);var _6=_1.getValue('driver.serverName');if(_6=='Embedded in JDBC URL')_1.setValue('driver.serverName','');if(_1.getValue('useURL')==false)_1.setValue('driver.url','');var _7='';if(_3=='driverManager')_7=_2;_1.setValue('driverName',_7)});isc.B._maxIndex=isc.C+2;isc._moduleEnd=isc._DBConsole_end=(isc.timestamp?isc.timestamp():new Date().getTime());if(isc.Log&&isc.Log.logIsInfoEnabled('loadTime'))isc.Log.logInfo('DBConsole module init time: ' + (isc._moduleEnd-isc._moduleStart) + 'ms','loadTime');}else{if(window.isc && isc.Log && isc.Log.logWarn)isc.Log.logWarn("Duplicate load of module 'DBConsole'.");}/* SmartClient Ajax RIA system Version 6.5/LGPL Development Only (2008-04-30) Copyright 2000-2007 Isomorphic Software, Inc. All rights reserved. "SmartClient" is a trademark of Isomorphic Software, Inc. LICENSE NOTICE INSTALLATION OR USE OF THIS SOFTWARE INDICATES YOUR ACCEPTANCE OF THE SOFTWARE EVALUATION LICENSE AGREEMENT. If you have received this file without an Isomorphic Software license file, please see: http://www.isomorphic.com/licenses/isc_eval_license_050316.html You are not required to accept this agreement, however, nothing else grants you the right to copy or use this software. Unauthorized copying and use of this software is a violation of international copyright law. EVALUATION ONLY This software is provided for limited evaluation purposes only. You must acquire a deployment license from Isomorphic Software in order to use the SmartClient system, or any portion thereof, in any non-evaluation application, including internal or non-commercial applications. PROPRIETARY & PROTECTED MATERIAL This software contains proprietary materials that are protected by contract and intellectual property law. YOU ARE EXPRESSLY PROHIBITED FROM ATTEMPTING TO REVERSE ENGINEER THIS SOFTWARE OR MODIFY THIS SOFTWARE FOR HUMAN READABILITY. CONTACT ISOMORPHIC For more information regarding license rights and restrictions, or to report possible license violations, please contact Isomorphic Software by email (licensing@isomorphic.com) or web (www.isomorphic.com).*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -