You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1.4 KiB
29 lines
1.4 KiB
/// <reference path="../../includes.ts"/>
|
|
|
|
module Configs {
|
|
|
|
export var pluginName = "Configs";
|
|
export var context = "/config";
|
|
export var pluginPath = 'plugins/configs/';
|
|
export var templatePath = pluginPath + 'html/';
|
|
export var _module = angular.module(pluginName, ['hawtio-core', 'hawtio-ui', 'ui.codemirror', 'nvd3']);
|
|
export var route = PluginHelpers.createRoutingFunction(templatePath);
|
|
export var controller = PluginHelpers.createControllerFunction(_module, pluginName);
|
|
|
|
_module.config(['$provide', '$routeProvider', ($provide, $routeProvider) =>{
|
|
$routeProvider.when(UrlHelpers.join(context, '/gluster-fs/setting'), route('glusterfsSetting.html', false))
|
|
.when(UrlHelpers.join(context, 'kube-cluster/setting'), route('kubeClusterSetting.html', false))
|
|
.when(context, {redirectTo: UrlHelpers.join(context, '/kube-cluster/setting')});
|
|
}]);
|
|
|
|
_module.run(['viewRegistry', '$templateCache', 'HawtioExtension', '$compile', (viewRegistry, $templateCache:ng.ITemplateCacheService, ext, $compile:ng.ICompileService) => {
|
|
ext.add('config-setting', ($scope) => {
|
|
var template = $templateCache.get<string>(UrlHelpers.join(templatePath, "configMenuItem.html"));
|
|
return $compile(template)($scope);
|
|
});
|
|
viewRegistry['config'] = templatePath + "shareLayout.html";
|
|
}]);
|
|
|
|
hawtioPluginLoader.addModule(pluginName);
|
|
}
|