Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions config/objects.assets/noutputhttp/css/nattrmon.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ text-align: center;

@font-face {
font-family: 'icon';
src: url('/f/fonts/icon.eot?axcame');
src: url('/f/fonts/icon.eot?axcame#iefix') format('embedded-opentype'),
url('/f/fonts/icon.ttf?axcame') format('truetype'),
url('/f/fonts/icon.woff?axcame') format('woff'),
url('/f/fonts/icon.svg?axcame#icon') format('svg');
src: url('../fonts/icon.eot?axcame');
src: url('../fonts/icon.eot?axcame#iefix') format('embedded-opentype'),
url('../fonts/icon.ttf?axcame') format('truetype'),
url('../fonts/icon.woff?axcame') format('woff'),
url('../fonts/icon.svg?axcame#icon') format('svg');
font-weight: normal;
font-style: normal;
}
Expand Down
37 changes: 31 additions & 6 deletions config/objects.assets/noutputhttp/history.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,38 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<script src="/js/jquery.js"></script>
<script>
(function() {
var currentPath = window.location.pathname || "/";
var baseDir = currentPath;

if (!baseDir.endsWith("/")) {
if (baseDir.lastIndexOf(".") > baseDir.lastIndexOf("/")) {
baseDir = baseDir.substring(0, baseDir.lastIndexOf("/") + 1);
} else {
baseDir += "/";
}
}

if (baseDir === "") baseDir = "/";
document.write('<base href="' + baseDir.replace(/"/g, '%22') + '">');

window.nattrmonBasePath = (baseDir.length > 1 && baseDir.endsWith("/")) ? baseDir.slice(0, -1) : baseDir;
window.withBasePath = function(path) {
if (window.nattrmonBasePath === "/") return path;
if (path.indexOf("/") !== 0) path = "/" + path;
return window.nattrmonBasePath + path;
};
})();
</script>
<script src="js/jquery.js"></script>
<script src="js/angular.min.js"></script>
<script src="js/angular-animate.min.js"></script>
<script src="js/nattrmon_js.js"></script>
<!-- Bootstrap core CSS -->
<link rel="icon" type="image/png" href="/f/favicon.png" />
<link rel="icon" type="image/png" href="favicon.png" />
<link href="css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="/f/css/font-awesome.min.css">
<link rel="stylesheet" href="css/font-awesome.min.css">
<link href="css/nattrmon.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="dashboard.css" rel="stylesheet">
Expand All @@ -26,18 +50,19 @@
var nattrmonApp = angular.module('nattrmonApp', ['ngAnimate']);
var extra = "";
if (getUrlParameter("ct") != "") extra = "?ct=" + getUrlParameter("ct");
var withBasePath = window.withBasePath;

nattrmonApp.service('MetaService', function($http) {
this.getMeta = function() {
return $http.get('/meta').then(function(result) {
return $http.get(withBasePath('/meta')).then(function(result) {
return result;
});
};
});

nattrmonApp.service('JsonService', function($http) {
this.getJson = function() {
return $http.get('/json' + extra).then(function(result) {
return $http.get(withBasePath('/json') + extra).then(function(result) {
return result;
});
};
Expand Down Expand Up @@ -71,7 +96,7 @@
if (typeof aAttr === 'undefined') aAttr = $scope.selectAttr;
if (typeof numberOfEvents === 'undefined') numberOfEvents = $scope.selectEvents;
$scope.loading = true;
$http.get('/json?op=histevent&attr=' + aAttr + '&events=' + numberOfEvents).then(function(result) {
$http.get(withBasePath('/json') + '?op=histevent&attr=' + aAttr + '&events=' + numberOfEvents).then(function(result) {
$scope.history = [];
for(i in result.data.history) {
$scope.history.push({
Expand Down
43 changes: 34 additions & 9 deletions config/objects.assets/noutputhttp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,38 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<script src="/js/jquery.js"></script>
<script>
(function() {
var currentPath = window.location.pathname || "/";
var baseDir = currentPath;

if (!baseDir.endsWith("/")) {
if (baseDir.lastIndexOf(".") > baseDir.lastIndexOf("/")) {
baseDir = baseDir.substring(0, baseDir.lastIndexOf("/") + 1);
} else {
baseDir += "/";
}
}

if (baseDir === "") baseDir = "/";
document.write('<base href="' + baseDir.replace(/"/g, '%22') + '">');

window.nattrmonBasePath = (baseDir.length > 1 && baseDir.endsWith("/")) ? baseDir.slice(0, -1) : baseDir;
window.withBasePath = function(path) {
if (window.nattrmonBasePath === "/") return path;
if (path.indexOf("/") !== 0) path = "/" + path;
return window.nattrmonBasePath + path;
};
})();
</script>
<script src="js/jquery.js"></script>
<script src="js/angular.min.js"></script>
<script src="js/angular-animate.min.js"></script>
<script src="js/nattrmon_js.js"></script>
<link rel="icon" type="image/png" href="/f/favicon.png" />
<link rel="icon" type="image/png" href="favicon.png" />
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="/f/css/font-awesome.min.css">
<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Custom styles for this template -->
<link href="dashboard.css" rel="stylesheet">
<link href="css/nattrmon.css" rel="stylesheet">
Expand All @@ -26,18 +50,19 @@
var nattrmonApp = angular.module('nattrmonApp', ['ngAnimate']);
var extra = "?";
if (getUrlParameter("ct") != "") extra = "?ct=" + getUrlParameter("ct");
var withBasePath = window.withBasePath;

nattrmonApp.service('MetaService', function($http) {
this.getMeta = function() {
return $http.get('/meta').then(function(result) {
return $http.get(withBasePath('/meta')).then(function(result) {
return result;
});
};
});

nattrmonApp.service('JsonService', function($http) {
this.getJson = function() {
return $http.get('/json' + extra).then(function(result) {
return $http.get(withBasePath('/json') + extra).then(function(result) {
return result;
});
};
Expand Down Expand Up @@ -181,16 +206,16 @@
<br>
<ul class="nav nav-sidebar">
<li>
<a href="#High">High (#{{warnsHigh}})</a>
<a href="index.html{{extra}}#High">High (#{{warnsHigh}})</a>
</li>
<li>
<a href="#Medium">Medium (#{{warnsMedium}})</a>
<a href="index.html{{extra}}#Medium">Medium (#{{warnsMedium}})</a>
</li>
<li>
<a href="#Low">Low (#{{warnsLow}})</a>
<a href="index.html{{extra}}#Low">Low (#{{warnsLow}})</a>
</li>
<li>
<a href="#Info">Info (#{{warnsInfo}})</a>
<a href="index.html{{extra}}#Info">Info (#{{warnsInfo}})</a>
</li>
</ul>
</div>
Expand Down
2 changes: 2 additions & 0 deletions config/objects.assets/noutputhttp/js/jquery.js

Large diffs are not rendered by default.

34 changes: 29 additions & 5 deletions config/objects.assets/noutputhttp/logout.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<script src="/js/jquery.js"></script>
<script>
(function() {
var currentPath = window.location.pathname || "/";
var baseDir = currentPath;

if (!baseDir.endsWith("/")) {
if (baseDir.lastIndexOf(".") > baseDir.lastIndexOf("/")) {
baseDir = baseDir.substring(0, baseDir.lastIndexOf("/") + 1);
} else {
baseDir += "/";
}
}

if (baseDir === "") baseDir = "/";
document.write('<base href="' + baseDir.replace(/"/g, '%22') + '">');

window.nattrmonBasePath = (baseDir.length > 1 && baseDir.endsWith("/")) ? baseDir.slice(0, -1) : baseDir;
window.withBasePath = function(path) {
if (window.nattrmonBasePath === "/") return path;
if (path.indexOf("/") !== 0) path = "/" + path;
return window.nattrmonBasePath + path;
};
})();
</script>
<script src="js/jquery.js"></script>
</head>
<body>
<script>
Expand All @@ -15,19 +39,19 @@
if (isIE) {
// Logoff Internet Explorer
document.execCommand("ClearAuthenticationCache");
window.location = "/logout.html";
window.location = withBasePath('/logout.html');
} else {
$.ajax({
username : '-u',
password : '-p',
url : '/',
url : withBasePath('/'),
type : 'GET',
beforeSend: xhr => {
xhr.setRequestHeader('Authorization', 'Basic AAAAAAAAAAAAAAAAAAA=');
},
error : err => {
window.location = window.location.protocol + '//-u:-p@' + window.location.host + "/logout.html";
window.location = window.location.protocol + '//' + window.location.host + "/logout.html";
window.location = window.location.protocol + '//-u:-p@' + window.location.host + withBasePath('/logout.html');
window.location = window.location.protocol + '//' + window.location.host + withBasePath('/logout.html');
}
});
}
Expand Down
39 changes: 32 additions & 7 deletions config/objects.assets/noutputhttp/now.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,38 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<script src="/js/jquery.js"></script>
<script>
(function() {
var currentPath = window.location.pathname || "/";
var baseDir = currentPath;

if (!baseDir.endsWith("/")) {
if (baseDir.lastIndexOf(".") > baseDir.lastIndexOf("/")) {
baseDir = baseDir.substring(0, baseDir.lastIndexOf("/") + 1);
} else {
baseDir += "/";
}
}

if (baseDir === "") baseDir = "/";
document.write('<base href="' + baseDir.replace(/"/g, '%22') + '">');

window.nattrmonBasePath = (baseDir.length > 1 && baseDir.endsWith("/")) ? baseDir.slice(0, -1) : baseDir;
window.withBasePath = function(path) {
if (window.nattrmonBasePath === "/") return path;
if (path.indexOf("/") !== 0) path = "/" + path;
return window.nattrmonBasePath + path;
};
})();
</script>
<script src="js/jquery.js"></script>
<script src="js/angular.min.js"></script>
<script src="js/angular-animate.min.js"></script>
<script src="js/nattrmon_js.js"></script>
<link rel="icon" type="image/png" href="/f/favicon.png" />
<link rel="icon" type="image/png" href="favicon.png" />
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="/f/css/font-awesome.min.css">
<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Custom styles for this template -->
<link href="dashboard.css" rel="stylesheet">
<link href="css/nattrmon.css" rel="stylesheet">
Expand All @@ -26,18 +50,19 @@
var nattrmonApp = angular.module('nattrmonApp', ['ngAnimate']);
var extra = "?";
if (getUrlParameter("ct") != "") extra = "?ct=" + getUrlParameter("ct");
var withBasePath = window.withBasePath;

nattrmonApp.service('MetaService', function($http) {
this.getMeta = function() {
return $http.get('/meta').then(function(result) {
return $http.get(withBasePath('/meta')).then(function(result) {
return result;
});
};
});

nattrmonApp.service('JsonService', function($http) {
this.getJson = function() {
return $http.get('/json' + extra).then(function(result) {
return $http.get(withBasePath('/json') + extra).then(function(result) {
return result;
});
};
Expand Down Expand Up @@ -175,7 +200,7 @@
<br>
<ul class="nav nav-sidebar">
<li ng-repeat="c in ctgs | orderBy: 'name'">
<a href="#{{c.name}}">{{c.name}}</a>
<a href="now.html{{extra}}#{{c.name}}">{{c.name}}</a>
</li>
</ul>
</div>
Expand Down Expand Up @@ -203,7 +228,7 @@ <h3 class="sub-header" id="{{c.name}}">{{c.name}}</h3>
</td>
<td>
<span ng-bind-html="render(a.val, a.type)"></span>
<span ng-show="showme" class="animate-show"><br><small><i>last value: <span ng-bind-html="render(a.lastval, a.type)"></span> @<span ng-bind-html="render(a.lastmoddate, 'date')"></span> (<a href="/history.html{{extra}}&attr={{a.name}}">see more</a>)</i></small></span>
<span ng-show="showme" class="animate-show"><br><small><i>last value: <span ng-bind-html="render(a.lastval, a.type)"></span> @<span ng-bind-html="render(a.lastmoddate, 'date')"></span> (<a href="history.html{{extra}}&attr={{a.name}}">see more</a>)</i></small></span>
</td>
<td align="right" style="white-space: nowrap; width: 1%">
<small>Last modify: <span ng-bind-html="render(a.moddate, 'date')"></span><span ng-show="showme" class="animate-show"><br>Last check: <span ng-bind-html="render(a.lastcheck, 'date')"></span></small>
Expand Down
Loading
Loading