增加过来冷热数据功能

Web_Manager_Develope
wu ming 8 years ago
parent 22902602ff
commit ab2ccee7ff

@ -11,6 +11,7 @@ declare module Developer {
totalSize: any; totalSize: any;
priorTableSize: number; priorTableSize: number;
keyQuery: any; keyQuery: any;
volumeType: number;
createParamData(): { createParamData(): {
currentPageNum: number; currentPageNum: number;
dataType: any; dataType: any;
@ -18,6 +19,7 @@ declare module Developer {
limit: number; limit: number;
priorTableSize: number; priorTableSize: number;
keyQuery: any; keyQuery: any;
volumeType: number;
}; };
getPageSizeNum(): number; getPageSizeNum(): number;
} }

2
defs.d.ts vendored

@ -38,7 +38,6 @@
/// <reference path="d.ts/developer/ts/projects.d.ts"/> /// <reference path="d.ts/developer/ts/projects.d.ts"/>
/// <reference path="d.ts/developer/ts/workspace.d.ts"/> /// <reference path="d.ts/developer/ts/workspace.d.ts"/>
/// <reference path="d.ts/developer/ts/workspaces.d.ts"/> /// <reference path="d.ts/developer/ts/workspaces.d.ts"/>
/// <reference path="d.ts/navigation/ts/navigationPlugin.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/apps.d.ts"/> /// <reference path="d.ts/kubernetes/ts/apps.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/breadcrumbs.d.ts"/> /// <reference path="d.ts/kubernetes/ts/breadcrumbs.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/build.d.ts"/> /// <reference path="d.ts/kubernetes/ts/build.d.ts"/>
@ -79,3 +78,4 @@
/// <reference path="d.ts/kubernetes/ts/sharedControllers.d.ts"/> /// <reference path="d.ts/kubernetes/ts/sharedControllers.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/tabs.d.ts"/> /// <reference path="d.ts/kubernetes/ts/tabs.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/templates.d.ts"/> /// <reference path="d.ts/kubernetes/ts/templates.d.ts"/>
/// <reference path="d.ts/navigation/ts/navigationPlugin.d.ts"/>

File diff suppressed because one or more lines are too long

@ -66,7 +66,6 @@ module Configs{
if(data){ if(data){
result = data; result = data;
} }
console.log(data);
} }
}); });
this.cluster = result; this.cluster = result;

@ -6,41 +6,41 @@ module Developer{
export function createCurrentSubNavBar($scope, $location, $routeParams){ export function createCurrentSubNavBar($scope, $location, $routeParams){
return activateCurrent([ return activateCurrent([
{ {
href: UrlHelpers.join(context,"Overview","hot/data-type/all"), href: UrlHelpers.join(context,"Overview","cold/data-type/all"),
label: "区数据管理", label: "区数据管理",
title: "查看所有数据", title: "数据汇总任务",
items: [{ items: [{
href: UrlHelpers.join(context,"Overview","hot/data-type/all"), href: UrlHelpers.join(context,"Overview","cold/data-type/all"),
label: "全部", label: "全部",
title: "全部数据" title: "全部数据"
}, },
{ {
href: UrlHelpers.join(context,"Overview","hot/data-type/financial"), href: UrlHelpers.join(context,"Overview","cold/data-type/financial"),
label: "财政", label: "财政",
title: "财政数据" title: "财政数据"
}, },
{ {
href: UrlHelpers.join(context,"Overview/","hot/data-type/social-security"), href: UrlHelpers.join(context,"Overview/","cold/data-type/social-security"),
label: "社保", label: "社保",
title: "社保数据" title: "社保数据"
}] }]
}, },
{ {
href: UrlHelpers.join(context,"Overview","cold/data-type/all"), href: UrlHelpers.join(context,"Overview","hot/data-type/all"),
label: "冷区数据管理", label: "热区数据管理",
title: "数据汇总任务", title: "查看所有数据",
items: [{ items: [{
href: UrlHelpers.join(context,"Overview","cold/data-type/all"), href: UrlHelpers.join(context,"Overview","hot/data-type/all"),
label: "全部", label: "全部",
title: "全部数据" title: "全部数据"
}, },
{ {
href: UrlHelpers.join(context,"Overview","cold/data-type/financial"), href: UrlHelpers.join(context,"Overview","hot/data-type/financial"),
label: "财政", label: "财政",
title: "财政数据" title: "财政数据"
}, },
{ {
href: UrlHelpers.join(context,"Overview/","cold/data-type/social-security"), href: UrlHelpers.join(context,"Overview/","hot/data-type/social-security"),
label: "社保", label: "社保",
title: "社保数据" title: "社保数据"
}] }]
@ -49,7 +49,7 @@ module Developer{
href: UrlHelpers.join(context,"Overview/","task"), href: UrlHelpers.join(context,"Overview/","task"),
label: "任务", label: "任务",
title: "任务查看" title: "任务查看"
} },
]); ]);
} }
} }

@ -4,13 +4,14 @@ module Developer{
export class OptionsParams{ export class OptionsParams{
public pagerSizeOption = [20,50,100]; public pagerSizeOption = [20,50,100];
public dataType =null; public dataType =null;
public currentTableSize =20; public currentTableSize = 20;
public dataBatch =null; public dataBatch = null;
public labels={}; public labels = {};
public currentPageNum=1; public currentPageNum = 1;
public totalSize=null; public totalSize = null;
public priorTableSize = 20; public priorTableSize = 20;
public keyQuery=null; public keyQuery = null;
public volumeType = 1;
public createParamData(){ public createParamData(){
var extendValue =["cityName", "districtName", "dataVersion", "systemName", "dataYear"]; var extendValue =["cityName", "districtName", "dataVersion", "systemName", "dataYear"];
@ -20,7 +21,8 @@ module Developer{
submittedBatch: this.dataBatch, submittedBatch: this.dataBatch,
limit: this.currentTableSize, limit: this.currentTableSize,
priorTableSize: this.priorTableSize, priorTableSize: this.priorTableSize,
keyQuery: this.keyQuery keyQuery: this.keyQuery,
volumeType: this.volumeType
} }
angular.forEach(this.labels,(value, key) =>{ angular.forEach(this.labels,(value, key) =>{

@ -15,7 +15,9 @@ module Developer {
init($scope, $location, $routeParams); init($scope, $location, $routeParams);
$scope.options = DataModel.paramOptions; $scope.options = DataModel.paramOptions;
$scope.pageSizeChoses = DataModel.paramOptions.pagerSizeOption; $scope.pageSizeChoses = DataModel.paramOptions.pagerSizeOption;
$scope.options.dataType = getDataType($location); var result = getDataType($location)
$scope.options.dataType = result["dataType"];
$scope.options.volumeType = result["volumeType"];
$scope.treeOptions = { $scope.treeOptions = {
nodeChildren: "childNodes", nodeChildren: "childNodes",
@ -203,6 +205,9 @@ module Developer {
throw "资源请求失败"; throw "资源请求失败";
} }
}); });
$timeout(() =>{
$location.path("/workspaces/Overview/task");
},250);
migrationClick.close(); migrationClick.close();
}, },
open: (selected) =>{ open: (selected) =>{
@ -219,7 +224,6 @@ module Developer {
$scope.createOracleService = (items) =>{ $scope.createOracleService = (items) =>{
angular.forEach(items,(item)=>{ angular.forEach(items,(item)=>{
console.log(item);
Kubernetes.createRC({ Kubernetes.createRC({
name: item._key, name: item._key,
labels: { labels: {
@ -280,20 +284,31 @@ module Developer {
function getDataType($location){ function getDataType($location){
var path = $location.path(); var path = $location.path();
var result; var dataType;
var volumeType;
var subPath = path.split("/"); var subPath = path.split("/");
switch (subPath[subPath.length -1]) { switch (subPath[subPath.length -1]) {
case "financial": case "financial":
result = "财政"; dataType = "财政";
break; break;
case "social-security": case "social-security":
result = "社保"; dataType = "社保";
break; break;
default: default:
result = null; dataType = null;
break; break;
};
switch (subPath[3]) {
case "hot":
volumeType = 0
break;
default:
volumeType = 1
}
return {
"dataType": dataType,
"volumeType": volumeType
} }
return result;
} }
}]); }]);
} }

@ -102,7 +102,6 @@ module Kubernetes {
}); });
_module.run(['viewRegistry', 'ServiceRegistry', 'HawtioNav', 'KubernetesModel', '$templateCache', (viewRegistry, ServiceRegistry, HawtioNav, KubernetesModel, $templateCache) => { _module.run(['viewRegistry', 'ServiceRegistry', 'HawtioNav', 'KubernetesModel', '$templateCache', (viewRegistry, ServiceRegistry, HawtioNav, KubernetesModel, $templateCache) => {
console.log("3");
log.debug("Running"); log.debug("Running");
viewRegistry['kubernetes'] = templatePath + 'layoutKubernetes.html'; viewRegistry['kubernetes'] = templatePath + 'layoutKubernetes.html';
var builder = HawtioNav.builder(); var builder = HawtioNav.builder();

@ -6,7 +6,6 @@ module Navigation {
export var _module = angular.module(pluginName, []); export var _module = angular.module(pluginName, []);
_module.run(() =>{ _module.run(() =>{
console.log("1");
}); });
_module.service('HawtioBreadcrumbs', () => { _module.service('HawtioBreadcrumbs', () => {

Loading…
Cancel
Save