---修复数据管理分页Bug

Web_Manager_Develope
wu ming 8 years ago
parent efa64653d0
commit 8d8588dfdd

40
defs.d.ts vendored

@ -17,6 +17,26 @@
/// <reference path="d.ts/configs/ts/shareController.d.ts"/> /// <reference path="d.ts/configs/ts/shareController.d.ts"/>
/// <reference path="d.ts/configs/ts/glusterfsSetting.d.ts"/> /// <reference path="d.ts/configs/ts/glusterfsSetting.d.ts"/>
/// <reference path="d.ts/configs/ts/kubeClusterSetting.d.ts"/> /// <reference path="d.ts/configs/ts/kubeClusterSetting.d.ts"/>
/// <reference path="d.ts/developer/ts/developerPlugin.d.ts"/>
/// <reference path="d.ts/developer/ts/dataManagerModel.d.ts"/>
/// <reference path="d.ts/developer/ts/developerEnrichers.d.ts"/>
/// <reference path="d.ts/developer/ts/environmentPanel.d.ts"/>
/// <reference path="d.ts/developer/ts/fileMigrationTask.d.ts"/>
/// <reference path="d.ts/developer/ts/home.d.ts"/>
/// <reference path="d.ts/developer/ts/jenkinsJob.d.ts"/>
/// <reference path="d.ts/developer/ts/jenkinsJobs.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/kubernetesModel.d.ts"/>
/// <reference path="d.ts/developer/ts/jenkinsLog.d.ts"/>
/// <reference path="d.ts/developer/ts/jenkinsMetrics.d.ts"/>
/// <reference path="d.ts/developer/ts/navbar.d.ts"/>
/// <reference path="d.ts/developer/ts/pipeline.d.ts"/>
/// <reference path="d.ts/developer/ts/pipelineDirective.d.ts"/>
/// <reference path="d.ts/developer/ts/pipelines.d.ts"/>
/// <reference path="d.ts/developer/ts/project.d.ts"/>
/// <reference path="d.ts/developer/ts/projectSelector.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/workspaces.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"/>
@ -29,7 +49,6 @@
/// <reference path="d.ts/kubernetes/ts/deploymentConfig.d.ts"/> /// <reference path="d.ts/kubernetes/ts/deploymentConfig.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/deploymentConfigs.d.ts"/> /// <reference path="d.ts/kubernetes/ts/deploymentConfigs.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/events.d.ts"/> /// <reference path="d.ts/kubernetes/ts/events.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/kubernetesModel.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/host.d.ts"/> /// <reference path="d.ts/kubernetes/ts/host.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/hosts.d.ts"/> /// <reference path="d.ts/kubernetes/ts/hosts.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/imageRepositories.d.ts"/> /// <reference path="d.ts/kubernetes/ts/imageRepositories.d.ts"/>
@ -58,25 +77,6 @@
/// <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/developer/ts/developerPlugin.d.ts"/>
/// <reference path="d.ts/developer/ts/dataManagerModel.d.ts"/>
/// <reference path="d.ts/developer/ts/developerEnrichers.d.ts"/>
/// <reference path="d.ts/developer/ts/environmentPanel.d.ts"/>
/// <reference path="d.ts/developer/ts/fileMigrationTask.d.ts"/>
/// <reference path="d.ts/developer/ts/home.d.ts"/>
/// <reference path="d.ts/developer/ts/jenkinsJob.d.ts"/>
/// <reference path="d.ts/developer/ts/jenkinsJobs.d.ts"/>
/// <reference path="d.ts/developer/ts/jenkinsLog.d.ts"/>
/// <reference path="d.ts/developer/ts/jenkinsMetrics.d.ts"/>
/// <reference path="d.ts/developer/ts/navbar.d.ts"/>
/// <reference path="d.ts/developer/ts/pipeline.d.ts"/>
/// <reference path="d.ts/developer/ts/pipelineDirective.d.ts"/>
/// <reference path="d.ts/developer/ts/pipelines.d.ts"/>
/// <reference path="d.ts/developer/ts/project.d.ts"/>
/// <reference path="d.ts/developer/ts/projectSelector.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/workspaces.d.ts"/>
/// <reference path="d.ts/navigation/ts/navigationPlugin.d.ts"/> /// <reference path="d.ts/navigation/ts/navigationPlugin.d.ts"/>
/// <reference path="d.ts/system/ts/systemHelpers.d.ts"/> /// <reference path="d.ts/system/ts/systemHelpers.d.ts"/>
/// <reference path="d.ts/system/ts/systemPlugin.d.ts"/> /// <reference path="d.ts/system/ts/systemPlugin.d.ts"/>

File diff suppressed because one or more lines are too long

@ -248,8 +248,8 @@ gulp.task('connect', ['watch'], function() {
targetPath: '/hawtio/git' targetPath: '/hawtio/git'
}, { }, {
proto: "http", proto: "http",
port: "8080", port: "8088",
hostname: "192.168.0.181", hostname: "192.168.0.110",
path: '/java/console/api', path: '/java/console/api',
targetPath: "/" targetPath: "/"
}]; }];

@ -36,6 +36,7 @@ module Developer{
public getPageSizeNum(){ public getPageSizeNum(){
var num = Math.ceil(this.totalSize/this.currentTableSize); var num = Math.ceil(this.totalSize/this.currentTableSize);
console.log(this.totalSize);
if(num < this.currentPageNum) if(num < this.currentPageNum)
num = this.currentPageNum; num = this.currentPageNum;
return num; return num;
@ -161,7 +162,6 @@ module Developer{
dataType : 'json', dataType : 'json',
data: createParamData(paramOptions), data: createParamData(paramOptions),
success : function(data) { success : function(data) {
console.log(data);
result = data.data; result = data.data;
paramOptions.totalSize = data.length; paramOptions.totalSize = data.length;
paramOptions.totlePage = data.page.totlePage; paramOptions.totlePage = data.page.totlePage;

@ -113,13 +113,13 @@ module Developer {
$scope.isEmptyOrFirst = () => { $scope.isEmptyOrFirst = () => {
var idx = $scope.model.getParamOption("currentPageNum"); var idx = $scope.model.getParamOption("currentPageNum");
var length =$scope.options.getPageSizeNum(); var length =$scope.model.paramOptions.totlePage;
return length <= 0 || idx <= 1; return length <= 0 || idx <= 1;
} }
$scope.isEmptyOrLast = () =>{ $scope.isEmptyOrLast = () =>{
var idx = $scope.model.getParamOption("currentPageNum"); var idx = $scope.model.getParamOption("currentPageNum");
var length =$scope.options.getPageSizeNum(); var length =$scope.model.paramOptions.totlePage;
return length < 1 || idx >= length; return length < 1 || idx >= length;
} }
@ -133,7 +133,7 @@ module Developer {
$scope.last = () =>{ $scope.last = () =>{
var idx = $scope.model.getParamOption("currentPageNum"); var idx = $scope.model.getParamOption("currentPageNum");
var length =$scope.options.getPageSizeNum(); var length =$scope.model.paramOptions.totlePage;
if(idx < length){ if(idx < length){
Kubernetes.eliminateChechBoxClick(); Kubernetes.eliminateChechBoxClick();
$scope.model.updateParamOption("currentPageNum", length); $scope.model.updateParamOption("currentPageNum", length);
@ -142,7 +142,7 @@ module Developer {
$scope.previous = () => { $scope.previous = () => {
var idx = $scope.model.getParamOption("currentPageNum"); var idx = $scope.model.getParamOption("currentPageNum");
var length =$scope.options.getPageSizeNum(); var length =$scope.model.paramOptions.totlePage;
if(idx > 1){ if(idx > 1){
Kubernetes.eliminateChechBoxClick(); Kubernetes.eliminateChechBoxClick();
$scope.model.updateParamOption("currentPageNum", idx-1); $scope.model.updateParamOption("currentPageNum", idx-1);
@ -150,7 +150,7 @@ module Developer {
} }
$scope.next = () =>{ $scope.next = () =>{
var length =$scope.options.getPageSizeNum(); var length =$scope.model.paramOptions.totlePage;
var idx = $scope.model.getParamOption("currentPageNum"); var idx = $scope.model.getParamOption("currentPageNum");
if(idx < length){ if(idx < length){
Kubernetes.eliminateChechBoxClick(); Kubernetes.eliminateChechBoxClick();

Loading…
Cancel
Save