mirror of https://github.com/OpenVidu/openvidu.git
openvidu-dashboard: the Analytics title names a node scope by its media node label
parent
d1b3063b38
commit
8d808f63b6
|
|
@ -407,6 +407,14 @@ describe('AnalyticsPage', () => {
|
||||||
expect(text(identities?.querySelector('.chart-heading + .chart-note'))).toBe('per UTC day');
|
expect(text(identities?.querySelector('.chart-heading + .chart-note'))).toBe('per UTC day');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('names a node scope in the title by its media node label', async () => {
|
||||||
|
const { element } = await open('/analytics?from=now-24h&to=now&tz=UTC&scope=node:media-node-10-0-1-23', [
|
||||||
|
'per-node-breakdown'
|
||||||
|
]);
|
||||||
|
|
||||||
|
expect(text(element.querySelector('h1'))).toBe('Analytics · media-node-10-0-1-23');
|
||||||
|
});
|
||||||
|
|
||||||
it('locks the PRO strip on CE without any PRO request', async () => {
|
it('locks the PRO strip on CE without any PRO request', async () => {
|
||||||
const { requests, element, http } = await open('/analytics?from=now-24h&to=now&tz=UTC');
|
const { requests, element, http } = await open('/analytics?from=now-24h&to=now&tz=UTC');
|
||||||
const locks = [...element.querySelectorAll('ovd-pro-lock-overlay')].map(text);
|
const locks = [...element.querySelectorAll('ovd-pro-lock-overlay')].map(text);
|
||||||
|
|
|
||||||
|
|
@ -262,8 +262,9 @@ export class AnalyticsPage implements AnalyticsPageContext {
|
||||||
readonly mediaStats = computed(() => this.summary()?.mediaStats);
|
readonly mediaStats = computed(() => this.summary()?.mediaStats);
|
||||||
protected readonly mediaStatsTexts = RANGE_MEDIA_STATS;
|
protected readonly mediaStatsTexts = RANGE_MEDIA_STATS;
|
||||||
|
|
||||||
|
/** "Analytics", or "Analytics · <media node label>" for a node scope. */
|
||||||
protected readonly title = computed(() =>
|
protected readonly title = computed(() =>
|
||||||
this.scope() === 'global' ? 'Analytics' : `Analytics · ${this.scope()}`
|
this.scope() === 'global' ? 'Analytics' : `Analytics · ${this.scope().replace(/^node:/, '')}`
|
||||||
);
|
);
|
||||||
/** Names what `auto` resolves to for the range, whatever value is selected. */
|
/** Names what `auto` resolves to for the range, whatever value is selected. */
|
||||||
protected readonly autoLabel = computed(() => {
|
protected readonly autoLabel = computed(() => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue