]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/dashboard: Relocate empty pipe
authorVolker Theile <vtheile@suse.com>
Fri, 22 Feb 2019 13:46:38 +0000 (14:46 +0100)
committerVolker Theile <vtheile@suse.com>
Wed, 27 Feb 2019 11:38:44 +0000 (12:38 +0100)
Move empty pipe into shared/pipes directory.

Signed-off-by: Volker Theile <vtheile@suse.com>
src/pybind/mgr/dashboard/frontend/src/app/core/auth/role-list/role-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-list/user-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/empty.pipe.spec.ts [deleted file]
src/pybind/mgr/dashboard/frontend/src/app/shared/empty.pipe.ts [deleted file]
src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/empty.pipe.spec.ts [new file with mode: 0644]
src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/empty.pipe.ts [new file with mode: 0644]
src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/pipes.module.ts

index 007f4bbbea8af2429af5869298389b7d35749cd3..ba7c1e9cff25283fca7867b8f67f0ebcfaf32788 100644 (file)
@@ -7,13 +7,13 @@ import { forkJoin } from 'rxjs';
 import { RoleService } from '../../../shared/api/role.service';
 import { ScopeService } from '../../../shared/api/scope.service';
 import { CriticalConfirmationModalComponent } from '../../../shared/components/critical-confirmation-modal/critical-confirmation-modal.component';
-import { EmptyPipe } from '../../../shared/empty.pipe';
 import { CellTemplate } from '../../../shared/enum/cell-template.enum';
 import { NotificationType } from '../../../shared/enum/notification-type.enum';
 import { CdTableAction } from '../../../shared/models/cd-table-action';
 import { CdTableColumn } from '../../../shared/models/cd-table-column';
 import { CdTableSelection } from '../../../shared/models/cd-table-selection';
 import { Permission } from '../../../shared/models/permissions';
+import { EmptyPipe } from '../../../shared/pipes/empty.pipe';
 import { AuthStorageService } from '../../../shared/services/auth-storage.service';
 import { NotificationService } from '../../../shared/services/notification.service';
 
index 8ef93957cd2a26af63456c3da2e932a37f8b15b8..800e54c72a6e071c020b155e74472ed4c84e3c64 100644 (file)
@@ -5,12 +5,12 @@ import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal';
 
 import { UserService } from '../../../shared/api/user.service';
 import { CriticalConfirmationModalComponent } from '../../../shared/components/critical-confirmation-modal/critical-confirmation-modal.component';
-import { EmptyPipe } from '../../../shared/empty.pipe';
 import { NotificationType } from '../../../shared/enum/notification-type.enum';
 import { CdTableAction } from '../../../shared/models/cd-table-action';
 import { CdTableColumn } from '../../../shared/models/cd-table-column';
 import { CdTableSelection } from '../../../shared/models/cd-table-selection';
 import { Permission } from '../../../shared/models/permissions';
+import { EmptyPipe } from '../../../shared/pipes/empty.pipe';
 import { AuthStorageService } from '../../../shared/services/auth-storage.service';
 import { NotificationService } from '../../../shared/services/notification.service';
 
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/empty.pipe.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/empty.pipe.spec.ts
deleted file mode 100644 (file)
index 4629079..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-import { EmptyPipe } from './empty.pipe';
-
-describe('EmptyPipe', () => {
-  const pipe = new EmptyPipe();
-
-  it('create an instance', () => {
-    expect(pipe).toBeTruthy();
-  });
-
-  it('transforms with empty value', () => {
-    const value = undefined;
-    expect(pipe.transform(value)).toBe('-');
-  });
-
-  it('transforms with some value', () => {
-    const value = 'foo';
-    expect(pipe.transform(value)).toBe('foo');
-  });
-});
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/empty.pipe.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/empty.pipe.ts
deleted file mode 100644 (file)
index 7ee51b6..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-import { Pipe, PipeTransform } from '@angular/core';
-
-import * as _ from 'lodash';
-
-@Pipe({
-  name: 'empty'
-})
-export class EmptyPipe implements PipeTransform {
-  transform(value: any): any {
-    return _.isUndefined(value) || _.isNull(value) ? '-' : value;
-  }
-}
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/empty.pipe.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/empty.pipe.spec.ts
new file mode 100644 (file)
index 0000000..4629079
--- /dev/null
@@ -0,0 +1,19 @@
+import { EmptyPipe } from './empty.pipe';
+
+describe('EmptyPipe', () => {
+  const pipe = new EmptyPipe();
+
+  it('create an instance', () => {
+    expect(pipe).toBeTruthy();
+  });
+
+  it('transforms with empty value', () => {
+    const value = undefined;
+    expect(pipe.transform(value)).toBe('-');
+  });
+
+  it('transforms with some value', () => {
+    const value = 'foo';
+    expect(pipe.transform(value)).toBe('foo');
+  });
+});
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/empty.pipe.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/empty.pipe.ts
new file mode 100644 (file)
index 0000000..7ee51b6
--- /dev/null
@@ -0,0 +1,12 @@
+import { Pipe, PipeTransform } from '@angular/core';
+
+import * as _ from 'lodash';
+
+@Pipe({
+  name: 'empty'
+})
+export class EmptyPipe implements PipeTransform {
+  transform(value: any): any {
+    return _.isUndefined(value) || _.isNull(value) ? '-' : value;
+  }
+}
index 8ca806514b7db6a8520a4359c4d728dedc4e2781..0e53746f9d6bfe62d3263a6023d750d101080c3d 100644 (file)
@@ -1,13 +1,13 @@
 import { CommonModule, DatePipe } from '@angular/common';
 import { NgModule } from '@angular/core';
 
-import { EmptyPipe } from '../empty.pipe';
 import { CdDatePipe } from './cd-date.pipe';
 import { CephReleaseNamePipe } from './ceph-release-name.pipe';
 import { CephShortVersionPipe } from './ceph-short-version.pipe';
 import { DimlessBinaryPerSecondPipe } from './dimless-binary-per-second.pipe';
 import { DimlessBinaryPipe } from './dimless-binary.pipe';
 import { DimlessPipe } from './dimless.pipe';
+import { EmptyPipe } from './empty.pipe';
 import { EncodeUriPipe } from './encode-uri.pipe';
 import { FilterPipe } from './filter.pipe';
 import { HealthColorPipe } from './health-color.pipe';