3
Fork 0

Added project

This commit is contained in:
Willem Cazander 2022-11-13 01:46:38 +01:00
parent fe9aa14dfd
commit 2d73cc8845
186 changed files with 21174 additions and 0 deletions

View file

@ -0,0 +1,13 @@
pageRouteInit.push(function ($routeProvider, $locationProvider) {
$routeProvider.when('/ui/server/about', {
templateUrl: '/ui/thtml/server/about',
controller: XPageServerAbout
});
});
function XPageServerAbout($scope, $http) {
//$http.get('/api/posts').success(function(data, status, headers, config) {
// $scope.posts = data.posts;
//});
}

View file

@ -0,0 +1,14 @@
pageRouteInit.push(function ($routeProvider, $locationProvider) {
$routeProvider.when('server/dash', {
templateUrl: '/ui/thtml/server/dash',
controller: XPageServerDash
});
});
function XPageServerDash($scope, $http) {
//$http.get('/api/posts').success(function(data, status, headers, config) {
// $scope.posts = data.posts;
//});
}

View file

@ -0,0 +1,13 @@
pageRouteInit.push(function ($routeProvider, $locationProvider) {
$routeProvider.when('/ui', {
templateUrl: '/ui/thtml/server/index',
controller: XPageServerIndex
});
});
function XPageServerIndex($scope, $http) {
//$http.get('/api/posts').success(function(data, status, headers, config) {
// $scope.posts = data.posts;
//});
}

View file

@ -0,0 +1,26 @@
pageRouteInit.push(function ($routeProvider, $locationProvider) {
$routeProvider.when('/ui/server/routes', {
redirectTo: '/ui/server/routes/tech',
});
$routeProvider.when('/ui/server/routes/tech', {
templateUrl: '/ui/thtml/server/routes?group1=all,rss,json&group2=csv,xml,ui,angular',
controller: XPageServerTechRoutes,
});
$routeProvider.when('/ui/server/routes/model', {
templateUrl: '/ui/thtml/server/routes?group1=xnode,xnode_base,xnode-base-command&group2=xnode-data,xnode-data-value,xsystem-state,all',
controller: XPageServerModelRoutes,
});
});
function XPageServerTechRoutes($scope, $http) {
$http.get('/api/json/server/routes?groups=json,xml,rss,csv,ui,angular').success(function(data, status, headers, config) {
$scope.serverRoutes = data.data;
});
}
function XPageServerModelRoutes($scope, $http) {
$http.get('/api/json/server/routes?groups=xnode,xnode-base,xnode-base-command,xnode-data,xnode-data-value,system-state').success(function(data, status, headers, config) {
$scope.serverRoutes = data.data;
});
}

View file

@ -0,0 +1,9 @@
'use strict';
angular.module('xdsUI.directives', []).
directive('appVersion', ['version', function(version) {
return function(scope, elm, attrs) {
elm.text(version);
};
}]);

View file

@ -0,0 +1,9 @@
'use strict';
angular.module('xdsUI.filters', []).
filter('interpolate', ['version', function(version) {
return function(text) {
return String(text).replace(/\%VERSION\%/mg, version);
}
}]);

View file

@ -0,0 +1,5 @@
'use strict';
angular.module('xdsUI.services', []).
value('version', '0.1');

View file

@ -0,0 +1,27 @@
'use strict';
var crudRouteInit = [];
var pageRouteInit = [];
angular.module('xdsUI', ['ngRoute','xdsUI.filters', 'xdsUI.services', 'xdsUI.directives']).
config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) {
// init page controllers
for (var i = 0; i < pageRouteInit.length; i++) {
pageRouteInit[i]($routeProvider, $locationProvider);
}
// init crud controllers
for (var i = 0; i < crudRouteInit.length; i++) {
crudRouteInit[i]($routeProvider, $locationProvider);
}
//$routeProvider.otherwise("/404", {
// templateUrl: "partials/404.html",
// controller: "PageCtrl"
//});
$routeProvider.otherwise({ redirectTo: '/ui' });
// todo: add ie9 warning, base kills svg url property
$locationProvider.html5Mode({enabled: true, requireBase: false});
}]);