:merge branch 'app-pages'

Conflicts:
	examples/nginx-app/module.js
	examples/nginx-app/partials/stream.html
	examples/nginx-app/plugin.json
This commit is contained in:
Torkel Ödegaard
2016-02-09 14:22:08 +01:00
25 changed files with 326 additions and 271 deletions

View File

@@ -1,28 +1,20 @@
define([
'angular',
'app/app'
], function(angular, app) {
], function() {
'use strict';
var module = angular.module('nginx-app', []);
app.default.useModule(module);
function StreamPageCtrl() {}
StreamPageCtrl.templateUrl = 'public/plugins/nginx-app/partials/stream.html';
module.config(function($routeProvider) {
$routeProvider
.when('/nginx/stream', {
templateUrl: 'public/plugins/nginx-app/partials/stream.html',
});
});
function LogsPageCtrl() {}
LogsPageCtrl.templateUrl = 'public/plugins/nginx-app/partials/logs.html';
function NginxConfigCtrl() {
this.appEditCtrl.beforeUpdate = function() {
alert('before!');
};
}
function NginxConfigCtrl() {}
NginxConfigCtrl.templateUrl = 'public/plugins/nginx-app/partials/config.html';
return {
ConfigCtrl: NginxConfigCtrl
ConfigCtrl: NginxConfigCtrl,
StreamPageCtrl: StreamPageCtrl,
LogsPageCtrl: LogsPageCtrl,
};
});

View File

@@ -0,0 +1,2 @@
Logs!

View File

@@ -1,12 +1 @@
<topnav title="Nginx" icon="fa fa-fw fa-cubes" subnav="true">
<ul class="nav">
<li class="active" ><a href="org/apps">Overview</a></li>
</ul>
</topnav>
<div class="page-container" style="background: transparent; border: 0;">
<div class="page-wide" ng-init="ctrl.init()">
<h1>NGINX app</h1>
</div>
</div>
streams!

View File

@@ -6,8 +6,8 @@
"staticRoot": ".",
"pages": [
{"name": "Live stream", "url": "nginx/stream", "reqRole": "Editor"},
{"name": "Log view", "url": "nginx/log", "reqRole": "Editor"}
{ "name": "Live stream", "component": "StreamPageCtrl", "role": "Editor"},
{ "name": "Log view", "component": "LogsPageCtrl", "role": "Viewer"}
],
"css": {