]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard_v2: Rename "host" module to "cluster"
authorRicardo Marques <rimarques@suse.com>
Tue, 30 Jan 2018 23:12:53 +0000 (23:12 +0000)
committerRicardo Dias <rdias@suse.com>
Mon, 5 Mar 2018 13:07:03 +0000 (13:07 +0000)
Signed-off-by: Ricardo Marques <rimarques@suse.com>
17 files changed:
src/pybind/mgr/dashboard_v2/frontend/src/app/app-routing.module.ts
src/pybind/mgr/dashboard_v2/frontend/src/app/app.component.spec.ts
src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/ceph.module.ts
src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/cluster/cluster.module.ts [new file with mode: 0644]
src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/cluster/hosts/hosts.component.html [new file with mode: 0644]
src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/cluster/hosts/hosts.component.scss [new file with mode: 0644]
src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/cluster/hosts/hosts.component.spec.ts [new file with mode: 0644]
src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/cluster/hosts/hosts.component.ts [new file with mode: 0644]
src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/cluster/service-list.pipe.spec.ts [new file with mode: 0644]
src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/cluster/service-list.pipe.ts [new file with mode: 0644]
src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/host/host.module.ts [deleted file]
src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/host/hosts/hosts.component.html [deleted file]
src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/host/hosts/hosts.component.scss [deleted file]
src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/host/hosts/hosts.component.spec.ts [deleted file]
src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/host/hosts/hosts.component.ts [deleted file]
src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/host/service-list.pipe.spec.ts [deleted file]
src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/host/service-list.pipe.ts [deleted file]

index b65f2b24fa61ccdafd7c6b8c3c3f0d68358c16d8..1b15ceac9bdd530cac19e544604ced7ea470f1bc 100644 (file)
@@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
 import { Routes, RouterModule } from '@angular/router';
 import { AuthGuardService } from './shared/services/auth-guard.service';
 import { LoginComponent } from './core/auth/login/login.component';
-import { HostsComponent } from './ceph/host/hosts/hosts.component';
+import { HostsComponent } from './ceph/cluster/hosts/hosts.component';
 
 const routes: Routes = [
   { path: '', redirectTo: 'hosts', pathMatch: 'full' },
index b7962ab6948ac9aba54e07cc445d12d233440be4..a68678ca811fc8e4b68de4a05afb188eff72d1b6 100644 (file)
@@ -4,7 +4,7 @@ import { AppComponent } from './app.component';
 import { CoreModule } from './core/core.module';
 import { SharedModule } from './shared/shared.module';
 import { ToastModule } from 'ng2-toastr';
-import { HostModule } from './ceph/host/host.module';
+import { ClusterModule } from './ceph/cluster/cluster.module';
 
 describe('AppComponent', () => {
   beforeEach(async(() => {
@@ -14,7 +14,7 @@ describe('AppComponent', () => {
         CoreModule,
         SharedModule,
         ToastModule.forRoot(),
-        HostModule
+        ClusterModule
       ],
       declarations: [
         AppComponent
index 6a8eda9a78e98d41f71e98eaaf89fe9279576f5e..74a88bd9b89e66534817c3901c5d942f59e1e09c 100644 (file)
@@ -1,11 +1,11 @@
 import { NgModule } from '@angular/core';
 import { CommonModule } from '@angular/common';
-import { HostModule } from './host/host.module';
+import { ClusterModule } from './cluster/cluster.module';
 
 @NgModule({
   imports: [
     CommonModule,
-    HostModule
+    ClusterModule
   ],
   declarations: []
 })
diff --git a/src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/cluster/cluster.module.ts b/src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/cluster/cluster.module.ts
new file mode 100644 (file)
index 0000000..439f184
--- /dev/null
@@ -0,0 +1,15 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+
+import { HostsComponent } from './hosts/hosts.component';
+import { SharedModule } from '../../shared/shared.module';
+import { ServiceListPipe } from './service-list.pipe';
+
+@NgModule({
+  imports: [
+    CommonModule,
+    SharedModule
+  ],
+  declarations: [HostsComponent, ServiceListPipe],
+})
+export class ClusterModule { }
diff --git a/src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/cluster/hosts/hosts.component.html b/src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/cluster/hosts/hosts.component.html
new file mode 100644 (file)
index 0000000..a273491
--- /dev/null
@@ -0,0 +1,28 @@
+<table class="table table-bordered">
+  <thead>
+  <tr>
+    <th>
+      Hostname
+    </th>
+    <th>
+      Services
+    </th>
+    <th>
+      Version
+    </th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr *ngFor="let host of hosts">
+    <td>
+      {{ host.hostname }}
+    </td>
+    <td>
+      {{ host.services | serviceList }}
+    </td>
+    <td>
+      {{ host.ceph_version | cephShortVersion }}
+    </td>
+  </tr>
+  </tbody>
+</table>
diff --git a/src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/cluster/hosts/hosts.component.scss b/src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/cluster/hosts/hosts.component.scss
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/cluster/hosts/hosts.component.spec.ts b/src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/cluster/hosts/hosts.component.spec.ts
new file mode 100644 (file)
index 0000000..2f294d7
--- /dev/null
@@ -0,0 +1,35 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { HostsComponent } from './hosts.component';
+import { ServiceListPipe } from '../service-list.pipe';
+import { SharedModule } from '../../../shared/shared.module';
+import { HttpClientTestingModule } from '@angular/common/http/testing';
+
+describe('HostsComponent', () => {
+  let component: HostsComponent;
+  let fixture: ComponentFixture<HostsComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      imports: [
+        SharedModule,
+        HttpClientTestingModule
+      ],
+      declarations: [
+        HostsComponent,
+        ServiceListPipe
+      ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(HostsComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/cluster/hosts/hosts.component.ts b/src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/cluster/hosts/hosts.component.ts
new file mode 100644 (file)
index 0000000..99e4aea
--- /dev/null
@@ -0,0 +1,21 @@
+import { Component, OnInit } from '@angular/core';
+import { HostService } from '../../../shared/services/host.service';
+
+@Component({
+  selector: 'cd-hosts',
+  templateUrl: './hosts.component.html',
+  styleUrls: ['./hosts.component.scss']
+})
+export class HostsComponent implements OnInit {
+
+  hosts: any = [];
+
+  constructor(private hostService: HostService) { }
+
+  ngOnInit() {
+    this.hostService.list().then((resp) => {
+      this.hosts = resp;
+    });
+  }
+
+}
diff --git a/src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/cluster/service-list.pipe.spec.ts b/src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/cluster/service-list.pipe.spec.ts
new file mode 100644 (file)
index 0000000..6edc89d
--- /dev/null
@@ -0,0 +1,8 @@
+import { ServiceListPipe } from './service-list.pipe';
+
+describe('ServiceListPipe', () => {
+  it('create an instance', () => {
+    const pipe = new ServiceListPipe();
+    expect(pipe).toBeTruthy();
+  });
+});
diff --git a/src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/cluster/service-list.pipe.ts b/src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/cluster/service-list.pipe.ts
new file mode 100644 (file)
index 0000000..aa66a13
--- /dev/null
@@ -0,0 +1,14 @@
+import { Pipe, PipeTransform } from '@angular/core';
+
+@Pipe({
+  name: 'serviceList'
+})
+export class ServiceListPipe implements PipeTransform {
+  transform(value: any, args?: any): any {
+    const strings = [];
+    value.forEach((server) => {
+      strings.push(server.type + '.' + server.id);
+    });
+    return strings.join(', ');
+  }
+}
diff --git a/src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/host/host.module.ts b/src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/host/host.module.ts
deleted file mode 100644 (file)
index c6055ae..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-import { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-
-import { HostsComponent } from './hosts/hosts.component';
-import { SharedModule } from '../../shared/shared.module';
-import { ServiceListPipe } from './service-list.pipe';
-
-@NgModule({
-  imports: [
-    CommonModule,
-    SharedModule
-  ],
-  declarations: [HostsComponent, ServiceListPipe],
-})
-export class HostModule { }
diff --git a/src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/host/hosts/hosts.component.html b/src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/host/hosts/hosts.component.html
deleted file mode 100644 (file)
index a273491..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<table class="table table-bordered">
-  <thead>
-  <tr>
-    <th>
-      Hostname
-    </th>
-    <th>
-      Services
-    </th>
-    <th>
-      Version
-    </th>
-  </tr>
-  </thead>
-  <tbody>
-  <tr *ngFor="let host of hosts">
-    <td>
-      {{ host.hostname }}
-    </td>
-    <td>
-      {{ host.services | serviceList }}
-    </td>
-    <td>
-      {{ host.ceph_version | cephShortVersion }}
-    </td>
-  </tr>
-  </tbody>
-</table>
diff --git a/src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/host/hosts/hosts.component.scss b/src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/host/hosts/hosts.component.scss
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/host/hosts/hosts.component.spec.ts b/src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/host/hosts/hosts.component.spec.ts
deleted file mode 100644 (file)
index 2f294d7..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { HostsComponent } from './hosts.component';
-import { ServiceListPipe } from '../service-list.pipe';
-import { SharedModule } from '../../../shared/shared.module';
-import { HttpClientTestingModule } from '@angular/common/http/testing';
-
-describe('HostsComponent', () => {
-  let component: HostsComponent;
-  let fixture: ComponentFixture<HostsComponent>;
-
-  beforeEach(async(() => {
-    TestBed.configureTestingModule({
-      imports: [
-        SharedModule,
-        HttpClientTestingModule
-      ],
-      declarations: [
-        HostsComponent,
-        ServiceListPipe
-      ]
-    })
-    .compileComponents();
-  }));
-
-  beforeEach(() => {
-    fixture = TestBed.createComponent(HostsComponent);
-    component = fixture.componentInstance;
-    fixture.detectChanges();
-  });
-
-  it('should create', () => {
-    expect(component).toBeTruthy();
-  });
-});
diff --git a/src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/host/hosts/hosts.component.ts b/src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/host/hosts/hosts.component.ts
deleted file mode 100644 (file)
index 99e4aea..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { HostService } from '../../../shared/services/host.service';
-
-@Component({
-  selector: 'cd-hosts',
-  templateUrl: './hosts.component.html',
-  styleUrls: ['./hosts.component.scss']
-})
-export class HostsComponent implements OnInit {
-
-  hosts: any = [];
-
-  constructor(private hostService: HostService) { }
-
-  ngOnInit() {
-    this.hostService.list().then((resp) => {
-      this.hosts = resp;
-    });
-  }
-
-}
diff --git a/src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/host/service-list.pipe.spec.ts b/src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/host/service-list.pipe.spec.ts
deleted file mode 100644 (file)
index 6edc89d..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-import { ServiceListPipe } from './service-list.pipe';
-
-describe('ServiceListPipe', () => {
-  it('create an instance', () => {
-    const pipe = new ServiceListPipe();
-    expect(pipe).toBeTruthy();
-  });
-});
diff --git a/src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/host/service-list.pipe.ts b/src/pybind/mgr/dashboard_v2/frontend/src/app/ceph/host/service-list.pipe.ts
deleted file mode 100644 (file)
index aa66a13..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-import { Pipe, PipeTransform } from '@angular/core';
-
-@Pipe({
-  name: 'serviceList'
-})
-export class ServiceListPipe implements PipeTransform {
-  transform(value: any, args?: any): any {
-    const strings = [];
-    value.forEach((server) => {
-      strings.push(server.type + '.' + server.id);
-    });
-    return strings.join(', ');
-  }
-}