]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/dashboard: Cleanup
authorPatrick Nawracay <pnawracay@suse.com>
Mon, 29 Oct 2018 08:59:59 +0000 (09:59 +0100)
committerPatrick Nawracay <pnawracay@suse.com>
Thu, 15 Nov 2018 09:23:02 +0000 (10:23 +0100)
commitf17eff7f444b5f3aaf9944d2f0d2cdd20359f0a0
tree41dc53c1b3889f719f93c7a50d0ae2bfd16d45df
parent3b4970053c05128b87bc88325e0149ebe898c482
mgr/dashboard: Cleanup

- Make a method static instead of keeping it as classmethod
- Fix return type of methods type hint
- Reformat to fit 100 chars max width
- Rename some variables, methods and argument names for a better
  understanding

  Examples:
    - activatedCompression() -> hasCompressionEnabled()
    - extendByItemsForSubmit() -> assignFormFields()
        - api -> fieldName
        - name -> formControlName
        - fn -> replaceFn
        - edit -> editable
- Extract type declaration to interface and adapted the code to use
  that interface
- Replace unused nearly-global variables with local ones
- Add types where missing and appropriate
  Exmaples:
    - PoolService::getInfo() -> Observable<PoolFormInfo>
- Moved model declaration to shared directory
- Added documentation for a method which isn't that easy to understand

Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
src/pybind/mgr/dashboard/controllers/pool.py
src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form-info.ts [deleted file]
src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/erasure-code-profile.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/pool.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/models/pool-form-info.ts [new file with mode: 0644]