Skip to content

Commit

Permalink
Version 3.2.3
Browse files Browse the repository at this point in the history
Update for API changes
  • Loading branch information
ChrisdeG committed Mar 24, 2021
1 parent f51c2b0 commit bd7829b
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 42 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ test/*
test2/*
test/widgets/*
bin/main/*
log4j.xml.old
33 changes: 0 additions & 33 deletions log4j.xml

This file was deleted.

Binary file modified out/MendixBackupRestoreTool.exe
Binary file not shown.
Binary file modified out/MendixBackupRestoreTool.jar
Binary file not shown.
14 changes: 7 additions & 7 deletions src/main/java/com/ccdg/app/MendixUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
*
*/
public class MendixUtil {
private static final String MXBACKUPAPIV1 = "https://deploy.mendix.com/api/1/apps/";
private static final String MXBACKUPAPIV1 = "https://deploy.mendix.com/api/1/apps";
// json fields in api response
private static final String CREATED_ON = "CreatedOn";
private static final String SNAPSHOT_ID = "SnapshotID";
Expand Down Expand Up @@ -472,7 +472,7 @@ public void GetAppList(List list, String filter) {
if (response.code() == 401) {
consoleWrite("Unauthorized, Check your username and api-key ");
} else {
consoleWrite("Error getting apps:" + response.code());
consoleWrite("Error getting apps: " + response.code());
}
}
} catch (Exception e) {
Expand All @@ -493,7 +493,7 @@ public void getEnvironmentList(int selectionCount, List environmentlist){
String appid = apps.getJSONObject(AppIndexByListIndex(selectionCount)).getString(APP_ID);

Request request = new Request.Builder()
.url(MXBACKUPAPIV1 + appid +"/environments")
.url(MXBACKUPAPIV1 + "/" + appid +"/environments")
.get()
.addHeader(MENDIX_USER_NAME, apiuser)
.addHeader(MENDIX_API_KEY, apikey)
Expand Down Expand Up @@ -614,7 +614,7 @@ public boolean GetBackupList(int selectionCount, String environment ) {
OkHttpClient client = getClient(60);

Request request = new Request.Builder()
.url(MXBACKUPAPIV1+appid+"/environments/"+environment+"/snapshots")
.url(MXBACKUPAPIV1+"/"+appid+"/environments/"+environment+"/snapshots")
.get()
.addHeader(MENDIX_USER_NAME, apiuser)
.addHeader(MENDIX_API_KEY, apikey)
Expand Down Expand Up @@ -692,7 +692,7 @@ public void run()
OkHttpClient client = getClient(60);

Request request = new Request.Builder()
.url(MXBACKUPAPIV1+appid+"/environments/"+environment+"/snapshots/"+backupid)
.url(MXBACKUPAPIV1+"/"+appid+"/environments/"+environment+"/snapshots/"+backupid)
.get()
.addHeader(MENDIX_USER_NAME, apiuser)
.addHeader(MENDIX_API_KEY, apikey)
Expand Down Expand Up @@ -814,7 +814,7 @@ public void run()
MediaType JSON = MediaType.parse("application/json; charset=utf-8");
RequestBody requestBody = RequestBody.create(JSON, "{\"comment\":\"Backup tool " + apiuser + "\"}");
Request request = new Request.Builder()
.url(MXBACKUPAPIV1+appid+"/environments/"+environment+"/snapshots/")
.url(MXBACKUPAPIV1+"/"+appid+"/environments/"+environment+"/snapshots/")
.post(requestBody)
.addHeader(MENDIX_USER_NAME, apiuser)
.addHeader(MENDIX_API_KEY, apikey)
Expand Down Expand Up @@ -877,7 +877,7 @@ public void run()
OkHttpClient client = getClient(60);

Request request = new Request.Builder()
.url(MXBACKUPAPIV1+appid+"/environments/"+environment+"/snapshots/"+backupid)
.url(MXBACKUPAPIV1+"/"+appid+"/environments/"+environment+"/snapshots/"+backupid)
.get()
.addHeader(MENDIX_USER_NAME, apiuser)
.addHeader(MENDIX_API_KEY, apikey)
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/ccdg/app/SettingsDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public void widgetSelected(SelectionEvent e) {
Label lblCopyrightChrisDe = new Label(shlSettings, SWT.NONE);
lblCopyrightChrisDe.setToolTipText("");
lblCopyrightChrisDe.setBounds(18, 341, 221, 23);
lblCopyrightChrisDe.setText("V 3.2.1 - Chris de Gelder");
lblCopyrightChrisDe.setText("V 3.2.3 - Chris de Gelder");

lblPostgresDirectory = new Label(shlSettings, SWT.NONE);
lblPostgresDirectory.setText("Postgres directory (no bin)");
Expand Down
1 change: 1 addition & 0 deletions target/classes/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/META-INF/
/main/
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Generated by Maven Integration for Eclipse
#Sat Mar 06 18:46:22 CET 2021
#Tue Mar 23 12:48:23 CET 2021
m2e.projectLocation=C\:\\Users\\Chris de Gelder\\Documents\\GitHub\\BackupRestoreTool\\MendixBackupRestore
m2e.projectName=MendixBackupRestoreTool
groupId=com.ccdg.app
Expand Down

0 comments on commit bd7829b

Please sign in to comment.