|
147 | 147 | return ""; |
148 | 148 | } |
149 | 149 | %> |
| 150 | + |
| 151 | +<jsp:include page="header.jsp"> |
| 152 | + <jsp:param name="pageTitle" value="${pageTitle}"/> |
| 153 | +</jsp:include> |
| 154 | + |
150 | 155 | <% |
151 | 156 | final String ZEROMB = "0 MB"; |
152 | 157 | HMaster master = (HMaster)getServletContext().getAttribute(HMaster.MASTER); |
153 | 158 | Configuration conf = master.getConfiguration(); |
154 | 159 | String fqtn = request.getParameter("name"); |
| 160 | + // handle the case for fqtn is null or master is not initialized with error message + redirect |
| 161 | + if (fqtn == null || !master.isInitialized()) { |
| 162 | +%> |
| 163 | + <div class="container-fluid content"> |
| 164 | + <div class="row inner_header"> |
| 165 | + <div class="page-header"> |
| 166 | + <h1>Table not ready</h1> |
| 167 | + </div> |
| 168 | + </div> |
| 169 | + <p><hr><p> |
| 170 | + <jsp:include page="redirect.jsp" /> |
| 171 | + </div> |
| 172 | +<% return; |
| 173 | + } %> |
| 174 | + |
| 175 | +<% |
155 | 176 | final String escaped_fqtn = StringEscapeUtils.escapeHtml4(fqtn); |
156 | 177 | Table table = master.getConnection().getTable(TableName.valueOf(fqtn)); |
157 | 178 | boolean showFragmentation = conf.getBoolean("hbase.master.ui.fragmentation.enabled", false); |
|
200 | 221 | final MetaBrowser metaBrowser = new MetaBrowser(connection, request); |
201 | 222 | %> |
202 | 223 |
|
203 | | -<jsp:include page="header.jsp"> |
204 | | - <jsp:param name="pageTitle" value="${pageTitle}"/> |
205 | | -</jsp:include> |
206 | | - |
207 | | -<% // handle the case for fqtn is null or master is not initialized with error message + redirect |
208 | | - if (fqtn == null || ! master.isInitialized()) { %> |
209 | | -<div class="container-fluid content"> |
210 | | - <div class="row inner_header"> |
211 | | - <div class="page-header"> |
212 | | - <h1>Table not ready</h1> |
213 | | - </div> |
214 | | - </div> |
215 | | - <p><hr><p> |
216 | | - <jsp:include page="redirect.jsp" /> |
217 | | -</div> |
218 | | -<% return; |
219 | | - } %> |
220 | | - |
221 | 224 | <% // unknow table |
222 | 225 | if (! admin.tableExists(TableName.valueOf(fqtn)).get()) { %> |
223 | 226 | <div class="container-fluid content"> |
|
0 commit comments