Skip to content

Commit

Permalink
#92 - let user have full control on cgi-bin path spec to cover all cases
Browse files Browse the repository at this point in the history
  • Loading branch information
pliablepixels committed Nov 17, 2015
1 parent 51a59d1 commit ee660e8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
8 changes: 5 additions & 3 deletions www/js/LoginCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,11 @@ angular.module('zmApp.controllers').controller('zmApp.LoginCtrl', ['$scope', '$r

}
// strip cgi-bin if it is there but only at the end
if ($scope.loginData.streamingurl.slice(-7).toLowerCase() == 'cgi-bin') {
// Nov 17 Don't mess with this path. centos uses zm-cgi-bin of all things

/*if ($scope.loginData.streamingurl.slice(-7).toLowerCase() == 'cgi-bin') {
$scope.loginData.streamingurl = $scope.loginData.streamingurl.slice(0, -7);
}
}*/

// check for protocol and if not put it in

Expand Down Expand Up @@ -378,7 +380,7 @@ angular.module('zmApp.controllers').controller('zmApp.LoginCtrl', ['$scope', '$r
ZMDataModel.getPathZms()
.then(function (data) {
var ld = ZMDataModel.getLogin();
ZMDataModel.zmLog("PATH_ZMS:" + data + " ,Path ZmNinja will use:" + ld.streamingurl + "/cgi-bin/nph-zms");
ZMDataModel.zmLog("PATH_ZMS:" + data + ", Path ZmNinja will use:" + ld.streamingurl + "/nph-zms");
ZMDataModel.zmLog("If live streams are not working, make sure you check these values");


Expand Down
6 changes: 5 additions & 1 deletion www/js/MontageCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', '
var hiddenOrder = []; // 1 = hide, 0 = don't hide

var tempMonitors = message;
console.log ("TEMP MONITORS IS " + JSON.stringify(tempMonitors));
var tempResponse = ZMDataModel.applyMontageMonitorPrefs(message, 0);
$scope.monitors = tempResponse[0];
montageOrder = tempResponse[1];
Expand Down Expand Up @@ -152,7 +153,10 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', '


var ld = ZMDataModel.getLogin();
ZMDataModel.getAuthKey()

console.log ("MONITORS " + JSON.stringify($scope.monitors));
$rootScope.validMonitorId = $scope.monitors[0].Monitor.Id;
ZMDataModel.getAuthKey($rootScope.validMonitorId)
.then(function (success) {
$ionicLoading.hide();
console.log(success);
Expand Down
4 changes: 2 additions & 2 deletions www/templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@
</label>

<label class="item item-input item-floating-label" >
<span class="input-label">base path to cgi-bin</span>
<span class="input-label">path to cgi-bin</span>
<input autocapitalize="none" autocomplete="off"
autocorrect="off" type="text"
placeholder="base path to cgi-bin"
placeholder="eg. server.com/zm/cgi-bin"
ng-model="loginData.streamingurl">
</label>

Expand Down
2 changes: 1 addition & 1 deletion www/templates/monitors-modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<div ng-if="!animationInProgress">
<img imageonload="finishedLoadingImage()"
image-spinner-loader="lines"
image-spinner-src="{{LoginData.streamingurl}}/cgi-bin/nph-zms?mode=single&monitor={{monitorId}}{{$root.authSession}}&rand={{$root.modalRand}}" ng-class="{'zm-image-fit':imageFit==true, 'zm-image-crop':imageFit==false}"
image-spinner-src="{{LoginData.streamingurl}}/nph-zms?mode=single&monitor={{monitorId}}{{$root.authSession}}&rand={{$root.modalRand}}" ng-class="{'zm-image-fit':imageFit==true, 'zm-image-crop':imageFit==false}"
on-swipe-left="onSwipe(monitorId,1)"
on-swipe-right="onSwipe(monitorId,-1)" />

Expand Down

0 comments on commit ee660e8

Please sign in to comment.