增加过来冷热数据功能

Web_Manager_Develope
wu ming 8 years ago
parent 22902602ff
commit ab2ccee7ff

@ -11,6 +11,7 @@ declare module Developer {
totalSize: any;
priorTableSize: number;
keyQuery: any;
volumeType: number;
createParamData(): {
currentPageNum: number;
dataType: any;
@ -18,6 +19,7 @@ declare module Developer {
limit: number;
priorTableSize: number;
keyQuery: any;
volumeType: 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/workspace.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/breadcrumbs.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/tabs.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) {
if(data){
result = data;
}
console.log(data);
}
}
});
this.cluster = result;

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

@ -4,13 +4,14 @@ module Developer{
export class OptionsParams{
public pagerSizeOption = [20,50,100];
public dataType =null;
public currentTableSize =20;
public dataBatch =null;
public labels={};
public currentPageNum=1;
public totalSize=null;
public currentTableSize = 20;
public dataBatch = null;
public labels = {};
public currentPageNum = 1;
public totalSize = null;
public priorTableSize = 20;
public keyQuery=null;
public keyQuery = null;
public volumeType = 1;
public createParamData(){
var extendValue =["cityName", "districtName", "dataVersion", "systemName", "dataYear"];
@ -20,7 +21,8 @@ module Developer{
submittedBatch: this.dataBatch,
limit: this.currentTableSize,
priorTableSize: this.priorTableSize,
keyQuery: this.keyQuery
keyQuery: this.keyQuery,
volumeType: this.volumeType
}
angular.forEach(this.labels,(value, key) =>{
@ -134,11 +136,11 @@ module Developer{
}
//更新数据模型
protected getDataModel(paramOptions){
protected getDataModel(paramOptions){
var result ;
$.ajax({
async: false,
type : "POST",
type : "POST",
url : "/java/console/api/data.json",
dataType : 'json',
data: createParamData(paramOptions),

@ -15,7 +15,9 @@ module Developer {
init($scope, $location, $routeParams);
$scope.options = DataModel.paramOptions;
$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 = {
nodeChildren: "childNodes",
@ -203,6 +205,9 @@ module Developer {
throw "资源请求失败";
}
});
$timeout(() =>{
$location.path("/workspaces/Overview/task");
},250);
migrationClick.close();
},
open: (selected) =>{
@ -218,8 +223,7 @@ module Developer {
};
$scope.createOracleService = (items) =>{
angular.forEach(items,(item)=>{
console.log(item);
angular.forEach(items,(item)=>{
Kubernetes.createRC({
name: item._key,
labels: {
@ -242,7 +246,7 @@ module Developer {
});
$timeout(() => {
$location.path('/kubernetes/namespace/default/replicationControllers');
$location.path('/kubernetes/namespace/default/replicationControllers');
}, 200);
}
@ -280,20 +284,31 @@ module Developer {
function getDataType($location){
var path = $location.path();
var result;
var subPath = path.split("/");
var dataType;
var volumeType;
var subPath = path.split("/");
switch (subPath[subPath.length -1]) {
case "financial":
result = "财政";
dataType = "财政";
break;
case "social-security":
result = "社保";
dataType = "社保";
break;
default:
result = null;
dataType = null;
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) => {
console.log("3");
log.debug("Running");
viewRegistry['kubernetes'] = templatePath + 'layoutKubernetes.html';
var builder = HawtioNav.builder();

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

Loading…
Cancel
Save