aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/update-center
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2017-08-18 18:53:44 +0200
committerGitHub <noreply@github.com>2017-08-18 18:53:44 +0200
commit7983068e4d2a45531ba0942688e659adf9ee61a2 (patch)
treec481c4ef137cf8b1f4ac69d2917b51317d8c4dad /server/sonar-web/src/main/js/apps/update-center
parentf98b26b3f33e0eb2788ca93a4b115585c527c737 (diff)
downloadsonarqube-7983068e4d2a45531ba0942688e659adf9ee61a2.tar.gz
sonarqube-7983068e4d2a45531ba0942688e659adf9ee61a2.zip
translate all routes files to ts (#2378)
Diffstat (limited to 'server/sonar-web/src/main/js/apps/update-center')
-rw-r--r--server/sonar-web/src/main/js/apps/update-center/routes.ts (renamed from server/sonar-web/src/main/js/apps/update-center/routes.js)12
1 files changed, 7 insertions, 5 deletions
diff --git a/server/sonar-web/src/main/js/apps/update-center/routes.js b/server/sonar-web/src/main/js/apps/update-center/routes.ts
index 81c884ae5d6..e41cfdc073a 100644
--- a/server/sonar-web/src/main/js/apps/update-center/routes.js
+++ b/server/sonar-web/src/main/js/apps/update-center/routes.ts
@@ -17,9 +17,11 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { RouterState, RouteComponent, IndexRouteProps } from 'react-router';
+
const routes = [
{
- getIndexRoute(_, callback) {
+ getIndexRoute(_: RouterState, callback: (err: any, route: IndexRouteProps) => any) {
import('./components/UpdateCenterAppContainer').then(i =>
callback(null, { component: i.default })
);
@@ -27,25 +29,25 @@ const routes = [
},
{
path: 'installed',
- getComponent(_, callback) {
+ getComponent(_: RouterState, callback: (err: any, component: RouteComponent) => any) {
import('./components/UpdateCenterAppContainer').then(i => callback(null, i.default));
}
},
{
path: 'updates',
- getComponent(_, callback) {
+ getComponent(_: RouterState, callback: (err: any, component: RouteComponent) => any) {
import('./components/UpdateCenterAppContainer').then(i => callback(null, i.default));
}
},
{
path: 'available',
- getComponent(_, callback) {
+ getComponent(_: RouterState, callback: (err: any, component: RouteComponent) => any) {
import('./components/UpdateCenterAppContainer').then(i => callback(null, i.default));
}
},
{
path: 'system',
- getComponent(_, callback) {
+ getComponent(_: RouterState, callback: (err: any, component: RouteComponent) => any) {
import('./components/UpdateCenterAppContainer').then(i => callback(null, i.default));
}
}