- [[item.name]]
+ [[item.name]]
|
[[item.description]] |
@@ -77,22 +76,22 @@ limitations under the License.
-
+ id="createNewModal">
-
+
diff --git a/polygerrit-ui/app/elements/admin/gr-project-list/gr-project-list.js b/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list.js
similarity index 72%
rename from polygerrit-ui/app/elements/admin/gr-project-list/gr-project-list.js
rename to polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list.js
index 070cc2fada..0686a6775a 100644
--- a/polygerrit-ui/app/elements/admin/gr-project-list/gr-project-list.js
+++ b/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list.js
@@ -15,7 +15,7 @@
'use strict';
Polymer({
- is: 'gr-project-list',
+ is: 'gr-repo-list',
properties: {
/**
@@ -33,25 +33,25 @@
_path: {
type: String,
readOnly: true,
- value: '/admin/projects',
+ value: '/admin/repos',
},
- _hasNewProjectName: Boolean,
+ _hasNewRepoName: Boolean,
_createNewCapability: {
type: Boolean,
value: false,
},
- _projects: Array,
+ _repos: Array,
/**
* Because we request one more than the projectsPerPage, _shownProjects
* maybe one less than _projects.
* */
- _shownProjects: {
+ _shownRepos: {
type: Array,
- computed: 'computeShownItems(_projects)',
+ computed: 'computeShownItems(_repos)',
},
- _projectsPerPage: {
+ _reposPerPage: {
type: Number,
value: 25,
},
@@ -68,8 +68,8 @@
],
attached() {
- this._getCreateProjectCapability();
- this.fire('title-change', {title: 'Projects'});
+ this._getCreateRepoCapability();
+ this.fire('title-change', {title: 'Repos'});
this._maybeOpenCreateOverlay(this.params);
},
@@ -78,7 +78,7 @@
this._filter = this.getFilterValue(params);
this._offset = this.getOffsetValue(params);
- return this._getProjects(this._filter, this._projectsPerPage,
+ return this._getRepos(this._filter, this._reposPerPage,
this._offset);
},
@@ -92,11 +92,11 @@
}
},
- _computeProjectUrl(name) {
+ _computeRepoUrl(name) {
return this.getUrl(this._path + '/', name);
},
- _getCreateProjectCapability() {
+ _getCreateRepoCapability() {
return this.$.restAPI.getAccount().then(account => {
if (!account) { return; }
return this.$.restAPI.getAccountCapabilities(['createProject'])
@@ -108,25 +108,23 @@
});
},
- _getProjects(filter, projectsPerPage, offset) {
- this._projects = [];
- return this.$.restAPI.getProjects(filter, projectsPerPage, offset)
- .then(projects => {
- if (!projects) {
- return;
- }
- this._projects = Object.keys(projects)
+ _getRepos(filter, reposPerPage, offset) {
+ this._repos = [];
+ return this.$.restAPI.getRepos(filter, reposPerPage, offset)
+ .then(repos => {
+ if (!repos) { return; }
+ this._repos = Object.keys(repos)
.map(key => {
- const project = projects[key];
- project.name = key;
- return project;
+ const repo = repos[key];
+ repo.name = key;
+ return repo;
});
this._loading = false;
});
},
- _handleCreateProject() {
- this.$.createNewModal.handleCreateProject();
+ _handleCreateRepo() {
+ this.$.createNewModal.handleCreateRepo();
},
_handleCloseCreate() {
@@ -141,11 +139,9 @@
return item.state === 'READ_ONLY' ? 'Y' : '';
},
- _computeWeblink(project) {
- if (!project.web_links) {
- return '';
- }
- const webLinks = project.web_links;
+ _computeWeblink(repo) {
+ if (!repo.web_links) { return ''; }
+ const webLinks = repo.web_links;
return webLinks.length ? webLinks : null;
},
});
diff --git a/polygerrit-ui/app/elements/admin/gr-project-list/gr-project-list_test.html b/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list_test.html
similarity index 76%
rename from polygerrit-ui/app/elements/admin/gr-project-list/gr-project-list_test.html
rename to polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list_test.html
index 87732b8e6c..46c0951aec 100644
--- a/polygerrit-ui/app/elements/admin/gr-project-list/gr-project-list_test.html
+++ b/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list_test.html
@@ -16,25 +16,25 @@ limitations under the License.
-->
-gr-project-list
+gr-repo-list
-
+
-
+
+
diff --git a/polygerrit-ui/app/elements/admin/gr-project/gr-project.js b/polygerrit-ui/app/elements/admin/gr-repo/gr-repo.js
similarity index 85%
rename from polygerrit-ui/app/elements/admin/gr-project/gr-project.js
rename to polygerrit-ui/app/elements/admin/gr-repo/gr-repo.js
index 358587416d..5019f4532d 100644
--- a/polygerrit-ui/app/elements/admin/gr-project/gr-project.js
+++ b/polygerrit-ui/app/elements/admin/gr-repo/gr-repo.js
@@ -48,11 +48,11 @@
};
Polymer({
- is: 'gr-project',
+ is: 'gr-repo',
properties: {
params: Object,
- project: String,
+ repo: String,
_configChanged: {
type: Boolean,
@@ -68,7 +68,7 @@
observer: '_loggedInChanged',
},
/** @type {?} */
- _projectConfig: Object,
+ _repoConfig: Object,
_readOnly: {
type: Boolean,
value: true,
@@ -104,35 +104,35 @@
},
observers: [
- '_handleConfigChanged(_projectConfig.*)',
+ '_handleConfigChanged(_repoConfig.*)',
],
attached() {
- this._loadProject();
+ this._loadRepo();
- this.fire('title-change', {title: this.project});
+ this.fire('title-change', {title: this.repo});
},
- _loadProject() {
- if (!this.project) { return Promise.resolve(); }
+ _loadRepo() {
+ if (!this.repo) { return Promise.resolve(); }
const promises = [];
promises.push(this._getLoggedIn().then(loggedIn => {
this._loggedIn = loggedIn;
if (loggedIn) {
- this.$.restAPI.getProjectAccess(this.project).then(access => {
+ this.$.restAPI.getRepoAccess(this.repo).then(access => {
// If the user is not an owner, is_owner is not a property.
- this._readOnly = !access[this.project].is_owner;
+ this._readOnly = !access[this.repo].is_owner;
});
}
}));
- promises.push(this.$.restAPI.getProjectConfig(this.project).then(
+ promises.push(this.$.restAPI.getProjectConfig(this.repo).then(
config => {
if (!config.state) {
config.state = STATES.active.value;
}
- this._projectConfig = config;
+ this._repoConfig = config;
this._loading = false;
}));
@@ -191,7 +191,7 @@
return this.$.restAPI.getLoggedIn();
},
- _formatProjectConfigForSave(p) {
+ _formatRepoConfigForSave(p) {
const configInputObj = {};
for (const key in p) {
if (p.hasOwnProperty(key)) {
@@ -205,9 +205,9 @@
return configInputObj;
},
- _handleSaveProjectConfig() {
- return this.$.restAPI.saveProjectConfig(this.project,
- this._formatProjectConfigForSave(this._projectConfig)).then(() => {
+ _handleSaveRepoConfig() {
+ return this.$.restAPI.saveRepoConfig(this.repo,
+ this._formatRepoConfigForSave(this._repoConfig)).then(() => {
this._configChanged = false;
});
},
@@ -236,7 +236,7 @@
}
},
- _computeCommands(project, schemesObj, _selectedScheme) {
+ _computeCommands(repo, schemesObj, _selectedScheme) {
const commands = [];
let commandObj;
if (schemesObj.hasOwnProperty(_selectedScheme)) {
@@ -247,15 +247,15 @@
commands.push({
title,
command: commandObj[title]
- .replace('${project}', project)
+ .replace('${project}', repo)
.replace('${project-base-name}',
- project.substring(project.lastIndexOf('/') + 1)),
+ repo.substring(repo.lastIndexOf('/') + 1)),
});
}
return commands;
},
- _computeProjectsClass(config) {
+ _computeRepositoriesClass(config) {
return config ? 'showConfig': '';
},
});
diff --git a/polygerrit-ui/app/elements/admin/gr-project/gr-project_test.html b/polygerrit-ui/app/elements/admin/gr-repo/gr-repo_test.html
similarity index 87%
rename from polygerrit-ui/app/elements/admin/gr-project/gr-project_test.html
rename to polygerrit-ui/app/elements/admin/gr-repo/gr-repo_test.html
index 1a742f190b..f44beae6e5 100644
--- a/polygerrit-ui/app/elements/admin/gr-project/gr-project_test.html
+++ b/polygerrit-ui/app/elements/admin/gr-repo/gr-repo_test.html
@@ -16,26 +16,26 @@ limitations under the License.
-->
-gr-project
+gr-repo
-
+
-
+
+
+
diff --git a/polygerrit-ui/app/elements/plugins/gr-project-api/gr-project-api.js b/polygerrit-ui/app/elements/plugins/gr-repo-api/gr-repo-api.js
similarity index 72%
rename from polygerrit-ui/app/elements/plugins/gr-project-api/gr-project-api.js
rename to polygerrit-ui/app/elements/plugins/gr-repo-api/gr-repo-api.js
index a173edde36..8ce34a7a82 100644
--- a/polygerrit-ui/app/elements/plugins/gr-project-api/gr-project-api.js
+++ b/polygerrit-ui/app/elements/plugins/gr-repo-api/gr-repo-api.js
@@ -15,37 +15,37 @@
'use strict';
// Prevent redefinition.
- if (window.GrProjectApi) { return; }
+ if (window.GrRepoApi) { return; }
- function GrProjectApi(plugin) {
+ function GrRepoApi(plugin) {
this._hook = null;
this.plugin = plugin;
}
- GrProjectApi.prototype._createHook = function(title) {
- this._hook = this.plugin.hook('project-command').onAttached(element => {
+ GrRepoApi.prototype._createHook = function(title) {
+ this._hook = this.plugin.hook('repo-command').onAttached(element => {
const pluginCommand =
- document.createElement('gr-plugin-project-command');
+ document.createElement('gr-plugin-repo-command');
pluginCommand.title = title;
element.appendChild(pluginCommand);
});
};
- GrProjectApi.prototype.createCommand = function(title, callback) {
+ GrRepoApi.prototype.createCommand = function(title, callback) {
if (this._hook) {
console.warn('Already set up.');
return this._hook;
}
this._createHook(title);
this._hook.onAttached(element => {
- if (callback(element.projectName, element.config) === false) {
+ if (callback(element.repoName, element.config) === false) {
element.hidden = true;
}
});
return this;
};
- GrProjectApi.prototype.onTap = function(callback) {
+ GrRepoApi.prototype.onTap = function(callback) {
if (!this._hook) {
console.warn('Call createCommand first.');
return this;
@@ -56,5 +56,5 @@
return this;
};
- window.GrProjectApi = GrProjectApi;
+ window.GrRepoApi = GrRepoApi;
})(window);
diff --git a/polygerrit-ui/app/elements/plugins/gr-project-api/gr-project-api_test.html b/polygerrit-ui/app/elements/plugins/gr-repo-api/gr-repo-api_test.html
similarity index 82%
rename from polygerrit-ui/app/elements/plugins/gr-project-api/gr-project-api_test.html
rename to polygerrit-ui/app/elements/plugins/gr-repo-api/gr-repo-api_test.html
index b0719f5447..5ef79a9081 100644
--- a/polygerrit-ui/app/elements/plugins/gr-project-api/gr-project-api_test.html
+++ b/polygerrit-ui/app/elements/plugins/gr-repo-api/gr-repo-api_test.html
@@ -16,27 +16,27 @@ limitations under the License.
-->
-gr-project-api
+gr-repo-api
-
+
-
+
-
-
+
+
-
-
+
|