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.
51 lines
2.3 KiB
51 lines
2.3 KiB
/// <reference path="../../includes.ts"/>
|
|
/// <reference path="systemHelpers.ts"/>
|
|
/// <reference path="../../configs/ts/configPlugin.ts"/>
|
|
|
|
module System{
|
|
export var _module = angular.module(pluginName, ['hawtio-core', 'hawtio-ui', 'ui.codemirror', 'ui.validate', 'kubernetesUI', 'ngFileUpload', 'ngDialog']);
|
|
export var controller = PluginHelpers.createControllerFunction(_module, pluginName);
|
|
export var route = PluginHelpers.createRoutingFunction(templatePath);
|
|
|
|
/*
|
|
页面路由配置
|
|
*/
|
|
_module.config(['$provide', '$routeProvider', ($provide, $routeProvider) =>{
|
|
$routeProvider.when(UrlHelpers.join(context, '/'), route('systemList.html', false))
|
|
.when(UrlHelpers.join(context, 'system-list'), route('systemList.html', false))
|
|
.when(UrlHelpers.join(context, 'system-help'), route('regionalismCodeSearch.html', false))
|
|
.when(UrlHelpers.join(context, 'system-help', 'regionalism-search'), route('regionalismCodeSearch.html', false))
|
|
.when(UrlHelpers.join(context, 'system-help', 'system-search'), route('systemCodeSearch.html', false))
|
|
.when(UrlHelpers.join(context, 'system-verification'), route('systemVerification.html', false))
|
|
.when(UrlHelpers.join(context, 'system-sqlManagement'), route('systemSQLManagement.html', false))
|
|
.when(context, {redirectTo: UrlHelpers.join(context, 'system-list')});
|
|
}]);
|
|
|
|
/*
|
|
模块加载后初始化配置
|
|
*/
|
|
_module.run(['viewRegistry', '$templateCache', 'HawtioNav', '$compile', (viewRegistry, $templateCache:ng.ITemplateCacheService, HawtioNav, $compile:ng.ICompileService) => {
|
|
viewRegistry['system'] = Configs.templatePath + "shareLayout.html";
|
|
/*
|
|
信息系统一级菜单导航
|
|
*/
|
|
var builder = HawtioNav.builder();
|
|
var systemTab = builder.id('systemTab')
|
|
.rank(10)
|
|
.href(() => context)
|
|
.title(() => '信息系统')
|
|
//.isValid(() => !Core.isRemoteConnection())
|
|
.build();
|
|
HawtioNav.add(systemTab);
|
|
}]);
|
|
|
|
_module.filter("customFilter", () => {
|
|
return (input, subString) => {
|
|
var repx = new RegExp(subString + "$");
|
|
return input.replace(repx, "");
|
|
}
|
|
});
|
|
|
|
// 加载模块
|
|
hawtioPluginLoader.addModule(pluginName);
|
|
} |