diff --git a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/AssignmentManagerStatusTmpl.jamon b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/AssignmentManagerStatusTmpl.jamon index c7b305c525b..7ec6ef46af3 100644 --- a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/AssignmentManagerStatusTmpl.jamon +++ b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/AssignmentManagerStatusTmpl.jamon @@ -119,18 +119,8 @@ int numOfPages = (int) Math.ceil(numOfRITs * 1.0 / ritsPerPage); %if> - + + %if> diff --git a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon index beb518d2bbb..2921300a794 100644 --- a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon +++ b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon @@ -407,6 +407,7 @@ AssignmentManager assignmentManager = master.getAssignmentManager(); + diff --git a/hbase-server/src/main/resources/hbase-webapps/static/js/jqSpager.js b/hbase-server/src/main/resources/hbase-webapps/static/js/jqSpager.js new file mode 100644 index 00000000000..40083fc386d --- /dev/null +++ b/hbase-server/src/main/resources/hbase-webapps/static/js/jqSpager.js @@ -0,0 +1,170 @@ +/* + * Copyright The Apache Software Foundation + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +; (function ($, window, document, undefined) { + 'use strict'; + var defaults = { + page: 1, + pageSize: 10, + total: 0, + noData: false,// Whether to show pagination without data, default false does not show, true shows the first page + showPN: true,// Whether to show up and down page + prevPage: "prev",//Page up button text + nextPage: "next",//Page down button text + fastForward: 0,//Fast forward fast rewind, default 0 page + backFun: function (page) {}//Click the page button callback function to return the current page number + }; + function Plugin(element, options) { + this.element = $(element); + this.settings = $.extend({}, defaults, options); + this.pageNum = 1, + this.pageList = [], + this.pageTatol = 0; + this.init(); + } + $.extend(Plugin.prototype, { + init: function () { + this.element.empty(); + this.viewHtml(); + }, + creatHtml: function (i) { + i == this.settings.page ? this.pageList.push('