Merge "PolyGerrit: Rename gr-admin-project-list to gr-project-list"

This commit is contained in:
Becky Siegel 2017-08-31 22:37:16 +00:00 committed by Gerrit Code Review
commit 56b4be6890
9 changed files with 23 additions and 24 deletions

View File

@ -27,7 +27,6 @@ limitations under the License.
<link rel="import" href="../gr-create-group-dialog/gr-create-group-dialog.html"> <link rel="import" href="../gr-create-group-dialog/gr-create-group-dialog.html">
<link rel="import" href="../gr-create-project-dialog/gr-create-project-dialog.html"> <link rel="import" href="../gr-create-project-dialog/gr-create-project-dialog.html">
<link rel="import" href="../gr-admin-group-list/gr-admin-group-list.html"> <link rel="import" href="../gr-admin-group-list/gr-admin-group-list.html">
<link rel="import" href="../gr-admin-project-list/gr-admin-project-list.html">
<link rel="import" href="../gr-group/gr-group.html"> <link rel="import" href="../gr-group/gr-group.html">
<link rel="import" href="../gr-group-audit-log/gr-group-audit-log.html"> <link rel="import" href="../gr-group-audit-log/gr-group-audit-log.html">
<link rel="import" href="../gr-group-members/gr-group-members.html"> <link rel="import" href="../gr-group-members/gr-group-members.html">
@ -36,6 +35,7 @@ limitations under the License.
<link rel="import" href="../gr-project-access/gr-project-access.html"> <link rel="import" href="../gr-project-access/gr-project-access.html">
<link rel="import" href="../gr-project-commands/gr-project-commands.html"> <link rel="import" href="../gr-project-commands/gr-project-commands.html">
<link rel="import" href="../gr-project-detail-list/gr-project-detail-list.html"> <link rel="import" href="../gr-project-detail-list/gr-project-detail-list.html">
<link rel="import" href="../gr-project-list/gr-project-list.html">
<dom-module id="gr-admin-view"> <dom-module id="gr-admin-view">
<template> <template>
@ -75,8 +75,7 @@ limitations under the License.
</gr-page-nav> </gr-page-nav>
<template is="dom-if" if="[[_showProjectList]]" restamp="true"> <template is="dom-if" if="[[_showProjectList]]" restamp="true">
<main class="table"> <main class="table">
<gr-admin-project-list class="table" params="[[params]]"> <gr-project-list class="table" params="[[params]]"></gr-project-list>
</gr-admin-project-list>
</main> </main>
</template> </template>
<template is="dom-if" if="[[_showProjectMain]]" restamp="true"> <template is="dom-if" if="[[_showProjectMain]]" restamp="true">

View File

@ -17,7 +17,7 @@
const ADMIN_LINKS = [{ const ADMIN_LINKS = [{
name: 'Projects', name: 'Projects',
url: '/admin/projects', url: '/admin/projects',
view: 'gr-admin-project-list', view: 'gr-project-list',
viewableToAll: true, viewableToAll: true,
children: [], children: [],
}, { }, {
@ -191,7 +191,7 @@
params.adminView === 'gr-project-commands'); params.adminView === 'gr-project-commands');
this.set('_showProjectMain', params.adminView === 'gr-project'); this.set('_showProjectMain', params.adminView === 'gr-project');
this.set('_showProjectList', this.set('_showProjectList',
params.adminView === 'gr-admin-project-list'); params.adminView === 'gr-project-list');
this.set('_showProjectDetailList', this.set('_showProjectDetailList',
params.adminView === 'gr-project-detail-list'); params.adminView === 'gr-project-detail-list');
this.set('_showPluginList', params.adminView === 'gr-plugin-list'); this.set('_showPluginList', params.adminView === 'gr-plugin-list');

View File

@ -70,18 +70,18 @@ limitations under the License.
element._filteredLinks = [{ element._filteredLinks = [{
name: 'Projects', name: 'Projects',
url: '/admin/projects', url: '/admin/projects',
view: 'gr-admin-project-list', view: 'gr-project-list',
children: [], children: [],
}]; }];
element.params = { element.params = {
adminView: 'gr-admin-project-list', adminView: 'gr-project-list',
}; };
flushAsynchronousOperations(); flushAsynchronousOperations();
assert.equal(Polymer.dom(element.root).querySelectorAll( assert.equal(Polymer.dom(element.root).querySelectorAll(
'.selected').length, 1); '.selected').length, 1);
assert.ok(element.$$('gr-admin-project-list')); assert.ok(element.$$('gr-project-list'));
assert.isNotOk(element.$$('gr-admin-create-project')); assert.isNotOk(element.$$('gr-admin-create-project'));
}); });

View File

@ -26,7 +26,7 @@ limitations under the License.
<link rel="import" href="../gr-create-project-dialog/gr-create-project-dialog.html"> <link rel="import" href="../gr-create-project-dialog/gr-create-project-dialog.html">
<dom-module id="gr-admin-project-list"> <dom-module id="gr-project-list">
<template> <template>
<style include="shared-styles"></style> <style include="shared-styles"></style>
<style include="gr-table-styles"></style> <style include="gr-table-styles"></style>
@ -94,5 +94,5 @@ limitations under the License.
</gr-overlay> </gr-overlay>
<gr-rest-api-interface id="restAPI"></gr-rest-api-interface> <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
</template> </template>
<script src="gr-admin-project-list.js"></script> <script src="gr-project-list.js"></script>
</dom-module> </dom-module>

View File

@ -15,7 +15,7 @@
'use strict'; 'use strict';
Polymer({ Polymer({
is: 'gr-admin-project-list', is: 'gr-project-list',
properties: { properties: {
/** /**

View File

@ -16,19 +16,19 @@ limitations under the License.
--> -->
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes"> <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>gr-admin-project-list</title> <title>gr-project-list</title>
<script src="../../../bower_components/page/page.js"></script> <script src="../../../bower_components/page/page.js"></script>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script> <script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script> <script src="../../../bower_components/web-component-tester/browser.js"></script>
<link rel="import" href="../../../test/common-test-setup.html"/> <link rel="import" href="../../../test/common-test-setup.html"/>
<link rel="import" href="gr-admin-project-list.html"> <link rel="import" href="gr-project-list.html">
<script>void(0);</script> <script>void(0);</script>
<test-fixture id="basic"> <test-fixture id="basic">
<template> <template>
<gr-admin-project-list></gr-admin-project-list> <gr-project-list></gr-project-list>
</template> </template>
</test-fixture> </test-fixture>
@ -47,7 +47,7 @@ limitations under the License.
}; };
}; };
suite('gr-admin-project-list tests', () => { suite('gr-project-list tests', () => {
let element; let element;
let projects; let projects;
let sandbox; let sandbox;

View File

@ -725,7 +725,7 @@
_handleProjectListOffsetRoute(data) { _handleProjectListOffsetRoute(data) {
this._setParams({ this._setParams({
view: Gerrit.Nav.View.ADMIN, view: Gerrit.Nav.View.ADMIN,
adminView: 'gr-admin-project-list', adminView: 'gr-project-list',
offset: data.params[1] || 0, offset: data.params[1] || 0,
filter: null, filter: null,
}); });
@ -734,7 +734,7 @@
_handleProjectListFilterOffsetRoute(data) { _handleProjectListFilterOffsetRoute(data) {
this._setParams({ this._setParams({
view: Gerrit.Nav.View.ADMIN, view: Gerrit.Nav.View.ADMIN,
adminView: 'gr-admin-project-list', adminView: 'gr-project-list',
offset: data.params.offset, offset: data.params.offset,
filter: data.params.filter, filter: data.params.filter,
}); });
@ -743,7 +743,7 @@
_handleProjectListFilterRoute(data) { _handleProjectListFilterRoute(data) {
this._setParams({ this._setParams({
view: Gerrit.Nav.View.ADMIN, view: Gerrit.Nav.View.ADMIN,
adminView: 'gr-admin-project-list', adminView: 'gr-project-list',
filter: data.params.filter || null, filter: data.params.filter || null,
}); });
}, },

View File

@ -809,7 +809,7 @@ limitations under the License.
const data = {params: {}}; const data = {params: {}};
assertDataToParams(data, '_handleProjectListOffsetRoute', { assertDataToParams(data, '_handleProjectListOffsetRoute', {
view: Gerrit.Nav.View.ADMIN, view: Gerrit.Nav.View.ADMIN,
adminView: 'gr-admin-project-list', adminView: 'gr-project-list',
offset: 0, offset: 0,
filter: null, filter: null,
}); });
@ -817,7 +817,7 @@ limitations under the License.
data.params[1] = 42; data.params[1] = 42;
assertDataToParams(data, '_handleProjectListOffsetRoute', { assertDataToParams(data, '_handleProjectListOffsetRoute', {
view: Gerrit.Nav.View.ADMIN, view: Gerrit.Nav.View.ADMIN,
adminView: 'gr-admin-project-list', adminView: 'gr-project-list',
offset: 42, offset: 42,
filter: null, filter: null,
}); });
@ -827,7 +827,7 @@ limitations under the License.
const data = {params: {filter: 'foo', offset: 42}}; const data = {params: {filter: 'foo', offset: 42}};
assertDataToParams(data, '_handleProjectListFilterOffsetRoute', { assertDataToParams(data, '_handleProjectListFilterOffsetRoute', {
view: Gerrit.Nav.View.ADMIN, view: Gerrit.Nav.View.ADMIN,
adminView: 'gr-admin-project-list', adminView: 'gr-project-list',
offset: 42, offset: 42,
filter: 'foo', filter: 'foo',
}); });
@ -837,14 +837,14 @@ limitations under the License.
const data = {params: {}}; const data = {params: {}};
assertDataToParams(data, '_handleProjectListFilterRoute', { assertDataToParams(data, '_handleProjectListFilterRoute', {
view: Gerrit.Nav.View.ADMIN, view: Gerrit.Nav.View.ADMIN,
adminView: 'gr-admin-project-list', adminView: 'gr-project-list',
filter: null, filter: null,
}); });
data.params.filter = 'foo'; data.params.filter = 'foo';
assertDataToParams(data, '_handleProjectListFilterRoute', { assertDataToParams(data, '_handleProjectListFilterRoute', {
view: Gerrit.Nav.View.ADMIN, view: Gerrit.Nav.View.ADMIN,
adminView: 'gr-admin-project-list', adminView: 'gr-project-list',
filter: 'foo', filter: 'foo',
}); });
}); });

View File

@ -32,7 +32,6 @@ limitations under the License.
'gr-app_test.html', 'gr-app_test.html',
'admin/gr-access-section/gr-access-section_test.html', 'admin/gr-access-section/gr-access-section_test.html',
'admin/gr-admin-group-list/gr-admin-group-list_test.html', 'admin/gr-admin-group-list/gr-admin-group-list_test.html',
'admin/gr-admin-project-list/gr-admin-project-list_test.html',
'admin/gr-admin-view/gr-admin-view_test.html', 'admin/gr-admin-view/gr-admin-view_test.html',
'admin/gr-confirm-delete-item-dialog/gr-confirm-delete-item-dialog_test.html', 'admin/gr-confirm-delete-item-dialog/gr-confirm-delete-item-dialog_test.html',
'admin/gr-create-change-dialog/gr-create-change-dialog_test.html', 'admin/gr-create-change-dialog/gr-create-change-dialog_test.html',
@ -48,6 +47,7 @@ limitations under the License.
'admin/gr-project-access/gr-project-access_test.html', 'admin/gr-project-access/gr-project-access_test.html',
'admin/gr-project-commands/gr-project-commands_test.html', 'admin/gr-project-commands/gr-project-commands_test.html',
'admin/gr-project-detail-list/gr-project-detail-list_test.html', 'admin/gr-project-detail-list/gr-project-detail-list_test.html',
'admin/gr-project-list/gr-project-list_test.html',
'admin/gr-rule-editor/gr-rule-editor_test.html', 'admin/gr-rule-editor/gr-rule-editor_test.html',
'change-list/gr-change-list-item/gr-change-list-item_test.html', 'change-list/gr-change-list-item/gr-change-list-item_test.html',
'change-list/gr-change-list-view/gr-change-list-view_test.html', 'change-list/gr-change-list-view/gr-change-list-view_test.html',