Skip to content
This repository was archived by the owner on Jun 18, 2022. It is now read-only.

Commit

Permalink
Open Source Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pheinrichs authored and Paul Heinrichs committed Jan 10, 2018
0 parents commit ea6f5b6
Show file tree
Hide file tree
Showing 249 changed files with 5,664 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
indent_style = space
indent_size = 2

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
35 changes: 35 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Specifies intentionally untracked files to ignore when using Git
# http://git-scm.com/docs/gitignore

*~
*.sw[mnpcod]
*.log
*.tmp
*.tmp.*
log.txt
*.sublime-project
*.sublime-workspace
.vscode/
npm-debug.log*

.idea/
.sass-cache/
.tmp/
.versions/
.sourcemaps/
coverage/
dist/
node_modules/
tmp/
temp/
hooks/
platforms/
plugins/
plugins/android.json
plugins/ios.json
www/
$RECYCLE.BIN/

.DS_Store
Thumbs.db
UserInterfaceState.xcuserstate
1 change: 1 addition & 0 deletions .io-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"app_id":"1c898e10"}
22 changes: 22 additions & 0 deletions PrivacyPolicy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## myLibreNMS Privacy Statment

Privacy Policy

Last Modified: May 03, 2017

myLibreNMS helps you monitor your servers and networking devices and includes support for many devices including Cisco, Linux, FreeBSD, Juniper, Brocade, Foundry, HP and many more. This application accesses your LibreNMS instance and displays it on your mobile device.

myLibreNMS can connect to your LibreNMS instance over HTTP or HTTPS, but is highly recommended you use HTTPS

### Information I Collect

None, I really don't care.

### Services I use
* Camera

`myLibreNMS requests access to your Camera for the sole purpose of scanning the QR-Code generated by your Librenms instance so you don't have to type in a 1000 string for your api key. Use it, don't use. I don't care.
`
### Permissions

myLibreNMS is based off the open source project `LibreNMS` with permissions granted by the `LibreNMS` team to use any assets from the original project for `myLibreNMS`
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# myLibreNMS
A support repository for the [myLibreNMS mobile application](https://appsto.re/ca/wY_aib.i)

For any features / bugs or requests please [submit an issue](https://github.com/pheinrichs/myLibreNMS/issues)

TODO

- implement new storage method
107 changes: 107 additions & 0 deletions config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.paulheinrichs.mylibrenms" version="1.2.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>myLibreNMS</name>
<description>A Librenms utility tool</description>
<author email="[email protected]" />
<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
<splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
<splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
<splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
<splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
<splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
<splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
<splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
<splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
<splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<icon height="57" src="resources/ios/icon/icon.png" width="57" />
<icon height="114" src="resources/ios/icon/[email protected]" width="114" />
<icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
<icon height="80" src="resources/ios/icon/[email protected]" width="80" />
<icon height="120" src="resources/ios/icon/[email protected]" width="120" />
<icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
<icon height="100" src="resources/ios/icon/[email protected]" width="100" />
<icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
<icon height="120" src="resources/ios/icon/[email protected]" width="120" />
<icon height="180" src="resources/ios/icon/[email protected]" width="180" />
<icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
<icon height="144" src="resources/ios/icon/[email protected]" width="144" />
<icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
<icon height="152" src="resources/ios/icon/[email protected]" width="152" />
<icon height="167" src="resources/ios/icon/[email protected]" width="167" />
<icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
<icon height="58" src="resources/ios/icon/[email protected]" width="58" />
<icon height="87" src="resources/ios/icon/[email protected]" width="87" />
<splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
<splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
<splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
<splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
<splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
<splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
<splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
<splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
<splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
<splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
<splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
<icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
<splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
</platform>
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="android-minSdkVersion" value="16" />
<preference name="BackupWebStorage" value="none" />
<preference name="SplashScreenDelay" value="0" />
<preference name="FadeSplashScreen" value="false" />
<preference name="FadeSplashScreenDuration" value="0" />
<preference name="SplashScreenBackgroundColor" value="0xFFFFFFFF" />
<preference name="SplashScreen" value="screen" />
<feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar" />
</feature>
<icon src="resources/android/icon/drawable-xhdpi-icon.png" />
<plugin name="cordova-plugin-console" spec="~1.0.4" />
<plugin name="cordova-plugin-device" spec="~1.1.3" />
<plugin name="cordova-plugin-screen-orientation" spec="~1.4.2" />
<plugin name="phonegap-plugin-barcodescanner" spec="~6.0.5">
<variable name="CAMERA_USAGE_DESCRIPTION" value="Scan QR-Codes" />
</plugin>
<plugin name="cordova-plugin-whitelist" spec="~1.3.0" />
<plugin name="cordova-plugin-splashscreen" spec="~4.0.0" />
<plugin name="cordova-plugin-statusbar" spec="~2.2.0" />
<plugin name="ionic-plugin-keyboard" spec="~2.2.1" />
<plugin name="cordova-sqlite-storage" spec="~2.0.3" />
<plugin name="cordova-plugin-inappbrowser" spec="~1.7.0" />
<engine name="browser" spec="~4.1.0" />
<plugin name="cordova-plugin-ionic-webview" spec="^1.1.16" />
<allow-navigation href="http://localhost:8080/*" />
<feature name="CDVWKWebViewEngine">
<param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
<engine name="ios" spec="~4.5.4" />
<engine name="android" spec="~6.2.3" />
<preference name="SplashShowOnlyFirstTime" value="false" />
</widget>
1 change: 1 addition & 0 deletions contributors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Paul Heinrichs - [email protected]
8 changes: 8 additions & 0 deletions ionic.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "MyLibreNMS",
"app_id": "",
"integrations": {
"cordova": {}
},
"type": "ionic-angular"
}
102 changes: 102 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"name": "MyLibreNMS",
"author": "Paul Heinrichs",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"@angular/common": "5.0.0",
"@angular/compiler": "5.0.0",
"@angular/compiler-cli": "5.0.0",
"@angular/core": "5.0.0",
"@angular/forms": "5.0.0",
"@angular/http": "5.0.0",
"@angular/platform-browser": "5.0.0",
"@angular/platform-browser-dynamic": "5.0.0",
"@ionic-native/barcode-scanner": "^3.12.1",
"@ionic-native/core": "3.10.2",
"@ionic-native/local-notifications": "^3.12.1",
"@ionic-native/screen-orientation": "^3.12.1",
"@ionic-native/splash-screen": "3.10.2",
"@ionic-native/status-bar": "3.10.2",
"@ionic/storage": "2.1.3",
"@ngx-translate/core": "^8.0.0",
"@ngx-translate/http-loader": "^2.0.0",
"cordova-android": "^6.2.3",
"cordova-browser": "^4.1.0",
"cordova-ios": "^4.5.4",
"cordova-plugin-compat": "^1.2.0",
"cordova-plugin-console": "^1.0.7",
"cordova-plugin-device": "^1.1.6",
"cordova-plugin-inappbrowser": "^1.7.1",
"cordova-plugin-ionic-webview": "^1.1.16",
"cordova-plugin-screen-orientation": "^1.4.3",
"cordova-plugin-splashscreen": "^4.0.3",
"cordova-plugin-statusbar": "^2.2.3",
"cordova-plugin-whitelist": "^1.3.2",
"cordova-sqlite-storage": "^2.0.4",
"ionic-angular": "^3.9.2",
"ionic-img-viewer": "^2.9.0",
"ionic-plugin-keyboard": "^2.2.1",
"ionicons": "3.0.0",
"phonegap-plugin-barcodescanner": "^6.0.8",
"rxjs": "5.5.2",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.18"
},
"devDependencies": {
"@ionic/app-scripts": "3.1.7",
"ionic": "3.19.0",
"typescript": "2.4.2"
},
"description": "MyLibreNMS: A LibreNMS utility app",
"cordovaPlugins": [
"cordova-plugin-device",
"cordova-plugin-console",
"cordova-plugin-whitelist",
"cordova-plugin-splashscreen",
"cordova-plugin-statusbar",
"ionic-plugin-keyboard",
"cordova-sqlite-storage",
"cordova-plugin-inappbrowser"
],
"cordovaPlatforms": [
{
"platform": "android",
"version": "",
"locator": "android"
},
{
"platform": "ios",
"version": "",
"locator": "ios"
}
],
"cordova": {
"platforms": [
"android",
"browser",
"ios"
],
"plugins": {
"cordova-plugin-console": {},
"cordova-plugin-device": {},
"cordova-plugin-screen-orientation": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-whitelist": {},
"ionic-plugin-keyboard": {},
"phonegap-plugin-barcodescanner": {
"CAMERA_USAGE_DESCRIPTION": "Scan QR-Codes"
},
"cordova-sqlite-storage": {},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-ionic-webview": {}
}
}
}
56 changes: 56 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# myLibreNMS

myLibreNMS is an open source mobile application on both iOS and Android. This application was created in the [ionic framework](https://ionicframework.com)

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

### Prerequisites
* [LibreNMS Server](http://librenms.org)
* [Node](https://nodejs.org/en/)
* [Ionic](https://ionicframework.com/)
* Cordova

---
You will need to enable cors on your local librenms install for local development.
Visit the [LibreNMS](https://github.com/librenms/librenms/blob/master/doc/Support/Configuration.md#api-settings) Repository for more info
---

### Installing

```
npm install -g ionic cordova
git clone url
npm install
ionic serve
```

Visit localhost:8100 and boom welcome!

## Built With

* [Ionic](https://ionicframework.com)

## Contributing

I am gladly accepting pull requests.

If you would like to contribute it would be easiest to familiarize yourself with [ionic](https://ionicframework.com/docs/)

## Translating
If you would like to help translate myLibreNMS, please submit a pull request to do so.

Create a file under **src/assets/i18n/*.json** using en.json as a guide

## Authors

See the list of [contributors](contributors.md) who participated in this project.


Sponsered by WaveDirect Telecommunications

## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

Binary file added res/drawable-land-hdpi/screen.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 res/drawable-land-ldpi/screen.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 res/drawable-land-mdpi/screen.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 res/drawable-land-xhdpi/screen.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 res/drawable-land-xxhdpi/screen.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 res/drawable-land-xxxhdpi/screen.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 res/drawable-port-hdpi/screen.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 res/drawable-port-ldpi/screen.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 res/drawable-port-mdpi/screen.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 res/drawable-port-xhdpi/screen.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 res/drawable-port-xxhdpi/screen.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 res/drawable-port-xxxhdpi/screen.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 res/mipmap-hdpi/icon.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 res/mipmap-ldpi/icon.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 res/mipmap-mdpi/icon.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 res/mipmap-xhdpi/icon.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 res/mipmap-xxhdpi/icon.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 res/mipmap-xxxhdpi/icon.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 resources/android/icon/drawable-hdpi-icon.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 resources/android/icon/drawable-ldpi-icon.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 resources/android/icon/drawable-mdpi-icon.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 resources/android/icon/drawable-xhdpi-icon.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 resources/android/icon/drawable-xxhdpi-icon.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 resources/android/icon/drawable-xxxhdpi-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 resources/icon.png
1 change: 1 addition & 0 deletions resources/icon.png.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d34a743d06c58fc00a198620e3fca7f0
Binary file added resources/ios/icon/icon-1024.png
Binary file added resources/ios/icon/icon-40.png
Binary file added resources/ios/icon/[email protected]
Binary file added resources/ios/icon/[email protected]
Binary file added resources/ios/icon/icon-50.png
Binary file added resources/ios/icon/[email protected]
Binary file added resources/ios/icon/icon-60.png
Binary file added resources/ios/icon/[email protected]
Binary file added resources/ios/icon/[email protected]
Binary file added resources/ios/icon/icon-72.png
Binary file added resources/ios/icon/[email protected]
Binary file added resources/ios/icon/icon-76.png
Binary file added resources/ios/icon/[email protected]
Binary file added resources/ios/icon/[email protected]
Binary file added resources/ios/icon/icon-small.png
Binary file added resources/ios/icon/[email protected]
Binary file added resources/ios/icon/[email protected]
Binary file added resources/ios/icon/icon.png
Binary file added resources/ios/icon/[email protected]
Binary file added resources/ios/splash/Default-568h@2x~iphone.png
Binary file added resources/ios/splash/Default-667h.png
Binary file added resources/ios/splash/Default-736h.png
Binary file added resources/ios/splash/Default-Landscape-736h.png
Binary file added resources/ios/splash/Default-Landscape~ipad.png
Binary file added resources/ios/splash/Default-Portrait@2x~ipad.png
Binary file added resources/ios/splash/Default-Portrait~ipad.png
Binary file added resources/ios/splash/Default@2x~iphone.png
Binary file added resources/ios/splash/Default~iphone.png
Binary file added resources/splash.png
1 change: 1 addition & 0 deletions resources/splash.png.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2717f3013be73074cf0531c6c9af72c5
21 changes: 21 additions & 0 deletions src/CustomValidators.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Injectable } from '@angular/core';
import { Storage } from '@ionic/storage';
import { AbstractControl } from '@angular/forms';

@Injectable()
export class CustomValidation {
constructor(private storage: Storage) { }

nameExists(control: AbstractControl) {
return new Promise((resolve) => {
this.storage.get('servers').then((servers) => {
servers.forEach(server => {
if (server.name == control.value) {
resolve({ 'nameTaken': true })
};
})
resolve(null);
});
});
}
}
Loading

0 comments on commit ea6f5b6

Please sign in to comment.