Refactor root navigation to generated URL
Change-Id: If969604814d3f2e859932f8a3bc26d14d22eac73
This commit is contained in:
@@ -70,6 +70,9 @@ limitations under the License.
|
||||
// - `repoName`, required, String: the name of the repo
|
||||
// - `detail`, optional, String: the name of the repo detail view.
|
||||
// Takes any value from Gerrit.Nav.RepoDetailView.
|
||||
//
|
||||
// - Gerrit.Nav.View.ROOT:
|
||||
// - no possible parameters.
|
||||
|
||||
|
||||
window.Gerrit = window.Gerrit || {};
|
||||
@@ -96,6 +99,7 @@ limitations under the License.
|
||||
GROUP: 'group',
|
||||
PLUGIN_SCREEN: 'plugin-screen',
|
||||
REPO: 'repo',
|
||||
ROOT: 'root',
|
||||
SEARCH: 'search',
|
||||
SETTINGS: 'settings',
|
||||
},
|
||||
@@ -411,6 +415,15 @@ limitations under the License.
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
getUrlForRoot() {
|
||||
return this._getUrlFor({
|
||||
view: Gerrit.Nav.View.ROOT,
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {string} repo The name of the repo.
|
||||
* @param {!Array} sections The sections to display in the dashboard
|
||||
|
||||
Reference in New Issue
Block a user