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.
aggregation-platform/plugins/configs/ts/configPlugin.ts

25 lines
1.1 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);
_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));
}]);
_module.run(['$templateCache', 'HawtioExtension', '$compile', ($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);
});
}]);
hawtioPluginLoader.addModule(pluginName);
}