diff --git a/Documentation/pg-plugin-dev.txt b/Documentation/pg-plugin-dev.txt index dbcbe49bd4..3405808f6f 100644 --- a/Documentation/pg-plugin-dev.txt +++ b/Documentation/pg-plugin-dev.txt @@ -224,15 +224,15 @@ Note: TODO Note: TODO -[plugin-project] -=== project -`plugin.project()` +[plugin-repo] +=== repo +`plugin.repo()` .Params: - none .Returns: -- Instance of link:pg-plugin-project-api.html[GrProjectApi]. +- Instance of link:pg-plugin-repo-api.html[GrRepoApi]. === put `plugin.put(url, payload, opt_callback)` diff --git a/Documentation/pg-plugin-project-api.txt b/Documentation/pg-plugin-project-api.txt deleted file mode 100644 index df0a6f4aa0..0000000000 --- a/Documentation/pg-plugin-project-api.txt +++ /dev/null @@ -1,36 +0,0 @@ -= Gerrit Code Review - Project admin customization API - -This API is provided by link:pg-plugin-dev.html#plugin-project[plugin.project()] -and provides customization to admin page. - -== createCommand -`projectApi.createCommand(title, checkVisibleCallback)` - -Create a project command in the admin panel. - -.Params -- *title* String title. -- *checkVisibleCallback* function to configure command visibility. - -.Returns -- GrProjectApi for chaining. - -`checkVisibleCallback(projectName, projectConfig)` - -.Params -- *projectName* String project name. -- *projectConfig* Object REST API response for project config. - -.Returns -- `false` to hide the command for the specific project. - -== onTap -`projectApi.onTap(tapCalback)` - -Add a command tap callback. - -.Params -- *tapCallback* function that's excuted on command tap. - -.Returns -- Nothing diff --git a/Documentation/pg-plugin-repo-api.txt b/Documentation/pg-plugin-repo-api.txt new file mode 100644 index 0000000000..1272ea6869 --- /dev/null +++ b/Documentation/pg-plugin-repo-api.txt @@ -0,0 +1,36 @@ += Gerrit Code Review - Repo admin customization API + +This API is provided by link:pg-plugin-dev.html#plugin-repo[plugin.repo()] +and provides customization to admin page. + +== createCommand +`repoApi.createCommand(title, checkVisibleCallback)` + +Create a repo command in the admin panel. + +.Params +- *title* String title. +- *checkVisibleCallback* function to configure command visibility. + +.Returns +- GrRepoApi for chaining. + +`checkVisibleCallback(repoName, repoConfig)` + +.Params +- *repoName* String project name. +- *repoConfig* Object REST API response for repo config. + +.Returns +- `false` to hide the command for the specific project. + +== onTap +`repoApi.onTap(tapCalback)` + +Add a command tap callback. + +.Params +- *tapCallback* function that's excuted on command tap. + +.Returns +- Nothing diff --git a/polygerrit-ui/app/elements/admin/gr-admin-view/gr-admin-view.html b/polygerrit-ui/app/elements/admin/gr-admin-view/gr-admin-view.html index 3850894e9d..e298d8dd7d 100644 --- a/polygerrit-ui/app/elements/admin/gr-admin-view/gr-admin-view.html +++ b/polygerrit-ui/app/elements/admin/gr-admin-view/gr-admin-view.html @@ -29,11 +29,11 @@ limitations under the License. - - - - - + + + + + -