-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
955 additions
and
765 deletions.
There are no files selected for viewing
7 changes: 1 addition & 6 deletions
7
static/partials/application/acme.html → plugins/acme/static/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
var PluginsCACMEtrl = [ | ||
'$scope', 'Module', | ||
function ($scope, Module) { | ||
var module = 'plugins.acme'; | ||
Module.init(module, 'ACME'); | ||
$scope.loaded = false; | ||
|
||
$scope.load = function () { | ||
$scope.loaded = true; | ||
}; | ||
} | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (c) 2019, doudoudzj | ||
# All rights reserved. | ||
# | ||
# InPanel is distributed under the terms of the (new) BSD License. | ||
# The full license can be found in 'LICENSE'. | ||
|
||
'''Shadowsocks-libev Plugins''' | ||
|
||
plugins_info = { | ||
'name': 'Shadowsocks-libev', | ||
'router': 'shadowsocks-libev', | ||
'config': { | ||
'centos': '/etc/shadowsocks-libev/config.json', | ||
'debian': '/etc/default/shadowsocks-libev', | ||
'ubuntu': '/etc/default/shadowsocks-libev', | ||
'freebsd': '/usr/local/etc/shadowsocks-libev' | ||
}, | ||
'script': { | ||
'sysvinit': { | ||
'start': '/etc/init.d/shadowsocks-libev start', | ||
'stop': '/etc/init.d/shadowsocks-libev stop', | ||
'restart': '/etc/init.d/shadowsocks-libev restart', | ||
'status': '/etc/init.d/shadowsocks-libev status' | ||
}, | ||
'systemd': { | ||
'start': 'systemctl start shadowsocks-libev', | ||
'stop': 'systemctl stop shadowsocks-libev', | ||
'restart': 'systemctl restart shadowsocks-libev', | ||
'status': 'systemctl status shadowsocks-libev', | ||
} | ||
}, | ||
'install': { | ||
'yum': { | ||
'repos': '', | ||
'import': { | ||
'from': 'https://copr.fedorainfracloud.org/coprs/librehat/shadowsocks/repo/epel-6/librehat-shadowsocks-epel-6.repo', | ||
'to': '' | ||
}, | ||
'shell': [ | ||
'yum install epel-release -y', | ||
'yum install gcc gettext autoconf libtool automake make pcre-devel asciidoc xmlto c-ares-devel libev-devel libsodium-devel mbedtls-devel -y', | ||
'yum update', | ||
'yum install shadowsocks-libev' | ||
], | ||
}, | ||
'dnf': { | ||
'repos': '', | ||
'shell': [ | ||
'yum install epel-release -y', | ||
'yum install gcc gettext autoconf libtool automake make pcre-devel asciidoc xmlto c-ares-devel libev-devel libsodium-devel mbedtls-devel -y', | ||
'yum update', | ||
'yum install shadowsocks-libev' | ||
], | ||
}, | ||
'apt': { | ||
'repos': '/etc/default/shadowsocks-libev', | ||
'shell': [ | ||
'sh -c \'printf "deb http://deb.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/stretch-backports.list\'', | ||
'apt update', | ||
'apt -t stretch-backports install shadowsocks-libev' | ||
] | ||
}, | ||
'brew': { | ||
'repos': '', | ||
'shell': [ | ||
'ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"', | ||
'brew install shadowsocks-libev' | ||
] | ||
}, | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
static/partials/application/shadowsocks.html → plugins/shadowsocks-libev/static/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
var PluginsShadowsocksCtrl = [ | ||
'$scope', 'Module', | ||
function ($scope, Module) { | ||
var module = 'plugins.shadowsocks'; | ||
Module.init(module, 'Shadowsocks'); | ||
$scope.loaded = false; | ||
$scope.installed = false; | ||
|
||
$scope.load = function () { | ||
$scope.loaded = true; | ||
$scope.check(); | ||
}; | ||
|
||
$scope.check = function () { | ||
$scope.installed = false; | ||
} | ||
} | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
var PluginsHome = [ | ||
'$scope', 'Module', | ||
function ($scope, Module) { | ||
var module = 'plugins'; | ||
Module.init(module, '应用管理'); | ||
$scope.loaded = false; | ||
|
||
$scope.load = function () { | ||
$scope.loaded = true; | ||
$scope.init_plugins(); | ||
}; | ||
$scope.init_plugins = function () { | ||
// app.directive("runoobDirective", function() { | ||
// return { | ||
// template : "<h1>自定义指令!</h1>" | ||
// }; | ||
// }); | ||
// angular.module('inpanel.directives', []).directive('acme', function () { | ||
inpanel.directive("acme", function() { | ||
return { | ||
restrict: 'A', | ||
transclude: true, | ||
scope: {}, | ||
replace: true, | ||
templateUrl: template_path + '/plugins/acme/static/index.html', | ||
controller: ['$scope', '$rootScope', function ($scope, $rootScope) { | ||
$rootScope.navbar_loaded = true; | ||
}] | ||
}; | ||
}) | ||
// var plugins_list = [ | ||
// 'acme' | ||
// ]; | ||
// plugins_list.forEach(function (i) { | ||
// var directives_name = 'plugins' + i; | ||
// angular.module('inpanel.directives', []).directive(directives_name, function () { | ||
// return { | ||
// restrict: 'A', | ||
// transclude: true, | ||
// scope: {}, | ||
// replace: true, | ||
// templateUrl: template_path + '/plugins/' + i + '/index.html', | ||
// controller: ['$scope', '$rootScope', function ($scope, $rootScope) { | ||
// $rootScope.navbar_loaded = true; | ||
// }] | ||
// }; | ||
// }) | ||
// }); | ||
console.log('加载路由') | ||
// inpanel.config(['$routeProvider', function ($routeProvider) { | ||
// var _r = function (t, c, a) { | ||
// var r = { | ||
// templateUrl: template_path + t + '.html?_v=' + _v, | ||
// controller: c, | ||
// reloadOnSearch: false | ||
// }; | ||
// if (!a) r.resolve = Auth; | ||
// return r; | ||
// }; | ||
// $routeProvider. | ||
// when('/plugins/acme', {redirectTo: '/plugins/acme/index'}). | ||
// when('/plugins/acme/index', PluginsRouters); | ||
// }]); | ||
}; | ||
} | ||
]; | ||
|
||
var PluginsRouters = function () { | ||
var t = 'acme/index'; // acme/index.html | ||
var c = [ | ||
'$scope', 'Module', function ($scope, Module) { | ||
var module = 'plugins'; | ||
var section = Module.getSection(); | ||
Module.init(module, '应用管理'); | ||
$scope.loaded = false; | ||
console.log($scope, section); | ||
$scope.load = function () { | ||
$scope.loaded = true; | ||
}; | ||
} | ||
]; | ||
var p = { | ||
templateUrl: template_path + '/plugins/' + t + '.html?_v=' + _v, | ||
controller: c, | ||
reloadOnSearch: false, | ||
resolve: Auth | ||
}; | ||
console.log(p); | ||
return p; | ||
}; | ||
|
||
var PluginsCtrl = [ | ||
'$scope', 'Module', | ||
function ($scope, Module) { | ||
var module = 'plugins'; | ||
var section = Module.getSection(); | ||
Module.init(module, '应用管理'); | ||
$scope.loaded = false; | ||
console.log('插件', section); | ||
$scope.load = function () { | ||
$scope.loaded = true; | ||
}; | ||
} | ||
]; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.