+
+
+ + +
+
+
+
\ No newline at end of file diff --git a/lib/www_views/node-ff-tcrud/angular/thtml/crud/create.ejs b/lib/www_views/node-ff-tcrud/angular/thtml/crud/create.ejs new file mode 100644 index 0000000..39dccba --- /dev/null +++ b/lib/www_views/node-ff-tcrud/angular/thtml/crud/create.ejs @@ -0,0 +1,16 @@ +

Create <%= tview.tname %>

+
+
+
+ <% tview.tedit.tfields.forEach(function (fieldKey) { %> +
+ + +
+ <% }) %> + + +
+
+
+
diff --git a/lib/www_views/node-ff-tcrud/angular/thtml/crud/delete.ejs b/lib/www_views/node-ff-tcrud/angular/thtml/crud/delete.ejs new file mode 100644 index 0000000..c1b3152 --- /dev/null +++ b/lib/www_views/node-ff-tcrud/angular/thtml/crud/delete.ejs @@ -0,0 +1,6 @@ +

Delete <%= tview.tname %>

+
+

Are you sure you want to delete this <%= tview.tname %> <%= ejsKeyData %> ?

+ | - + +
diff --git a/lib/www_views/node-ff-tcrud/angular/thtml/crud/edit.ejs b/lib/www_views/node-ff-tcrud/angular/thtml/crud/edit.ejs new file mode 100644 index 0000000..76f5e54 --- /dev/null +++ b/lib/www_views/node-ff-tcrud/angular/thtml/crud/edit.ejs @@ -0,0 +1,12 @@ + +

Edit <%= tview.tname %>

+
+
+ <% tview.tedit.tfields.forEach(function (fieldKey) { %> +
+ + +
+ <% }) %> +
+
diff --git a/lib/www_views/node-ff-tcrud/angular/thtml/crud/list.ejs b/lib/www_views/node-ff-tcrud/angular/thtml/crud/list.ejs new file mode 100644 index 0000000..ebb4507 --- /dev/null +++ b/lib/www_views/node-ff-tcrud/angular/thtml/crud/list.ejs @@ -0,0 +1 @@ +
diff --git a/lib/www_views/node-ff-tcrud/angular/thtml/crud/list2.ejs b/lib/www_views/node-ff-tcrud/angular/thtml/crud/list2.ejs new file mode 100644 index 0000000..fc36b05 --- /dev/null +++ b/lib/www_views/node-ff-tcrud/angular/thtml/crud/list2.ejs @@ -0,0 +1,50 @@ + +

There are {{data.length}} <%= tview.tplural %>

+ +<% if (tview.tcreate) { %> +

+ Create New +

+<% } %> +
+ + + + <% if (tview.tread) { %><% } %> + <% if (tview.tedit) { %><% } %> + <% if (tview.tdelete) { %><% } %> + <% tview.tlist.tfields.forEach(function (fieldKey) { %> + + <% }) %> + + + + + <% if (tview.tread) { %> + + <% } %> + <% if (tview.tedit) { %> + + <% } %> + <% if (tview.tdelete) { %> + + <% } %> + <% tview.tlist.tfields.forEach(function (fieldKey) { %> + + <% }) %> + + +
OpenEditDelete<%= tview.tmeta.tfields[fieldKey].tname %>
+ Read + + Edit + + Delete + {{row.<%= tview.tmeta.tfields[fieldKey].tid %>}}
+
+<% if (tview.tcreate) { %> +

+ Create New +

+<% } %> + diff --git a/lib/www_views/node-ff-tcrud/angular/thtml/crud/read.ejs b/lib/www_views/node-ff-tcrud/angular/thtml/crud/read.ejs new file mode 100644 index 0000000..c577ddd --- /dev/null +++ b/lib/www_views/node-ff-tcrud/angular/thtml/crud/read.ejs @@ -0,0 +1,19 @@ +
+

<%= ejsKeyData %>

+ <% if (tview.tedit) { %> +

+ Edit +

+ <% } %> + <% if (tview.tdelete) { %> +

+ Delete +

+ <% } %> + <% tview.tread.tfields.forEach(function (fieldKey) { %> +

<%= tview.tmeta.tfields[fieldKey].tname %>: {{data.<%= tview.tmeta.tfields[fieldKey].tid %>}}

+ <% }) %> +

+ +

+ \ No newline at end of file diff --git a/lib/www_views/node-ff-tcrud/formatCSV/list-footer.ejs b/lib/www_views/node-ff-tcrud/formatCSV/list-footer.ejs new file mode 100644 index 0000000..ccfc2e0 --- /dev/null +++ b/lib/www_views/node-ff-tcrud/formatCSV/list-footer.ejs @@ -0,0 +1 @@ +# CSV END diff --git a/lib/www_views/node-ff-tcrud/formatCSV/list-header.ejs b/lib/www_views/node-ff-tcrud/formatCSV/list-header.ejs new file mode 100644 index 0000000..dee6269 --- /dev/null +++ b/lib/www_views/node-ff-tcrud/formatCSV/list-header.ejs @@ -0,0 +1,2 @@ +# CSV <%= tview.tid %> +# <% tview.tlist.tfields.forEach(function (tfieldKey) {var tfield = tview.tmeta.tfields[tfieldKey]; %><%= tfield.tid %>,<% }) %> diff --git a/lib/www_views/node-ff-tcrud/formatCSV/list-record.ejs b/lib/www_views/node-ff-tcrud/formatCSV/list-record.ejs new file mode 100644 index 0000000..29f92bf --- /dev/null +++ b/lib/www_views/node-ff-tcrud/formatCSV/list-record.ejs @@ -0,0 +1 @@ +<% tview.tlist.tfields.forEach(function (tfieldKey) {var tfield = tview.tmeta.tfields[tfieldKey]; %><%= record[tfield.tid] %>,<% }) %> diff --git a/lib/www_views/node-ff-tcrud/formatCSV/read-record.ejs b/lib/www_views/node-ff-tcrud/formatCSV/read-record.ejs new file mode 100644 index 0000000..29f92bf --- /dev/null +++ b/lib/www_views/node-ff-tcrud/formatCSV/read-record.ejs @@ -0,0 +1 @@ +<% tview.tlist.tfields.forEach(function (tfieldKey) {var tfield = tview.tmeta.tfields[tfieldKey]; %><%= record[tfield.tid] %>,<% }) %> diff --git a/lib/www_views/node-ff-tcrud/formatRSS/list-footer.ejs b/lib/www_views/node-ff-tcrud/formatRSS/list-footer.ejs new file mode 100644 index 0000000..29f01a4 --- /dev/null +++ b/lib/www_views/node-ff-tcrud/formatRSS/list-footer.ejs @@ -0,0 +1 @@ +List> diff --git a/lib/www_views/node-ff-tcrud/formatRSS/list-header.ejs b/lib/www_views/node-ff-tcrud/formatRSS/list-header.ejs new file mode 100644 index 0000000..21e1b5d --- /dev/null +++ b/lib/www_views/node-ff-tcrud/formatRSS/list-header.ejs @@ -0,0 +1,2 @@ + +<<%= tview.tid %>List> diff --git a/lib/www_views/node-ff-tcrud/formatRSS/list-record.ejs b/lib/www_views/node-ff-tcrud/formatRSS/list-record.ejs new file mode 100644 index 0000000..5f59b36 --- /dev/null +++ b/lib/www_views/node-ff-tcrud/formatRSS/list-record.ejs @@ -0,0 +1,5 @@ + <<%= tview.tid %>> + <% Object.keys(tview.tlist.tfields).forEach(function (tfieldKey) {var tfield = tview.tlist.tfields[tfieldKey]; %> + <<%= tfieldKey %> type="<%= tfield.type %>"><%= record[tfield.tid] %>> + <% }) %> + > \ No newline at end of file diff --git a/lib/www_views/node-ff-tcrud/formatXML/list-footer.ejs b/lib/www_views/node-ff-tcrud/formatXML/list-footer.ejs new file mode 100644 index 0000000..1a598fc --- /dev/null +++ b/lib/www_views/node-ff-tcrud/formatXML/list-footer.ejs @@ -0,0 +1,2 @@ + List> + diff --git a/lib/www_views/node-ff-tcrud/formatXML/list-header.ejs b/lib/www_views/node-ff-tcrud/formatXML/list-header.ejs new file mode 100644 index 0000000..e6b4381 --- /dev/null +++ b/lib/www_views/node-ff-tcrud/formatXML/list-header.ejs @@ -0,0 +1,3 @@ + + + <<%= tview.tid %>List> diff --git a/lib/www_views/node-ff-tcrud/formatXML/list-record.ejs b/lib/www_views/node-ff-tcrud/formatXML/list-record.ejs new file mode 100644 index 0000000..4aead38 --- /dev/null +++ b/lib/www_views/node-ff-tcrud/formatXML/list-record.ejs @@ -0,0 +1,5 @@ + <<%= tview.tid %>> + <% tview.tlist.tfields.forEach(function (tfieldKey) {var tfield = tview.tmeta.tfields[tfieldKey]; %> + <<%= tfield.tid %> type="<%= tfield.type %>"><%= record[tfield.tid] %>> + <% }) %> + > \ No newline at end of file diff --git a/lib/www_views/node-ff-tcrud/formatXML/read-record.ejs b/lib/www_views/node-ff-tcrud/formatXML/read-record.ejs new file mode 100644 index 0000000..61496a1 --- /dev/null +++ b/lib/www_views/node-ff-tcrud/formatXML/read-record.ejs @@ -0,0 +1,8 @@ + + + <<%= tview.tid %>> + <% tview.tlist.tfields.forEach(function (tfieldKey) {var tfield = tview.tmeta.tfields[tfieldKey]; %> + <<%= tfield.tid %> type="<%= tfield.type %>"><%= record[tfield.tid] %>> + <% }) %> + > + diff --git a/lib/www_views/node-ff-tcrud/uiAngularServerPlugins/js/server-plugins.ejs b/lib/www_views/node-ff-tcrud/uiAngularServerPlugins/js/server-plugins.ejs new file mode 100644 index 0000000..737df61 --- /dev/null +++ b/lib/www_views/node-ff-tcrud/uiAngularServerPlugins/js/server-plugins.ejs @@ -0,0 +1,45 @@ +'use strict'; + +// +// Auto generated controller server plugin controller +// + +crudRouteInit.push(function ($routeProvider, $locationProvider) { + $routeProvider.when('/ui/server/plugins', { + templateUrl: '<%= troot.tmeta.tserver.tslugs.tbase %>/<%= troot.tmeta.tserver.tslugs.tplugin %>/uiAngularServerPlugins/thtml/plugins', + controller: XPageServerPlugins, + }); +}); + +function XPageServerPlugins($scope, $http) { + $scope.message = ''; + $scope.doReload = function () { + window.location.reload(true); + }; + + $scope.doClearServerUrl = function () { + FFSpaLoader.clearServerUrl(function(err) { + if (err) { + $scope.message = 'Error: '+err; + } else { + $scope.message = 'Cleared server url'; + } + $scope.$apply(); + }); + }; + + $scope.doClearCache = function () { + FFSpaLoader.clearCache(function(err) { + if (err) { + $scope.message = 'Error: '+err; + } else { + $scope.message = 'Cleared cache'; + } + $scope.$apply(); + }); + }; + + $http.get('<%= troot.tmeta.tserver.tslugs.tbase %>/<%= troot.tmeta.tserver.tslugs.tserver %>/<%= troot.tmeta.tplugin.serverInfoPlugins.tslug %>').success(function(data, status, headers, config) { + $scope.serverPlugins = data.data; + }); +} diff --git a/lib/www_views/node-ff-tcrud/uiAngularServerPlugins/thtml/plugins.ejs b/lib/www_views/node-ff-tcrud/uiAngularServerPlugins/thtml/plugins.ejs new file mode 100644 index 0000000..bc0f0a0 --- /dev/null +++ b/lib/www_views/node-ff-tcrud/uiAngularServerPlugins/thtml/plugins.ejs @@ -0,0 +1,26 @@ +

Server Plugins

+

This page show all the tcrud plugins.

+
+ + + +

{{message}}

+
+
+ + + + + + + + + + + + + + + +
PluginDescriptionDependencies
{{plugin.tmeta.key}}{{plugin.tmeta.description}}{{plugin.tmeta.dependencies}}
+
\ No newline at end of file diff --git a/lib/www_views/node-ff-tcrud/uiAngularServerRoutes/js/server-routes.ejs b/lib/www_views/node-ff-tcrud/uiAngularServerRoutes/js/server-routes.ejs new file mode 100644 index 0000000..bde6f4a --- /dev/null +++ b/lib/www_views/node-ff-tcrud/uiAngularServerRoutes/js/server-routes.ejs @@ -0,0 +1,31 @@ +'use strict'; + +// +// Auto generated controller server router controller +// + +crudRouteInit.push(function ($routeProvider, $locationProvider) { + $routeProvider.when('/ui/server/routes', { + redirectTo: '/ui/server/routes/tech', + }); + $routeProvider.when('/ui/server/routes/tech', { + templateUrl: '<%= troot.tmeta.tserver.tslugs.tbase %>/<%= troot.tmeta.tserver.tslugs.tplugin %>/uiAngularServerRoutes/thtml/routes?group1=all,api_server,api_plugin,tentity_rss,tentity_json&group2=tentity_csv,tentity_xml,tentity_angular,tentity_config', + controller: XPageServerTechRoutes, + }); + $routeProvider.when('/ui/server/routes/model', { + templateUrl: '/api/angular/thtml/routes?group1=moviedb,pagila&group2=all', + controller: XPageServerModelRoutes, + }); +}); + +function XPageServerTechRoutes($scope, $http) { + $http.get('<%= troot.tmeta.tserver.tslugs.tbase %>/<%= troot.tmeta.tserver.tslugs.tserver %>/<%= troot.tmeta.tplugin.serverConfigRoutes.tslug %>?groups=api/server,api/plugin,tentity/json,tentity/xml,tentity/rss,tentity/csv,tentity/angular,tentity/config').success(function(data, status, headers, config) { + $scope.serverRoutes = data.data; + }); +} + +function XPageServerModelRoutes($scope, $http) { + $http.get('<%= troot.tmeta.tserver.tslug %>/json/server/routes?groups=moviedb,pagila').success(function(data, status, headers, config) { + $scope.serverRoutes = data.data; + }); +} diff --git a/lib/www_views/node-ff-tcrud/uiAngularServerRoutes/thtml/routes-group.ejs b/lib/www_views/node-ff-tcrud/uiAngularServerRoutes/thtml/routes-group.ejs new file mode 100644 index 0000000..24c5939 --- /dev/null +++ b/lib/www_views/node-ff-tcrud/uiAngularServerRoutes/thtml/routes-group.ejs @@ -0,0 +1,20 @@ +
+

<%= routeGroup.toUpperCase() %>

+ + + + + + + + + + + + + + +
PathMethod
+ {{route.uriPath}} + {{route.uriPath}}{{route.httpMethod}}
+
\ No newline at end of file diff --git a/lib/www_views/node-ff-tcrud/uiAngularServerRoutes/thtml/routes.ejs b/lib/www_views/node-ff-tcrud/uiAngularServerRoutes/thtml/routes.ejs new file mode 100644 index 0000000..4456962 --- /dev/null +++ b/lib/www_views/node-ff-tcrud/uiAngularServerRoutes/thtml/routes.ejs @@ -0,0 +1,26 @@ +

Server Routes

+

This page show all the nodejs express routes.

+
+ <% if (query.group1 && query.group2) { %> +
+ <% query.group1.split(',').forEach(function (routeGroup) { %> + <%- include('routes-group', {routeGroup: routeGroup}); %> + <% }) %> +
+
+ <% query.group2.split(',').forEach(function (routeGroup) { %> + <%- include('routes-group', {routeGroup: routeGroup}); %> + <% }) %> +
+ <% } else if (query.group1) { %> +
+ <% query.group1.split(',').forEach(function (routeGroup) { %> + <%- include('routes-group', {routeGroup: routeGroup}); %> + <% }) %> +
+ <% } else { %> +
+ <%- include('routes-group', {routeGroup: 'all'}); %> +
+ <% } %> +
\ No newline at end of file diff --git a/lib/www_views/node-ff-tcrud/uiSpaStyle/css/flot.ejs b/lib/www_views/node-ff-tcrud/uiSpaStyle/css/flot.ejs new file mode 100644 index 0000000..76b6b11 --- /dev/null +++ b/lib/www_views/node-ff-tcrud/uiSpaStyle/css/flot.ejs @@ -0,0 +1,10 @@ + +.flot-chart { + display: block; + height: 400px; +} + +.flot-chart-content { + width: 100%; + height: 100%; +} diff --git a/lib/www_views/node-ff-tcrud/uiSpaStyle/css/panel.ejs b/lib/www_views/node-ff-tcrud/uiSpaStyle/css/panel.ejs new file mode 100644 index 0000000..7e97652 --- /dev/null +++ b/lib/www_views/node-ff-tcrud/uiSpaStyle/css/panel.ejs @@ -0,0 +1,56 @@ + +.panel-green { + border-color: #5cb85c; +} + +.panel-green .panel-heading { + border-color: #5cb85c; + color: #fff; + background-color: #5cb85c; +} + +.panel-green a { + color: #5cb85c; +} + +.panel-green a:hover { + color: #3d8b3d; +} + +.panel-red { + border-color: #d9534f; +} + +.panel-red .panel-heading { + border-color: #d9534f; + color: #fff; + background-color: #d9534f; +} + +.panel-red a { + color: #d9534f; +} + +.panel-red a:hover { + color: #b52b27; +} + +.panel-yellow { + border-color: #f0ad4e; +} + +.panel-yellow .panel-heading { + border-color: #f0ad4e; + color: #fff; + background-color: #f0ad4e; +} + +.panel-yellow a { + color: #f0ad4e; +} + +.panel-yellow a:hover { + color: #df8a13; +} + + diff --git a/lib/www_views/node-ff-tcrud/uiSpaStyle/css/style.ejs b/lib/www_views/node-ff-tcrud/uiSpaStyle/css/style.ejs new file mode 100644 index 0000000..76f01d8 --- /dev/null +++ b/lib/www_views/node-ff-tcrud/uiSpaStyle/css/style.ejs @@ -0,0 +1,133 @@ + +.ui-grid { + border: none; +} + +.ui-grid-menu-button { + border: none; + background: none; +} + +.ui-grid-header-cell:last-child .ui-grid-column-resizer.right { + border-right: none; +} + +/* +.fade.ng-hide { + transition: all 0s linear 1s; +} +.fade.ng-show { + transition: all 0s linear 1s; +} +*/ + +body { + margin: 0; + padding: 0; + //background: #4b4d4e; + color: #000; + font: 16px sans-serif, helvetica, arial; + font-weight: 200; +} + +.fontLoaded body { + font-family: "Source Sans", sans-serif; +} + +.fillHeightView { + display: block; + position:absolute; + height:auto; + bottom:0; + top:0; + left:0; + right:0; + padding-top: 120px; + min-height: 220px; +} + +.fillHeightCalc { + height:100%; +} + +.navbar-menu { + position: relative; + float: left; + margin-right: 15px; + padding: 9px 10px; + margin-top: 15px; + margin-bottom: 15px; + background-color: transparent; + background-image: none; + border: 1px solid transparent; + border-radius: 3px; +} + +.navbar-menu .icon-bar { + background-color: rgba(0, 0, 0, 0.5); +} +.navbar-menu .icon-bar + .icon-bar { + margin-top: 4px; +} +.navbar-menu .icon-bar { + display: block; + width: 22px; + height: 2px; + border-radius: 1px; +} + +.navbar-nav-menu { + margin: 0; + padding-left: 1em; +} + +.navbar-nav-menu-group { + width: 8em; + font-weight: bold; +} + +.navbar-collapse { + border: none; +} + +.navbar-nav { + margin: 0px 0px 0px 0px; +} + +.navbar-nav > li > button { + margin-top: 20px; + margin-bottom: 20px; +} + +.for-sm-view-hide, navbar-header-right { + float: right; +} +.for-lg-view-hide, .for-menu-view-hide, .navbar-header-left { + float: left; +} + +.for-lg-view-hide > div > ul > li,.for-lg-view-hide > div > div > ul > li { + // text-align: right; +} + +@media (max-width: 767px) { + .for-sm-view-hide { + display: none; + } + .navbar-nav-menu { + float: left; + } +} + +@media only screen and (-webkit-min-device-pixel-ratio: 1.3), + only screen and (-o-min-device-pixel-ratio: 13/10), + only screen and (min-resolution: 120dpi) + { + font-size:1.2em !important; + + @media screen and (min-width: 1440px) { + #hockey2{ + font-size:1.3em !important; + } + } +} \ No newline at end of file diff --git a/package.json b/package.json index 4899930..89a88db 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,6 @@ "test": "npm run-script test-clean;npm run-script test-mocha", "test-clean": "rm test/data/* -rf", "test-mocha": "export JUNIT_REPORT_PATH=test/data/report.xml;export JUNIT_REPORT_STACK=1;node_modules/mocha/bin/mocha --reporter mocha-jenkins-reporter" - }, "author": "Willem (http://forwardfire.net/)", "license": "BSD-2-Clause", @@ -16,10 +15,36 @@ "url": "https://bitbucket.org/im_ik/node-ff-tcrud.git" }, "dependencies": { - "fetch": "^0.3.6", + "angular": "^1.4.8", + "angular-animate": "^1.4.8", + "angular-resource": "^1.4.8", + "angular-route": "^1.4.8", + "angular-touch": "^1.4.8", + "angular-ui-grid": "^3.1.1", + "body-parser": "~1.0.1", + "bootstrap": "^3.3.6", + "bootswatch": "^3.3.6", + "clone": "^1.0.0", + "cors": "^2.7.1", + "debug": "^2.2.0", + "ejs": "^2.3.1", + "es5-ff-spa-loader": "0.3.0", + "express": "~4.11.0", + "fetch": "0.3.x", + "flot": "^0.8.0-alpha", + "font-awesome": "^4.5.0", + "fontfaceonload": "^0.1.7", + "fontmin": "^0.9.1", "fs-extra": "^0.16.3", - "minify": "^1.4.8", - "underscore": "^1.8.2" + "jquery": "^2.1.4", + "node-crud": "2.0.8", + "raw-body": "1.2.2", + "require-all": "^2.0.0", + "topcoat-fonts": "^0.2.4", + "type-is": "1.1.0", + "underscore": "^1.8.2", + "validate.io": "^1.5.0", + "xml-mapping": "~1.6.1" }, "devDependencies": { "mocha": "^2.1.0",