]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/app-routing.module.ts
import ceph 16.2.7
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / app-routing.module.ts
index b1a9984dd548f651324d5b4e96e2433530a02fd6..afd0d0c01dc5fba269ce2058cb63998076d89e02 100644 (file)
@@ -6,6 +6,7 @@ import _ from 'lodash';
 import { CephfsListComponent } from './ceph/cephfs/cephfs-list/cephfs-list.component';
 import { ConfigurationFormComponent } from './ceph/cluster/configuration/configuration-form/configuration-form.component';
 import { ConfigurationComponent } from './ceph/cluster/configuration/configuration.component';
+import { CreateClusterComponent } from './ceph/cluster/create-cluster/create-cluster.component';
 import { CrushmapComponent } from './ceph/cluster/crushmap/crushmap.component';
 import { HostFormComponent } from './ceph/cluster/hosts/host-form/host-form.component';
 import { HostsComponent } from './ceph/cluster/hosts/hosts.component';
@@ -87,15 +88,28 @@ const routes: Routes = [
       { path: 'error', component: ErrorComponent },
 
       // Cluster
+      {
+        path: 'expand-cluster',
+        component: CreateClusterComponent,
+        canActivate: [ModuleStatusGuardService],
+        data: {
+          moduleStatusGuardConfig: {
+            apiPath: 'orchestrator',
+            redirectTo: 'dashboard',
+            backend: 'cephadm'
+          },
+          breadcrumbs: 'Expand Cluster'
+        }
+      },
       {
         path: 'hosts',
+        component: HostsComponent,
         data: { breadcrumbs: 'Cluster/Hosts' },
         children: [
-          { path: '', component: HostsComponent },
           {
-            path: URLVerbs.CREATE,
+            path: URLVerbs.ADD,
             component: HostFormComponent,
-            data: { breadcrumbs: ActionLabels.CREATE }
+            outlet: 'modal'
           }
         ]
       },
@@ -106,7 +120,8 @@ const routes: Routes = [
       },
       {
         path: 'services',
-        canActivateChild: [ModuleStatusGuardService],
+        component: ServicesComponent,
+        canActivate: [ModuleStatusGuardService],
         data: {
           moduleStatusGuardConfig: {
             apiPath: 'orchestrator',
@@ -118,11 +133,15 @@ const routes: Routes = [
           breadcrumbs: 'Cluster/Services'
         },
         children: [
-          { path: '', component: ServicesComponent },
           {
             path: URLVerbs.CREATE,
             component: ServiceFormComponent,
-            data: { breadcrumbs: ActionLabels.CREATE }
+            outlet: 'modal'
+          },
+          {
+            path: `${URLVerbs.EDIT}/:type/:name`,
+            component: ServiceFormComponent,
+            outlet: 'modal'
           }
         ]
       },
@@ -361,7 +380,8 @@ const routes: Routes = [
   imports: [
     RouterModule.forRoot(routes, {
       useHash: true,
-      preloadingStrategy: PreloadAllModules
+      preloadingStrategy: PreloadAllModules,
+      relativeLinkResolution: 'legacy'
     })
   ],
   exports: [RouterModule],