File tree Expand file tree Collapse file tree 3 files changed +9
-11
lines changed
java/com/amitshekhar/server Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -69,18 +69,18 @@ function openDatabaseAndGetTableList(db) {
6969 if ( "APP_SHARED_PREFERENCES" == db ) {
7070 $ ( '#run-query' ) . removeClass ( 'active' ) ;
7171 $ ( '#run-query' ) . addClass ( 'disabled' ) ;
72- $ ( '#export -db' ) . removeClass ( 'active' ) ;
73- $ ( '#export -db' ) . addClass ( 'disabled' ) ;
72+ $ ( '#selected -db-info ' ) . removeClass ( 'active' ) ;
73+ $ ( '#selected -db-info ' ) . addClass ( 'disabled' ) ;
7474 isDatabaseSelected = false ;
7575 } else {
7676 $ ( '#run-query' ) . removeClass ( 'disabled' ) ;
7777 $ ( '#run-query' ) . addClass ( 'active' ) ;
78- $ ( '#export -db' ) . removeClass ( 'disabled' ) ;
79- $ ( '#export -db' ) . addClass ( 'active' ) ;
78+ $ ( '#selected -db-info ' ) . removeClass ( 'disabled' ) ;
79+ $ ( '#selected -db-info ' ) . addClass ( 'active' ) ;
8080 isDatabaseSelected = true ;
8181 }
8282
83- $ ( "#selected-db-info" ) . text ( "Selected Database : " + db ) ;
83+ $ ( "#selected-db-info" ) . text ( "Export Selected Database : " + db ) ;
8484
8585 $ . ajax ( { url : "getTableList?database=" + db , success : function ( result ) {
8686
Original file line number Diff line number Diff line change 103103 < label for ="query "> Query</ label >
104104 < input class ="form-control " id ="query ">
105105 </ div >
106- < button id ="selected-db-info " type ="button " class ="btn btn-info "> Welcome</ button >
106+ < button id ="selected-db-info " type ="button " onclick =" downloadDb() " class ="btn btn-info "> Welcome</ button >
107107 < button id ="success-info " type ="button " class ="btn btn-success display-none "> Query Executed</ button >
108108 < button id ="error-info " type ="button " class ="btn btn-danger display-none "> Query Not Executed</ button >
109109 < button id ="run-query " type ="submit " onclick ="queryFunction() " class ="btn btn-primary pull-right disabled "> Run
110110 Query
111111 </ button >
112- < button id ="export-db " type ="button " onclick ="downloadDb() " class ="btn btn-primary ">
113- Export DB
114- </ button >
115112 </ div >
116113 </ div >
117114
Original file line number Diff line number Diff line change 4545import java .io .IOException ;
4646import java .io .InputStream ;
4747import java .io .InputStreamReader ;
48- import java .io .OutputStream ;
4948import java .io .PrintStream ;
5049import java .net .ServerSocket ;
5150import java .net .Socket ;
@@ -120,7 +119,7 @@ public void stop() {
120119 mServerSocket .close ();
121120 mServerSocket = null ;
122121 }
123- } catch (IOException e ) {
122+ } catch (Exception e ) {
124123 Log .e (TAG , "Error closing the server socket." , e );
125124 }
126125 }
@@ -138,6 +137,8 @@ public void run() {
138137 // The server was stopped; ignore.
139138 } catch (IOException e ) {
140139 Log .e (TAG , "Web server error." , e );
140+ } catch (Exception ignore ) {
141+
141142 }
142143 }
143144
You can’t perform that action at this time.
0 commit comments