2016-06-28 10:22:53 +08:00
|
|
|
/// <reference path="../../includes.ts"/>
|
|
|
|
/// <reference path="developerHelpers.ts"/>
|
2016-09-08 22:56:43 +08:00
|
|
|
/// <reference path="../../kubernetes/ts/kubernetesHelpers.ts"/>
|
2016-06-28 10:22:53 +08:00
|
|
|
module Developer {
|
|
|
|
|
2016-10-11 08:50:52 +08:00
|
|
|
export var _module = angular.module(pluginName, ['hawtio-core', 'hawtio-ui', 'ui.codemirror', 'nvd3', 'treeControl', 'ngDialog']);
|
2016-06-28 10:22:53 +08:00
|
|
|
export var controller = PluginHelpers.createControllerFunction(_module, pluginName);
|
|
|
|
export var route = PluginHelpers.createRoutingFunction(templatePath);
|
|
|
|
|
2016-09-08 08:37:22 +08:00
|
|
|
_module.config(['$routeProvider', ($routeProvider:ng.route.IRouteProvider) => {
|
2016-06-28 10:22:53 +08:00
|
|
|
$routeProvider.when(context, route('workspaces.html', false))
|
2016-09-03 15:03:40 +08:00
|
|
|
.when("/data-manager", route('workspaces.html', false))
|
2016-09-06 19:03:43 +08:00
|
|
|
.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))
|
2016-09-13 10:22:02 +08:00
|
|
|
.when(UrlHelpers.join(context, 'Overview/:type/data-type/social-security'), route('workspaces.html', false))
|
|
|
|
.when(UrlHelpers.join(context, 'Overview/task'), route('fileMigrationTask.html', false))
|
2016-09-06 21:55:12 +08:00
|
|
|
.otherwise(context);
|
2016-09-08 08:37:22 +08:00
|
|
|
}]);
|
2016-06-28 10:22:53 +08:00
|
|
|
|
2016-09-03 15:03:40 +08:00
|
|
|
_module.run(['viewRegistry', 'ServiceRegistry', 'HawtioNav', 'KubernetesModel', '$templateCache', (viewRegistry, ServiceRegistry, HawtioNav, KubernetesModel, $templateCache) => {
|
2016-09-08 08:37:22 +08:00
|
|
|
log.debug("Running");
|
2016-06-28 10:22:53 +08:00
|
|
|
viewRegistry['workspaces'] = Kubernetes.templatePath + 'layoutKubernetes.html';
|
|
|
|
viewRegistry['namespaces'] = Kubernetes.templatePath + 'layoutKubernetes.html';
|
2016-10-11 08:50:52 +08:00
|
|
|
// viewRegistry['workspaces'] = Configs.templatePath + 'shareLayout.html';
|
2016-06-28 10:22:53 +08:00
|
|
|
|
|
|
|
var builder = HawtioNav.builder();
|
2016-09-03 15:03:40 +08:00
|
|
|
|
|
|
|
var dmanagerTab = builder.id('dmanager')
|
2016-06-28 10:22:53 +08:00
|
|
|
.rank(200)
|
|
|
|
.href(() => context)
|
2016-09-03 15:03:40 +08:00
|
|
|
.title(() => '数据管理')
|
|
|
|
//.isValid(() => !Core.isRemoteConnection())
|
2016-06-28 10:22:53 +08:00
|
|
|
.build();
|
|
|
|
|
2016-09-03 15:03:40 +08:00
|
|
|
HawtioNav.add(dmanagerTab);
|
2016-06-28 10:22:53 +08:00
|
|
|
}]);
|
|
|
|
|
|
|
|
_module.filter('asTrustedHtml', ['$sce', function ($sce) {
|
|
|
|
return function (text) {
|
|
|
|
return $sce.trustAsHtml(text);
|
|
|
|
};
|
|
|
|
}]);
|
|
|
|
|
|
|
|
hawtioPluginLoader.addModule(pluginName);
|
|
|
|
|
|
|
|
// for scroll-glue directive
|
|
|
|
hawtioPluginLoader.addModule('luegg.directives');
|
|
|
|
}
|