Skip to content

Commit

Permalink
commit conflicts resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
pliablepixels committed Sep 25, 2017
2 parents 9006a2d + 5e75a4a commit 65fc261
Show file tree
Hide file tree
Showing 17 changed files with 803 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .brackets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"mitchellsimoens.file-tree-exclude.excludeList": [
".git(?!ignore)",
"dist",
"bower_components",
"node_modules"
]
}
2 changes: 2 additions & 0 deletions .github_changelog_generator
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include-labels = zoneminder,breaking,bug,enhancement
exclude-labels = not supported/no plans
1 change: 1 addition & 0 deletions .jscodehints
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "excluded-directories" : ["merges", "platforms", "www/lib", "node_modules"] }
91 changes: 91 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
// JSHint Default Configuration File (as on JSHint website)
// See http://jshint.com/docs/ for more details

"maxerr" : 50, // {int} Maximum error before stopping

// Enforcing
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
"camelcase" : false, // true: Identifiers must be in camelCase
"curly" : false, // true: Require {} for every new block or scope
"eqeqeq" : false, // true: Require triple equals (===) for comparison
"forin" : false, // true: Require filtering for..in loops with obj.hasOwnProperty()
"freeze" : true, // true: prohibits overwriting prototypes of native objects such as Array, Date etc.
"immed" : false, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());`
"latedef" : false, // true: Require variables/functions to be defined before being used
"newcap" : false, // true: Require capitalization of all constructor functions e.g. `new F()`
"noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee`
"noempty" : false, // true: Prohibit use of empty blocks
"nonbsp" : true, // true: Prohibit "non-breaking whitespace" characters.
"nonew" : false, // true: Prohibit use of constructors for side-effects (without assignment)
"plusplus" : false, // true: Prohibit use of `++` and `--`
"quotmark" : false, // Quotation mark consistency:
// false : do nothing (default)
// true : ensure whatever is used is consistent
// "single" : require single quotes
// "double" : require double quotes
"undef" : true, // true: Require all non-global variables to be declared (prevents global leaks)
"unused" : false, // Unused variables:
// true : all variables, last function parameter
// "vars" : all variables only
// "strict" : all variables, all function parameters
"strict" : false, // true: Requires all functions run in ES5 Strict Mode
"maxparams" : false, // {int} Max number of formal params allowed per function
"maxdepth" : false, // {int} Max depth of nested blocks (within functions)
"maxstatements" : false, // {int} Max number statements per function
"maxcomplexity" : false, // {int} Max cyclomatic complexity per function
"maxlen" : false, // {int} Max number of characters per line
"varstmt" : false, // true: Disallow any var statements. Only `let` and `const` are allowed.

// Relaxing
"asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons)
"boss" : false, // true: Tolerate assignments where comparisons would be expected
"debug" : false, // true: Allow debugger statements e.g. browser breakpoints.
"eqnull" : false, // true: Tolerate use of `== null`
"esversion" : 5, // {int} Specify the ECMAScript version to which the code must adhere.
"moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features)
// (ex: `for each`, multiple try/catch, function expression…)
"evil" : false, // true: Tolerate use of `eval` and `new Function()`
"expr" : false, // true: Tolerate `ExpressionStatement` as Programs
"funcscope" : false, // true: Tolerate defining variables inside control statements
"globalstrict" : false, // true: Allow global "use strict" (also enables 'strict')
"iterator" : false, // true: Tolerate using the `__iterator__` property
"lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block
"laxbreak" : false, // true: Tolerate possibly unsafe line breakings
"laxcomma" : false, // true: Tolerate comma-first style coding
"loopfunc" : false, // true: Tolerate functions being defined in loops
"multistr" : false, // true: Tolerate multi-line strings
"noyield" : false, // true: Tolerate generator functions with no yield statement in them.
"notypeof" : false, // true: Tolerate invalid typeof operator values
"proto" : false, // true: Tolerate using the `__proto__` property
"scripturl" : false, // true: Tolerate script-targeted URLs
"shadow" : false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;`
"sub" : false, // true: Tolerate using `[]` notation when it can still be expressed in dot notation
"supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;`
"validthis" : false, // true: Tolerate using this in a non-constructor function

// Environments
"browser" : true, // Web Browser (window, document, etc)
"browserify" : false, // Browserify (node.js code in the browser)
"couch" : false, // CouchDB
"devel" : true, // Development/debugging (alert, confirm, etc)
"dojo" : false, // Dojo Toolkit
"jasmine" : false, // Jasmine
"jquery" : false, // jQuery
"mocha" : true, // Mocha
"mootools" : false, // MooTools
"node" : false, // Node.js
"nonstandard" : false, // Widely adopted globals (escape, unescape, etc)
"phantom" : false, // PhantomJS
"prototypejs" : false, // Prototype and Scriptaculous
"qunit" : false, // QUnit
"rhino" : false, // Rhino
"shelljs" : false, // ShellJS
"typed" : false, // Globals for typed array constructions
"worker" : false, // Web Workers
"wsh" : false, // Windows Scripting Host
"yui" : false, // Yahoo User Interface

// Custom Globals
"globals" : {} // additional predefined global variables
}
8 changes: 7 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
{
"name": "HelloIonic",
"name": "zmNinja",
"private": "true",
"devDependencies": {
"ionic": "driftyco/ionic-bower#1.3.3"
},
"dependencies": {
"ionic-content-banner": "https://github.com/pliablepixels/ionic-content-banner",
"localforage": "~1.4.2",
"localforage-cordovasqlitedriver": "localForage-cordovaSQLiteDriver#~1.4.1",
"ng-mfb": "~0.4.0"
}
}
64 changes: 64 additions & 0 deletions docs/SSL-Configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
##SSL Configuration notes

###Deprecated: Newer versions of zmNinja automatically handle unsigned certs. Please ignore the rest of this document

If your Zoneminder instance has SSL configured and you need zmNinja to connect to ZM over SSL you need to:

1) Make sure you generate the certificates correctly

2) Import the certificate into iOS and Android


###Certificate generation

####Self-signed certificates

If you are using self signed certificated, you should make sure the "common name" matches the hostname (or public IP)
of the server you are installing ZM in. If not, zmNinja's SSL handshake will fail.

If you have used 'make-ssl-cert' or a similar tool that automatically generates the cert for you, its very likely
you have certificate that uses the 'unix hostname' of your server. That will not work.

Assuming you are usin apache and have SSL enabled, here is how to regenerate the certs

This will create a self-signed certificate/key pair and store it in /etc/apache2/ssl (you may have to create that directory, or store it elsewhere)

```
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/zoneminder.key -out /etc/apache2/ssl/zoneminder.crt
```

Next up, edit your apache ssl config (example /etc/apache2/sites-available/default-ssl.conf)
And add/modify the following lines:

```
SSLCertificateFile /etc/apache2/ssl/zoneminder.crt
SSLCertificateKeyFile /etc/apache2/ssl/zoneminder.key
```

restart apache

```
sudo service apache2 restart
```

#####Install certificates (.cer) file in yout phone
Then, you need to install zoneminder.crt in your mobile devices so that zmNinja does not reject the certificate as it is self signed.
The easiest way to do that is simply email it to yourself and open your email in the phone and install the attachment. Works for both
iOS and Android. Make sure you install it and go through the prompts
######Note: Just visiting your https site on mobile safari and "accepting the certificate" DOES NOT mean the certificate is installed in your phone. It simply sets up an exclusion on your browser that does not work for the UI webview inside your app

For example, in iOS, when you double tap on the certificate, you get a screen like this - you need to tap on Install on the top right

![]
(http://www.pbase.com/arjunrc/image/160547522/medium.jpg "SSL Cert")

On Android, you will get a dialog box prompting you to install the certificate

Once you are done with these steps, zmNinja should be able to connect to ZM via SSL. Make sure you select SSL in the settings

####CA signed certificates
If you purchase a signed certificate, or set up your own root CA zmNinja should just work over SSL.

You should not have to go through the process of installing certificates in your phone.

I haven't tried it so far.
8 changes: 8 additions & 0 deletions maketag.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
read -p "Please generate CHANGELOG and commit it BEFORE you tag. Press a key when ready..."
orig=$1
VER="${orig/v//}"
echo "Creating tag:v$VER"
read -p "Press any key to create the tag or Ctrl-C to break..." -n1
git tag -fa v$VER -m"v$VER"
git push -f --tags
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added sample_images/IMG_0757.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sample_images/IMG_0758.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sample_images/IMG_0759.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sample_images/IMG_0760.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sample_images/IMG_0761.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sample_images/IMG_0762.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sample_images/zmn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 65fc261

Please sign in to comment.