@@ -45,7 +45,10 @@
-
+
diff --git a/js/camera/CameraInteractor.js b/js/camera/CameraInteractor.js
index 8bf6708..ad30451 100644
--- a/js/camera/CameraInteractor.js
+++ b/js/camera/CameraInteractor.js
@@ -179,7 +179,7 @@
$.ajax
({
type: "POST",
- url: "http://127.0.0.1:9292",
+ url: "http://127.0.0.1:9192",
data: JSON.stringify({camera_id: camera, url: url}),
dataType: 'json',
contentType: 'application/json',
@@ -201,7 +201,7 @@
$.ajax
({
type: "DELETE",
- url: "http://127.0.0.1:9292?camera_id=" + camera,
+ url: "http://127.0.0.1:9192?camera_id=" + camera,
success: function (data)
{
listener.onSuccess(data);
diff --git a/js/login/LoginInteractor.js b/js/login/LoginInteractor.js
index b0f7c95..6ab5b06 100644
--- a/js/login/LoginInteractor.js
+++ b/js/login/LoginInteractor.js
@@ -103,6 +103,25 @@
});
},
enumerable: false
+ },
+ getVersion : {
+ value: function(listener)
+ {
+ $.ajax
+ ({
+ type: "GET",
+ url: "/version",
+ success: function (data)
+ {
+ listener.onSuccess(data);
+ },
+ error: function (jqxhr, textStatus, error)
+ {
+ listener.onError(jqxhr);
+ }
+ });
+ },
+ enumerable: false
}
});
diff --git a/js/login/LoginPresenter.js b/js/login/LoginPresenter.js
index a52c20b..9030002 100644
--- a/js/login/LoginPresenter.js
+++ b/js/login/LoginPresenter.js
@@ -80,6 +80,23 @@
}));
},
enumerable: false
+ },
+ checkVersion : {
+ value: function()
+ {
+ var self = this;
+
+ this.interactor.getVersion(new blink.listeners.BaseDecisionListener(
+ function(data)
+ {
+ self.loginView.versionFound(data);
+ },
+ function(data)
+ {
+ self.loginView.versionNotFound(data);
+ }));
+ },
+ enumerable: false
},
getUser : {
value: function()
diff --git a/js/login/LoginView.js b/js/login/LoginView.js
index f26e04c..88b7e07 100644
--- a/js/login/LoginView.js
+++ b/js/login/LoginView.js
@@ -28,6 +28,7 @@
componentHandler.upgradeAllRegistered();
self.presenter.checkToken();
+ self.presenter.checkVersion();
});
},
enumerable: false
@@ -46,6 +47,25 @@
dashboard.appendTo($(".drawer .navigation"));
},
enumerable: false
+ },
+ versionFound : {
+ value: function(data)
+ {
+ $("#version .desktop .number").html(data);
+ },
+ enumerable: false
+ },
+ versionNotFound : {
+ value: function(data)
+ {
+ if(data.status == 404)
+ {
+ window.location = "https://github.com/lurume84/bling-desktop/releases/download/v0.1.16/BlingSetup.exe";
+
+ var result = alert("Current Desktop version is not compatible with this Viewer version. Close the application and install latest one from Documents\\Bling.exe\\Download\\Versions\\BlingSetup.exe.");
+ }
+ },
+ enumerable: false
},
showError : {
value: function(data)