Remove placeholder from admin view

Since all routes are accounted for now, the placeholder is no longer
needed. This addresses the bug of erroneously displaying the placeholder
when navigating to /admin/

Bug: Issue 7575
Change-Id: Id5767351f49cc6569b6bcb8bb49804b9e690ee78
This commit is contained in:
Becky Siegel
2017-11-03 14:10:26 -07:00
parent 0334d1841c
commit 2101b7fef2
3 changed files with 0 additions and 22 deletions

View File

@@ -23,7 +23,6 @@ limitations under the License.
<link rel="import" href="../../../styles/shared-styles.html">
<link rel="import" href="../../core/gr-navigation/gr-navigation.html">
<link rel="import" href="../../shared/gr-page-nav/gr-page-nav.html">
<link rel="import" href="../../shared/gr-placeholder/gr-placeholder.html">
<link rel="import" href="../../shared/gr-rest-api-interface/gr-rest-api-interface.html">
<link rel="import" href="../gr-admin-group-list/gr-admin-group-list.html">
<link rel="import" href="../gr-group/gr-group.html">
@@ -133,9 +132,6 @@ limitations under the License.
project="[[params.project]]"></gr-project-access>
</main>
</template>
<template is="dom-if" if="[[params.placeholder]]" restamp="true">
<gr-placeholder title="Admin" path="[[path]]"></gr-placeholder>
</template>
<gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
</template>
<script src="gr-admin-view.js"></script>

View File

@@ -20,7 +20,6 @@
DASHBOARD: /^\/dashboard\/(.+)$/,
CUSTOM_DASHBOARD: /^\/dashboard\/?$/,
ADMIN_PLACEHOLDER: '/admin/(.*)',
AGREEMENTS: /^\/settings\/(agreements|new-agreement)/,
REGISTER: /^\/register(\/.*)?$/,
@@ -600,9 +599,6 @@
this._mapRoute(RoutePattern.PLUGIN_LIST, '_handlePluginListRoute', true);
this._mapRoute(RoutePattern.ADMIN_PLACEHOLDER,
'_handleAdminPlaceholderRoute', true);
this._mapRoute(RoutePattern.QUERY, '_handleQueryRoute');
this._mapRoute(RoutePattern.CHANGE_NUMBER_LEGACY,
@@ -1003,12 +999,6 @@
});
},
_handleAdminPlaceholderRoute(data) {
data.params.view = Gerrit.Nav.View.ADMIN;
data.params.placeholder = true;
this._setParams(data.params);
},
_handleQueryRoute(data) {
this._setParams({
view: Gerrit.Nav.View.SEARCH,

View File

@@ -123,7 +123,6 @@ limitations under the License.
actualDoesNotRequireAuth.sort();
const shouldRequireAutoAuth = [
'_handleAdminPlaceholderRoute',
'_handleAgreementsRoute',
'_handleCreateGroupRoute',
'_handleCreateProjectRoute',
@@ -522,13 +521,6 @@ limitations under the License.
setParamsStub = sandbox.stub(element, '_setParams');
});
test('_handleAdminPlaceholderRoute', () => {
element._handleAdminPlaceholderRoute({params: {}});
assert.equal(setParamsStub.lastCall.args[0].view,
Gerrit.Nav.View.ADMIN);
assert.isTrue(setParamsStub.lastCall.args[0].placeholder);
});
test('_handleAgreementsRoute', () => {
element._handleAgreementsRoute({params: {}});
assert.isTrue(setParamsStub.calledOnce);