Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

octopus: mgr/dashboard: add popover list of Stand-by Managers & Metadata Servers (MDS) in landing page #34205

Closed
wants to merge 202 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
202 commits
Select commit Hold shift + click to select a range
21b17b7
doc: operating.rst update
Dmole Jan 29, 2020
4872968
crypto/openssl: update to use evp functions
Jan 8, 2020
0c0d07f
OSD: make pglog related "logv" parameters rvalue references
Feb 19, 2020
6c73c0a
crimson: add pglog related logic to crimson's data write path
Feb 10, 2020
b4cd736
kv/RocksDBStore: avoid using global `g_ceph_context`
tchaikov Feb 21, 2020
33b6931
os/bluestore: avoid using global `g_ceph_context`
tchaikov Feb 21, 2020
6a09f1a
os/filestore: avoid using global `g_ceph_context`
tchaikov Feb 21, 2020
a4ec060
doc/dev/log_based_pg.rst: fix names of configurables.
rzarzynski Feb 27, 2020
a369e6c
librbd/BlockGuard: refine comment to be easy understood
changchengx Mar 3, 2020
bc8f37a
librbd/BlockGuard: explicit BlockGuard is right exclusive
changchengx Mar 3, 2020
bb5d983
librbd: fix block extents issue of rwl writeback cache
yison Mar 4, 2020
8fe44f6
test/librbd: avoid copying a byte unnecessarily
pponnuvel Mar 2, 2020
89a2ade
rgw:STSLite documentation correction
kapandya Mar 3, 2020
9f6c764
qa/tasks/cephfs: get rid of StringIO for py3
Dec 16, 2019
875b45f
qa/tasks/cephfs/kernel_mount: get rid of StringIO.StringIO for py3
Dec 16, 2019
ac2fa95
qa/tasks/ceph_fuse: fix import for py3
Dec 16, 2019
7b72097
qa/tasks/rbd: get rid of cStringIO for py3
Feb 15, 2020
db7ae8e
qa/tasks/rbd_fio: get rid of StringIO for py3
Mar 5, 2020
eec9479
qa/tasks/rgw: fix imports for py3
Feb 15, 2020
08b8300
qa/tasks/radosgw_admin: fix tab inconsistancy
Dec 16, 2019
0a22499
qa/tasks/radosgw_admin: get rid of cStringIO for py3
Feb 21, 2020
b3e42cf
qa/tasks/ragweed: get rid of itervalues for py3
Feb 15, 2020
f0c5f56
qa/tasks/ragweed: get rid of cString for py3
Feb 15, 2020
4cf205f
qa/tasks/rgw_logsocket: get rid of cStringIO for py3
Feb 15, 2020
683421e
qa/tasks/util/rgw: get rid of cString for py3
Feb 15, 2020
478083e
qa/tasks/s3tests: py3 compat
Feb 15, 2020
b0bafd1
qa/tasks/s3tests_java: get rid of cStringIO
Feb 21, 2020
b23ae40
qa/tasks/devstack: get rid of cStringIO
Dec 16, 2019
09ae86a
qa/tasks/devstack: use six.StringIO for py3 compat
Mar 5, 2020
06f22a3
qa/tasks/kclient: fix import for py3
Dec 16, 2019
dcf85e4
qa/tasks/keystone: get rid of cStringIO for py3
Feb 21, 2020
e7473b6
qa/tasks/mgr: fix imports for py3
Feb 15, 2020
914c081
qa/tasks/qemu: get rid of cStringIO for py3
Feb 21, 2020
fd7cb3d
rpm: drop "is_opensuse" conditional in SUSE-specific bcond block
smithfarm Mar 6, 2020
c6d71eb
ceph-volume: available_lvm: vg space takes precedence
Mar 4, 2020
4a81b4a
use extent count for slots conversion instead of free count
Mar 4, 2020
61f0c3a
ceph-volume: pass *-slots arguments to LV creation
Mar 2, 2020
215facf
osdc: Build target 'common' without using namespace in headers
adamemerson Mar 7, 2020
3499daa
osd: Build target 'common' without using namespace in headers
adamemerson Mar 7, 2020
ed3ec4c
msg: Build target 'common' without using namespace in headers
adamemerson Mar 7, 2020
7985b61
messages: Build target 'common' without using namespace in headers
adamemerson Mar 7, 2020
189cf36
mds: Build target 'common' without using namespace in headers
adamemerson Mar 7, 2020
aa516b4
common: Build target 'common' without using namespace in headers
adamemerson Mar 7, 2020
08326d4
include: Build target 'common' without using namespace in headers
adamemerson Mar 7, 2020
04eb9dd
auth: Build target 'common' without using namespace in headers
adamemerson Mar 7, 2020
b9a0b5f
auth: Build target 'common' without using namespace in headers
adamemerson Mar 7, 2020
4ccebbf
mgr: Build target 'common' without using namespace in headers
adamemerson Mar 7, 2020
c3e369c
os: Build target 'common' without using namespace in headers
adamemerson Mar 7, 2020
dc1d025
script/backport-create-issue: start backporting to octopus
smithfarm Mar 9, 2020
50cf889
Merge pull request #33196 from xxhdx1985126/wip-crimson-pglog-to-pr
tchaikov Mar 9, 2020
499a4e5
Merge pull request #33712 from yison/rwl-fix-block-extents-issue
Mar 9, 2020
797ed05
Merge pull request #33681 from changchengx/blockguard_right_exclusive
Mar 9, 2020
e06946b
Merge pull request #33676 from pponnuvel/strncpy_avoid_one_byte_copy
Mar 9, 2020
21508bd
mon/OSDMonitor: add flag `--yes-i-really-mean-it` for setting pool si…
Feb 12, 2020
6117a0d
Merge pull request #33281 from ideepika/wip-set-osd-pool-size-extra-p…
neha-ojha Mar 10, 2020
eb488f8
Merge pull request #33458 from tchaikov/wip-test-objectstore
tchaikov Mar 10, 2020
241bb59
erasure-code: enable isa-l EC for aarch64 platform
Nov 28, 2019
441aa36
Bump the version of isa-l to v2.29.0
Mar 10, 2020
b51f49b
compressor/zlib: CMakeLists adaptation with isa-l v2.29.0
Mar 10, 2020
ac9383a
Merge pull request #33819 from smithfarm/wip-bci-octopus
smithfarm Mar 10, 2020
7400177
crimson/mgr: s/tick/report/
tchaikov Mar 10, 2020
9318c18
crimson/mgr: reconnect in ms_handle_reset()
tchaikov Mar 10, 2020
f6caf6d
cls/rbd: use explicitly sized integer in mirror status summary
Mar 9, 2020
3b9f99c
vstart_runner.py: fix OSError when checking if non-existent path is m…
alfonsomthd Mar 10, 2020
a1c4598
Merge pull request #33778 from smithfarm/wip-drop-is_opensuse
smithfarm Mar 10, 2020
e978412
crimson: extract formatter for time_point types
tchaikov Mar 10, 2020
7e30c26
mgr/dashboard: NoRebalance flag is added to the Dashboard
nizamial09 Mar 10, 2020
e7f10d4
Merge pull request #33582 from rzarzynski/wip-doc-fix-confignames-log…
rzarzynski Mar 10, 2020
d0db97d
Merge pull request #32963 from Dmole/patch-1
gregsfortytwo Mar 10, 2020
100c375
Merge pull request #33849 from tchaikov/wip-crimson-fmt-time-point
tchaikov Mar 11, 2020
c39f46f
Merge pull request #33844 from tchaikov/wip-crimson-mgr-reconnect
tchaikov Mar 11, 2020
dae9bf3
msg/async: fix log information
dragonylffly Mar 11, 2020
bf6df4b
Merge pull request #33862 from rhcs-dashboard/norebalance_flag_dashboard
Mar 11, 2020
27a2bbb
mgr/dashboard: Pool read/write OPS shows too many decimal places
Mar 11, 2020
1183f26
admin/build-doc: pass -rpath to linker
tchaikov Mar 11, 2020
b9e282f
admin/build-doc: use "ceph" for prefix of functions defined by libcephfs
tchaikov Mar 11, 2020
8fd63d2
Merge pull request #32262 from kshtsk/wip-ceph-py-py3
tchaikov Mar 11, 2020
3bc9e0d
Merge pull request #33888 from tchaikov/doc-libcephfs-link
tchaikov Mar 11, 2020
6033836
Merge PR #33885 into master
liewegas Mar 11, 2020
20d21cf
mds: fix 'if there is lock cache on dir' check
ukernel Mar 5, 2020
3ed616c
Merge pull request #32675 from rosinL/openssl-evp
tchaikov Mar 12, 2020
7899186
tools/rados: use object-locator in user-visible outputs
tchaikov Mar 12, 2020
a7e29b0
mgr,python-common: drop modules for python2 in requirements.txt
tchaikov Mar 12, 2020
a44de38
mgr_util: add CephfsClient implementation
Dec 18, 2019
3ec5bec
mgr/rook: be less chatty when working
tchaikov Mar 12, 2020
0ba9948
cmake: lift if(WITH_MGR_ROOK_CLIENT) to upper directory
tchaikov Mar 12, 2020
bbc0fdd
cmake: do not rerun generate_rook_ceph_client.sh everytime
tchaikov Mar 12, 2020
ab772c5
doc: Fix three link errors about mount cephfs
s1eke Mar 10, 2020
cdfeb1d
mgr/dashboard: add popover list of managers in landing page
avanthakkar Feb 25, 2020
51f6f64
mgr_util: rename ConnectionPool -> CephfsConnectionPool
Mar 12, 2020
a6e72c9
Merge pull request #33842 from s1eke/master
tchaikov Mar 12, 2020
8c94c21
mgr_util: move is_stopping from VolumeClient to CephfsClient
Mar 12, 2020
c7de31d
cmake: use specified python for running node-gyp
tchaikov Mar 12, 2020
69caa2e
Merge pull request #33906 from tchaikov/wip-no-req-for-python2
tchaikov Mar 12, 2020
c092af0
Merge pull request #33887 from rhcs-dashboard/39714-decimal-places
Mar 12, 2020
67780ef
crimson/mgr: include necessary header
tchaikov Mar 12, 2020
6158bcf
seastar: pickup change to always enable smp poller
tchaikov Mar 12, 2020
31a1ac7
Merge pull request #33918 from tchaikov/wip-seastar
tchaikov Mar 13, 2020
ac8f51b
Merge remote-tracking branch 'gh/octopus'
liewegas Mar 13, 2020
d244ca1
Merge pull request #33921 from tchaikov/wip-cmake-node-gyp
tchaikov Mar 13, 2020
d47a319
Merge pull request #33653 from TRYTOBE8TME/wip-rgw-sts-doc-correction
cbodley Mar 13, 2020
fae60f6
Merge pull request #33828 from dillaman/wip-cls-rbd-mirror-status-sum…
trociny Mar 14, 2020
e5cc8c2
pybind/cephfs: support MacOS
tchaikov Mar 15, 2020
051fa3d
pybind: move linker flags out of "libraries"
tchaikov Mar 15, 2020
e88f8ee
admin/install-doc: error out if missing deps
tchaikov Mar 15, 2020
ea67a42
admin/build-doc: drop --no-as-needed on Darwin
tchaikov Mar 15, 2020
c20e074
admin/build-doc: add optional "_" prefix before function names to match
tchaikov Mar 15, 2020
58270eb
admin/build-doc: add dot to the check list
tchaikov Mar 15, 2020
cb3bff0
crimson/asok: pass vector<string> to parse_cmd()
tchaikov Mar 10, 2020
b6a932a
crimson/osd: add tell command support
tchaikov Mar 10, 2020
26d3e3e
crimson/admin: drop unused functions
tchaikov Mar 10, 2020
a19a81e
crimson/admin: revise doxygen docs
tchaikov Mar 11, 2020
6421605
Merge pull request #33847 from tchaikov/wip-crimson-tell
tchaikov Mar 16, 2020
6ec153f
mgr/dashboard: Improve iSCSI CHAP messages
ricardoasmarques Mar 5, 2020
cf01ccc
Merge pull request #33856 from rhcs-dashboard/44545-fix-vstart-runner
Mar 16, 2020
7f0c3c4
Merge remote-tracking branch 'gh/octopus'
liewegas Mar 16, 2020
155c44b
osd/PeeringState: fix pending want_acting vs osd offline race
xiexingguo Mar 12, 2020
fb88d3f
Merge pull request #33907 from tchaikov/wip-cmake-mgr-rook-client
tchaikov Mar 17, 2020
cf16d37
crimson/os/heartbeat: report peer failure to monitors
Mar 8, 2020
3e7ea7b
Merge pull request #33836 from xxhdx1985126/wip-crimson-osd-report-fa…
tchaikov Mar 17, 2020
c59c4b1
NVMEDevice: set the queue_size of the ctrlr opts.
Mar 16, 2020
3b6fc96
Merge pull request #33984 from optimistyzy/316_increase_que_size_upst…
tchaikov Mar 17, 2020
bd08daa
mgr/dashboard: Update prettier
Mar 5, 2020
293e8bd
ceph.spec.in: add build deps for Debug build of seastar
tchaikov Mar 18, 2020
cb20e2b
doc/rbd: s/use use/use/
grinapo Mar 17, 2020
32bcb79
Merge pull request #34010 from grinapo/patch-1
tchaikov Mar 18, 2020
921199b
Merge pull request #33760 from tspmelo/wip-update-prettier
Mar 18, 2020
d7753e3
Merge pull request #33787 from jan--f/c-v-prepare-slots
jan--f Mar 18, 2020
85abb02
os/bluestore: fix extent leak after main device expand.
ifed01 Mar 18, 2020
e96cfbd
mgr/dashboard: Update Angular and fix npm audits
Mar 12, 2020
6edd1cb
qa/standalone/osd/osd-backfill-stats.sh: get_latest_osdmap to propaga…
neha-ojha Mar 18, 2020
48942dc
Merge pull request #34016 from tchaikov/wip-44658
tchaikov Mar 19, 2020
c93e6d7
crimson/os/heartbeat: make Heartbeat::send_failures() safe
Mar 18, 2020
afdff0c
qa/*/osd-markdown.sh: propagate map to osd before testing its reaction
xiexingguo Mar 19, 2020
e8db5eb
Merge pull request #34017 from xxhdx1985126/wip-crimson-osd-report-fa…
tchaikov Mar 19, 2020
1ee25c2
Merge PR #34047 into master
liewegas Mar 19, 2020
4bdde0f
Merge pull request #33925 from tspmelo/wip-update-npm
Mar 19, 2020
04ee017
mgr/dashboard: add crush rule test suite
Mar 19, 2020
6cb39e4
Merge PR #34060 into master
liewegas Mar 19, 2020
90cb2fe
qa/workunits/cephadm/test_cephadm.sh: fix mon.b failure
mgfritch Mar 19, 2020
74e8d04
doc: fix a spelling error at /doc/radosgw/dynamicresharding.rst
bangmingcheng Mar 20, 2020
7f573bb
build: Add WITH_BOOST_VALGRIND option
adamemerson Mar 18, 2020
22fe7cc
crimson/net: close() with ms_handle_reset()
cyx1231st Mar 12, 2020
0bae2d3
crimson/net: fix incorrect reset events according to async-msgr
cyx1231st Mar 12, 2020
9cb4832
crimson/net: enforce strict reset/accept order
cyx1231st Mar 12, 2020
6c51c7a
crimson/net: cleanup dispatches with connection gate
cyx1231st Mar 12, 2020
434cdd4
crimson/net: change close() to mark_down()
cyx1231st Mar 13, 2020
2092003
crimson/net: allow mark_down() inside ms_handle_reset()
cyx1231st Mar 13, 2020
884c5bb
tests: update Dockerfile to support fc-31
tchaikov Mar 19, 2020
cb12a31
doc/cephadm: replace `osd create` with `apply osd`
sebastian-philipp Mar 20, 2020
f47033a
Merge pull request #34080 from sebastian-philipp/doc-osd-create-osd-a…
sebastian-philipp Mar 20, 2020
bac530f
cephadm: allow config and keyring args for ceph-volume
mgfritch Mar 11, 2020
26b7a3f
qa/workunits/cephadm/test_cephadm.sh: move osd test to ceph-volume
mgfritch Mar 11, 2020
37180bf
Merge pull request #34043 from adamemerson/wip-boost-valgrind
tchaikov Mar 20, 2020
0ae0a4a
Merge pull request #33529 from rhcs-dashboard/wip-42979-fix-hover-issues
avanthakkar Mar 20, 2020
0c02f05
crimson/osd: log Heartbeat::remove_peer before assertion failure
cyx1231st Mar 14, 2020
8c681d2
Merge pull request #32319 from jan--f/pybind-mgr-util-cephfs-con-pool
sebastian-philipp Mar 20, 2020
137f3b3
Merge pull request #33841 from xiexingguo/wip-44507
yuriw Mar 20, 2020
984f3ff
doc: update octopus release notes for rgw
cbodley Mar 18, 2020
647819c
cmake: Don't enable BOOST_USE_VALGRIND when not requested
adamemerson Mar 20, 2020
ec404a9
Merge pull request #34070 from bangmingcheng/wip-doc-ceph-chenbm
xiexingguo Mar 21, 2020
3cac20f
Merge pull request #33976 from tchaikov/wip-build-doc-on-darwin
tchaikov Mar 21, 2020
f617e10
Merge pull request #33903 from tchaikov/wip-rados-object-locator
tchaikov Mar 21, 2020
25ac152
Merge pull request #33796 from adamemerson/wip-using-namespace-common
tchaikov Mar 21, 2020
bb58024
doc: Fix some link errors about ceph-deploy
s1eke Mar 21, 2020
b0dca75
Merge pull request #34056 from xiexingguo/wip-44662
tchaikov Mar 21, 2020
fc5a411
Merge pull request #34097 from adamemerson/wip-boost-use-valgrind-fix
tchaikov Mar 21, 2020
11b8e97
Merge pull request #33869 from mgfritch/cephadm-osd-create-test
tchaikov Mar 21, 2020
d071132
Merge pull request #33883 from dragonylffly/wip-fix-comments
tchaikov Mar 21, 2020
a791177
Merge pull request #34022 from ifed01/wip-ifed-fix-leak-in-expand
tchaikov Mar 21, 2020
71f6db5
Merge pull request #34066 from mgfritch/cephadm-mon-b-test
tchaikov Mar 21, 2020
aa36086
test/msgr/perf_msgr_client.cc: fix misleading total op num
yanghonggang Mar 21, 2020
a1e8f61
tests: Use podman if available
badone Mar 20, 2020
961834c
Merge pull request #34048 from tchaikov/wip-test-docker-fc31
tchaikov Mar 22, 2020
ec362f4
Merge pull request #34071 from badone/wip-docker-test-helper-use-podm…
tchaikov Mar 22, 2020
86de901
cephadm: init config and keyring with None
tchaikov Mar 21, 2020
1ce152f
crimson/admin: do not reset connected_sock before closing
tchaikov Mar 21, 2020
d6ead8b
Merge pull request #32171 from rosinL/wip-ec-isla-aarch64
tchaikov Mar 23, 2020
373e164
crimson/osd: make send_heartbeat() atomic
cyx1231st Mar 14, 2020
e202069
crimson/net: fix incorrect SocketConnection::print()
cyx1231st Mar 16, 2020
d78cbb3
crimson/net: add critical info logs to track and debug racing
cyx1231st Mar 17, 2020
5305cfb
Merge pull request #33909 from cyx1231st/wip-seastar-msgr-fix-reset
tchaikov Mar 23, 2020
5132d98
Merge pull request #34104 from tchaikov/crimson-admin-close
tchaikov Mar 23, 2020
6e91edb
mgr/dashboard: correct Orchestrator documentation link
Mar 23, 2020
e45d96d
Merge pull request #34113 from s0nea/wip-dashboard-orch-docu-link
Mar 23, 2020
b819847
Merge pull request #34063 from s0nea/wip-dashboard-crush-rule-suite
Mar 23, 2020
4a4b737
Merge pull request #33741 from ricardoasmarques/iscsi-password-msg
Mar 23, 2020
de20c7b
Merge PR #34105 into master
liewegas Mar 23, 2020
9daa451
Merge PR #34028 into master
liewegas Mar 23, 2020
cfebec1
qa/*/osd-backfill-recovery-log.sh: flush_pg_stats before checking log…
neha-ojha Mar 22, 2020
04e0b9c
Merge PR #34126 into master
liewegas Mar 23, 2020
895b856
Merge remote-tracking branch 'gh/octopus'
liewegas Mar 24, 2020
ca0978a
Merge pull request #33753 from ukernel/wip-44448
ukernel Mar 24, 2020
3a63884
Merge pull request #34103 from yanghonggang/perf-msgr-client
tchaikov Mar 24, 2020
596565d
Merge pull request #34101 from s1eke/master
tchaikov Mar 24, 2020
3f5a801
Merge pull request #34108 from mgfritch/cephadm-optional-config-keyring
tchaikov Mar 24, 2020
933df97
qa/tasks/mgr/dashboard/test_health: update mdsmap schema
bk201 Mar 24, 2020
afce413
qa/tasks/mgr/dashboard/test_health: ignore fsmap.standbys
bk201 Mar 25, 2020
601f66f
mgr/dashboard: add popover list of managers in landing page
avanthakkar Feb 25, 2020
298127b
Merge branch 'wip-44697-octopus' of github.com:rhcs-dashboard/ceph in…
avanthakkar Apr 2, 2020
f680ba3
Delete CMakeLists.txt
avanthakkar Apr 2, 2020
167255a
Delete PendingReleaseNotes
avanthakkar Apr 2, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/pybind/mgr/dashboard/controllers/health.py
Expand Up @@ -106,15 +106,13 @@ def fs_map(self):
fs_map = mgr.get('fs_map')
if self._minimal:
fs_map = partial_dict(fs_map, ['filesystems', 'standbys'])
fs_map['standbys'] = [{}] * len(fs_map['standbys'])
fs_map['filesystems'] = [partial_dict(item, ['mdsmap']) for
item in fs_map['filesystems']]
for fs in fs_map['filesystems']:
mdsmap_info = fs['mdsmap']['info']
min_mdsmap_info = dict()
for k, v in mdsmap_info.items():
min_mdsmap_info[k] = partial_dict(v, ['state'])
fs['mdsmap'] = dict(info=min_mdsmap_info)
return fs_map

def host_count(self):
Expand All @@ -135,7 +133,6 @@ def mgr_map(self):
mgr_map = mgr.get('mgr_map')
if self._minimal:
mgr_map = partial_dict(mgr_map, ['active_name', 'standbys'])
mgr_map['standbys'] = [{}] * len(mgr_map['standbys'])
return mgr_map

def mon_status(self):
Expand Down
Expand Up @@ -98,11 +98,12 @@
<cd-info-card cardTitle="Metadata Servers"
i18n-cardTitle
class="cd-status-card"
*ngIf="(enabledFeature.cephfs && healthData.fs_map | mdsSummary) as transformedResult"
*ngIf="((enabledFeature.cephfs && healthData.fs_map) | mdsSummary) as transformedResult"
[contentClass]="(transformedResult.length > 1 ? 'text-area-size-2' : '') + ' content-highlight'">
<!-- TODO: check text-area-size-2 -->
<span *ngFor="let result of transformedResult"
[ngClass]="result.class">
[ngClass]="result.class"
[title]="result.titleText != null ? result.titleText : ''">
{{ result.content }}
</span>
</cd-info-card>
Expand Down
Expand Up @@ -39,7 +39,7 @@ cd-info-card {
white-space: pre;
}

.mgr-active-name:hover {
.popover-info:hover {
cursor: pointer;
}

Expand Down
Expand Up @@ -33,7 +33,7 @@ describe('HealthComponent', () => {
mgr_map: { standbys: [] },
hosts: 0,
rgw: 0,
fs_map: { filesystems: [] },
fs_map: { filesystems: [], standbys: [] },
iscsi_daemons: 0,
client_perf: {},
scrub_status: 'Inactive',
Expand Down
Expand Up @@ -20,27 +20,27 @@ describe('MdsSummaryPipe', () => {

it('transforms with 0 active and 2 standy', () => {
const payload = {
standbys: [0],
standbys: [{ name: 'a' }],
filesystems: [{ mdsmap: { info: [{ state: 'up:standby-replay' }] } }]
};
const expected = [
{ class: '', content: '0 active' },
{ class: 'card-text-line-break', content: '' },
{ class: '', content: '2 standby' }
{ class: 'popover-info', content: '0 active', titleText: '1 standbyReplay' },
{ class: 'card-text-line-break', content: '', titleText: '' },
{ class: 'popover-info', content: '2 standby', titleText: 'standby daemons: a' }
];

expect(pipe.transform(payload)).toEqual(expected);
});

it('transforms with 1 active and 1 standy', () => {
const payload = {
standbys: [0],
filesystems: [{ mdsmap: { info: [{ state: 'up:active' }] } }]
standbys: [{ name: 'b' }],
filesystems: [{ mdsmap: { info: [{ state: 'up:active', name: 'a' }] } }]
};
const expected = [
{ class: '', content: '1 active' },
{ class: 'card-text-line-break', content: '' },
{ class: '', content: '1 standby' }
{ class: 'popover-info', content: '1 active', titleText: 'active daemon: a' },
{ class: 'card-text-line-break', content: '', titleText: '' },
{ class: 'popover-info', content: '1 standby', titleText: 'standby daemons: b' }
];
expect(pipe.transform(payload)).toEqual(expected);
});
Expand All @@ -50,17 +50,17 @@ describe('MdsSummaryPipe', () => {
standbys: [0],
filesystems: []
};
const expected = [{ class: '', content: 'no filesystems' }];
const expected = [{ class: 'popover-info', content: 'no filesystems', titleText: '' }];

expect(pipe.transform(payload)).toEqual(expected);
});

it('transforms without filesystem', () => {
const payload = { standbys: [0] };
const payload = { standbys: [{ name: 'a' }] };
const expected = [
{ class: '', content: '1 up' },
{ class: 'card-text-line-break', content: '' },
{ class: '', content: 'no filesystems' }
{ class: 'popover-info', content: '1 up', titleText: '' },
{ class: 'card-text-line-break', content: '', titleText: '' },
{ class: 'popover-info', content: 'no filesystems', titleText: 'standby daemons: a' }
];

expect(pipe.transform(payload)).toEqual(expected);
Expand Down
Expand Up @@ -42,22 +42,39 @@ export class MdsSummaryPipe implements PipeTransform {
contentLine1 = `${active} ${this.i18n('active')}`;
contentLine2 = `${standbys + standbyReplay} ${this.i18n('standby')}`;
}

const standbyHoverText = value.standbys.map((s: any): string => s.name).join(', ');
const standbyTitleText = !standbyHoverText
? ''
: `${this.i18n('standby daemons')}: ${standbyHoverText}`;
const fsLength = value.filesystems ? value.filesystems.length : 0;
const infoObject = fsLength > 0 ? value.filesystems[0].mdsmap.info : {};
const activeHoverText = Object.values(infoObject)
.map((info: any): string => info.name)
.join(', ');
let activeTitleText = !activeHoverText
? ''
: `${this.i18n('active daemon')}: ${activeHoverText}`;
// There is always one standbyreplay to replace active daemon, if active one is down
if (!active && fsLength > 0) {
activeTitleText = `${standbyReplay} ${this.i18n('standbyReplay')}`;
}
const mgrSummary = [
{
content: contentLine1,
class: ''
class: 'popover-info',
titleText: activeTitleText
}
];

if (contentLine2) {
mgrSummary.push({
content: '',
class: 'card-text-line-break'
class: 'card-text-line-break',
titleText: ''
});
mgrSummary.push({
content: contentLine2,
class: ''
class: 'popover-info',
titleText: standbyTitleText
});
}

Expand Down
Expand Up @@ -29,23 +29,23 @@ describe('MgrSummaryPipe', () => {
standbys: []
};
const expected = [
{ class: 'mgr-active-name', content: 'n/a active', titleText: '' },
{ class: 'popover-info', content: 'n/a active', titleText: '' },
{ class: 'card-text-line-break', content: '', titleText: '' },
{ class: '', content: '0 standby', titleText: '' }
{ class: 'popover-info', content: '0 standby', titleText: '' }
];

expect(pipe.transform(payload)).toEqual(expected);
});

it('transforms with 1 active and 2 standbys', () => {
const payload = {
active_name: 'a',
standbys: ['b', 'c']
active_name: 'x',
standbys: [{ name: 'y' }, { name: 'z' }]
};
const expected = [
{ class: 'mgr-active-name', content: '1 active', titleText: 'active daemon: a' },
{ class: 'popover-info', content: '1 active', titleText: 'active daemon: x' },
{ class: 'card-text-line-break', content: '', titleText: '' },
{ class: '', content: '2 standby', titleText: '' }
{ class: 'popover-info', content: '2 standby', titleText: 'standby daemons: y, z' }
];

expect(pipe.transform(payload)).toEqual(expected);
Expand Down
Expand Up @@ -15,18 +15,23 @@ export class MgrSummaryPipe implements PipeTransform {
}

let activeCount = this.i18n('n/a');
const titleText = _.isUndefined(value.active_name)
const activeTitleText = _.isUndefined(value.active_name)
? ''
: `${this.i18n('active daemon')}: ${value.active_name}`;
if (titleText.length > 0) {
// There is always one standbyreplay to replace active daemon, if active one is down
if (activeTitleText.length > 0) {
activeCount = '1';
}
const standbyHoverText = value.standbys.map((s: any): string => s.name).join(', ');
const standbyTitleText = !standbyHoverText
? ''
: `${this.i18n('standby daemons')}: ${standbyHoverText}`;
const standbyCount = value.standbys.length;
const mgrSummary = [
{
content: `${activeCount} ${this.i18n('active')}`,
class: 'mgr-active-name',
titleText: titleText
class: 'popover-info',
titleText: activeTitleText
}
];

Expand All @@ -37,8 +42,8 @@ export class MgrSummaryPipe implements PipeTransform {
});
mgrSummary.push({
content: `${standbyCount} ${this.i18n('standby')}`,
class: '',
titleText: ''
class: 'popover-info',
titleText: standbyTitleText
});

return mgrSummary;
Expand Down