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/developer/ts/developerPlugin.ts

47 lines
2.1 KiB

9 years ago
/// <reference path="../../includes.ts"/>
/// <reference path="developerHelpers.ts"/>
/// <reference path="../../kubernetes/ts/kubernetesHelpers.ts"/>
9 years ago
module Developer {
export var _module = angular.module(pluginName, ['hawtio-core', 'hawtio-ui', 'ui.codemirror', 'nvd3', 'treeControl']);
9 years ago
export var controller = PluginHelpers.createControllerFunction(_module, pluginName);
export var route = PluginHelpers.createRoutingFunction(templatePath);
_module.config(['$routeProvider', ($routeProvider:ng.route.IRouteProvider) => {
9 years ago
$routeProvider.when(context, route('workspaces.html', false))
.when("/data-manager", route('workspaces.html', false))
.when(UrlHelpers.join(context, 'Overview/:type/data-type/all'), route('workspaces.html', false))
.when(UrlHelpers.join(context, 'Overview/:type/data-type/financial'), route('workspaces.html', false))
.when(UrlHelpers.join(context, 'Overview/:type/data-type/social-security'), route('workspaces.html', false))
.otherwise(context);
}]);
9 years ago
_module.run(['viewRegistry', 'ServiceRegistry', 'HawtioNav', 'KubernetesModel', '$templateCache', (viewRegistry, ServiceRegistry, HawtioNav, KubernetesModel, $templateCache) => {
log.debug("Running");
9 years ago
viewRegistry['workspaces'] = Kubernetes.templatePath + 'layoutKubernetes.html';
viewRegistry['namespaces'] = Kubernetes.templatePath + 'layoutKubernetes.html';
var builder = HawtioNav.builder();
var dmanagerTab = builder.id('dmanager')
9 years ago
.rank(200)
.href(() => context)
.title(() => '数据管理')
//.isValid(() => !Core.isRemoteConnection())
9 years ago
.build();
HawtioNav.add(dmanagerTab);
9 years ago
}]);
_module.filter('asTrustedHtml', ['$sce', function ($sce) {
return function (text) {
return $sce.trustAsHtml(text);
};
}]);
hawtioPluginLoader.addModule(pluginName);
// for scroll-glue directive
hawtioPluginLoader.addModule('luegg.directives');
}