增加过来冷热数据功能

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

@ -65,8 +65,7 @@ module Configs{
success : function(data) { success : function(data) {
if(data){ if(data){
result = data; result = data;
} }
console.log(data);
} }
}); });
this.cluster = result; this.cluster = result;

@ -6,50 +6,50 @@ 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: "社保数据"
}] }]
}, },
{ {
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) =>{
@ -134,11 +136,11 @@ module Developer{
} }
//更新数据模型 //更新数据模型
protected getDataModel(paramOptions){ protected getDataModel(paramOptions){
var result ; var result ;
$.ajax({ $.ajax({
async: false, async: false,
type : "POST", type : "POST",
url : "/java/console/api/data.json", url : "/java/console/api/data.json",
dataType : 'json', dataType : 'json',
data: createParamData(paramOptions), data: createParamData(paramOptions),

@ -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) =>{
@ -218,8 +223,7 @@ 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: {
@ -242,7 +246,7 @@ module Developer {
}); });
$timeout(() => { $timeout(() => {
$location.path('/kubernetes/namespace/default/replicationControllers'); $location.path('/kubernetes/namespace/default/replicationControllers');
}, 200); }, 200);
} }
@ -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 subPath = path.split("/"); var volumeType;
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;
} };
return result; switch (subPath[3]) {
case "hot":
volumeType = 0
break;
default:
volumeType = 1
}
return {
"dataType": dataType,
"volumeType": volumeType
}
} }
}]); }]);
} }

@ -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();

@ -5,8 +5,7 @@ module Navigation {
export var log = Logger.get(pluginName); export var log = Logger.get(pluginName);
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