tabby-group-server-stats 1.7.3 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/PUBLISHING.zh-CN.md +7 -5
- package/README.en.md +34 -13
- package/README.md +36 -15
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/presets.json +51 -51
- package/typings/components/bottom-bar.component.d.ts +2 -0
- package/typings/components/settings.component.d.ts +12 -0
- package/typings/config.d.ts +1 -0
- package/typings/display-scope.d.ts +23 -0
- package/typings/index.d.ts +0 -4
- package/typings/metric-display.d.ts +2 -0
- package/typings/metric-model.d.ts +2 -0
- package/typings/preset-library.d.ts +4 -0
- package/typings/services/metric-scope.service.d.ts +19 -0
- package/typings/services/stats.service.d.ts +2 -0
- package/typings/toolbar-button.provider.d.ts +1 -4
|
@@ -10,6 +10,12 @@ interface ScopeChoice {
|
|
|
10
10
|
type: string;
|
|
11
11
|
group: string;
|
|
12
12
|
disambiguator?: string;
|
|
13
|
+
layoutId?: string;
|
|
14
|
+
layoutName?: string;
|
|
15
|
+
profileId?: string;
|
|
16
|
+
connectionIds?: string[];
|
|
17
|
+
path?: number[];
|
|
18
|
+
storedName?: string;
|
|
13
19
|
}
|
|
14
20
|
interface IconPresetChoice {
|
|
15
21
|
name: string;
|
|
@@ -39,6 +45,7 @@ export declare class ServerStatsSettingsComponent {
|
|
|
39
45
|
iconSearch: string;
|
|
40
46
|
iconCategory: string;
|
|
41
47
|
scopeSearch: string;
|
|
48
|
+
collapsedScopeLayouts: Set<string>;
|
|
42
49
|
presets: MetricPreset[];
|
|
43
50
|
loadingPresets: boolean;
|
|
44
51
|
fetchError: boolean;
|
|
@@ -53,12 +60,16 @@ export declare class ServerStatsSettingsComponent {
|
|
|
53
60
|
setScopeMode(mode: 'all' | 'selected'): void;
|
|
54
61
|
private get savedScopeProfiles();
|
|
55
62
|
get scopeChoices(): ScopeChoice[];
|
|
63
|
+
paneNumber(profile: ScopeChoice): string;
|
|
64
|
+
toggleScopeLayout(id: string): void;
|
|
56
65
|
get scopeSelectedProfiles(): Array<ScopeChoice & {
|
|
57
66
|
missing: boolean;
|
|
58
67
|
}>;
|
|
59
68
|
get hasMissingScopeProfiles(): boolean;
|
|
60
69
|
trackScopeChoice(_: number, profile: ScopeChoice): string;
|
|
70
|
+
private scopeChoiceSelected;
|
|
61
71
|
isScopeSelected(id: string): boolean;
|
|
72
|
+
isScopeIndeterminate(id: string): boolean;
|
|
62
73
|
toggleScopeProfile(id: string, selected: boolean): void;
|
|
63
74
|
removeScopeProfile(id: string): void;
|
|
64
75
|
private serializeScope;
|
|
@@ -94,6 +105,7 @@ export declare class ServerStatsSettingsComponent {
|
|
|
94
105
|
newSingle(): void;
|
|
95
106
|
newGroup(): void;
|
|
96
107
|
editGroup(index: number): void;
|
|
108
|
+
editGroupMember(groupIndex: number, memberIndex?: number): void;
|
|
97
109
|
toggleGroupMetric(index: number): void;
|
|
98
110
|
toggleMetricEnabled(index: number): void;
|
|
99
111
|
toggleGroupEnabled(index: number): void;
|
package/typings/config.d.ts
CHANGED
|
@@ -6,6 +6,29 @@ export interface ScopedMetrics {
|
|
|
6
6
|
customMetrics?: CustomMetric[];
|
|
7
7
|
metricGroups?: CustomMetricGroup[];
|
|
8
8
|
}
|
|
9
|
+
export declare const PANE_SCOPE_MARKER = "__tabbyGroupServerStatsPaneId";
|
|
10
|
+
export interface LayoutPaneTarget {
|
|
11
|
+
id: string;
|
|
12
|
+
layoutId: string;
|
|
13
|
+
layoutName: string;
|
|
14
|
+
profileId: string;
|
|
15
|
+
name: string;
|
|
16
|
+
path: number[];
|
|
17
|
+
type: 'layout-pane';
|
|
18
|
+
connectionIds: string[];
|
|
19
|
+
}
|
|
20
|
+
export declare function layoutPaneTargetName(target: LayoutPaneTarget): string;
|
|
21
|
+
/** The path distinguishes repeated occurrences of the same original connection. */
|
|
22
|
+
export declare function layoutPaneId(layoutId: string, path: number[], profileId: string): string;
|
|
23
|
+
/** Visit only split children, not terminal output, options or authentication data. */
|
|
24
|
+
export declare function layoutLeafTokens(token: any): Array<{
|
|
25
|
+
token: any;
|
|
26
|
+
path: number[];
|
|
27
|
+
}>;
|
|
28
|
+
/** UI-safe metadata: a deleted standalone profile remains available inside its layout. */
|
|
29
|
+
export declare function getLayoutPaneTargets(profiles: any[], includeConnectionAliases?: boolean): LayoutPaneTarget[];
|
|
30
|
+
/** Old saved layouts can retain a deleted copy of an otherwise current SSH profile. */
|
|
31
|
+
export declare function resolveProfileScopeIds(profile: any, availableProfiles: any[], effectiveProfile?: (profile: any) => any): string[];
|
|
9
32
|
export declare function matchesScope(scope: DisplayScope | undefined, context: ScopeContext, availableProfiles: any[]): boolean;
|
|
10
33
|
export declare function filterScopedMetrics(config: ScopedMetrics, context: ScopeContext, profiles: any[]): Required<ScopedMetrics>;
|
|
11
34
|
/** Find the leaf that owns a session; never collect sibling profiles or focusedTab from another leaf. */
|
package/typings/index.d.ts
CHANGED
|
@@ -8,8 +8,6 @@ export default class ServerStatsModule {
|
|
|
8
8
|
private appRef;
|
|
9
9
|
private injector;
|
|
10
10
|
private statsService;
|
|
11
|
-
private floatingRef;
|
|
12
|
-
private floatingElem;
|
|
13
11
|
private activeDisplayMode;
|
|
14
12
|
private tabInstances;
|
|
15
13
|
private attachedTabs;
|
|
@@ -29,7 +27,6 @@ export default class ServerStatsModule {
|
|
|
29
27
|
private getDisplayMode;
|
|
30
28
|
private safeRun;
|
|
31
29
|
private applyDisplayMode;
|
|
32
|
-
private createFloatingPanel;
|
|
33
30
|
private initializePerTabBars;
|
|
34
31
|
private ensureGlobalStyle;
|
|
35
32
|
private attachExistingTabs;
|
|
@@ -51,6 +48,5 @@ export default class ServerStatsModule {
|
|
|
51
48
|
private resolveSessionForElement;
|
|
52
49
|
private resolveSessionFromTab;
|
|
53
50
|
private observeTabLifecycle;
|
|
54
|
-
private destroyFloating;
|
|
55
51
|
private teardownAllTabs;
|
|
56
52
|
}
|
|
@@ -8,6 +8,8 @@ export interface DisplayResult {
|
|
|
8
8
|
export declare function isNumericDisplayValue(value: string): boolean;
|
|
9
9
|
/** Convert a KiB/s reading to decimal MB/s with exactly three fractional digits. */
|
|
10
10
|
export declare function formatNetworkRate(value: string): string;
|
|
11
|
+
/** Use the requested capacity label, retaining the existing numbers and thresholds. */
|
|
12
|
+
export declare function formatCapacityUnit(value: string): string;
|
|
11
13
|
export interface NumericRatio {
|
|
12
14
|
numerator: string;
|
|
13
15
|
denominator: string;
|
|
@@ -10,6 +10,8 @@ export interface DisplayScope {
|
|
|
10
10
|
mode: 'all' | 'selected';
|
|
11
11
|
profileIds: string[];
|
|
12
12
|
profileNames?: Record<string, string>;
|
|
13
|
+
/** Explicit per-layout pane opt-outs override a selected connection/layout. */
|
|
14
|
+
excludedProfileIds?: string[];
|
|
13
15
|
}
|
|
14
16
|
export interface CustomMetric {
|
|
15
17
|
id: string;
|
|
@@ -16,6 +16,8 @@ export interface MetricPreset {
|
|
|
16
16
|
group?: CustomMetricGroup;
|
|
17
17
|
/** Portable bindings contain saved profile names, never machine-local IDs. */
|
|
18
18
|
profileNames?: string[];
|
|
19
|
+
/** Portable per-pane opt-outs, resolved before any selected scope can run. */
|
|
20
|
+
excludedProfileNames?: string[];
|
|
19
21
|
source?: {
|
|
20
22
|
name: string;
|
|
21
23
|
url?: string;
|
|
@@ -26,6 +28,8 @@ export interface MetricPreset {
|
|
|
26
28
|
export interface PresetProfile {
|
|
27
29
|
id?: string;
|
|
28
30
|
name?: string;
|
|
31
|
+
type?: string;
|
|
32
|
+
options?: any;
|
|
29
33
|
}
|
|
30
34
|
export interface InstantiatedPreset {
|
|
31
35
|
customMetrics: CustomMetric[];
|
|
@@ -3,12 +3,17 @@ import { AppService, ConfigService, ProfilesService } from 'tabby-core';
|
|
|
3
3
|
import { ScopeContext } from '../display-scope';
|
|
4
4
|
/** A saved layout's origin, persisted in its recovery token, never inferred from titles. */
|
|
5
5
|
export declare const LAYOUT_SCOPE_MARKER = "__tabbyGroupServerStatsLayoutProfileId";
|
|
6
|
+
export declare const INSTANCE_VISIBILITY_MARKER = "__tabbyGroupServerStatsVisibilityId";
|
|
6
7
|
export declare class MetricScopeService implements OnDestroy {
|
|
7
8
|
private config;
|
|
8
9
|
private app;
|
|
9
10
|
private profiles;
|
|
10
11
|
private subscriptions;
|
|
11
12
|
private tokenPatches;
|
|
13
|
+
private paneTargets;
|
|
14
|
+
private legacyPanesObserved;
|
|
15
|
+
private visibilityInstances;
|
|
16
|
+
private visibilityTokenPatches;
|
|
12
17
|
private originalParameters?;
|
|
13
18
|
private wrappedParameters?;
|
|
14
19
|
private destroyed;
|
|
@@ -18,6 +23,20 @@ export declare class MetricScopeService implements OnDestroy {
|
|
|
18
23
|
private observeTabs;
|
|
19
24
|
private preserveRecoveryMarker;
|
|
20
25
|
private releaseTab;
|
|
26
|
+
private rememberPane;
|
|
27
|
+
private paneMarker;
|
|
28
|
+
private privateProfileMarker;
|
|
29
|
+
private visibilityInstance;
|
|
30
|
+
private preserveVisibilityMarker;
|
|
31
|
+
private releaseVisibilityTab;
|
|
32
|
+
/** A layout occurrence is stable across reopen; other panes own recovery-only IDs. */
|
|
33
|
+
visibilityKey(session: any): string | undefined;
|
|
34
|
+
isPaneVisible(session: any): boolean;
|
|
35
|
+
setPaneVisible(session: any, visible: boolean): void;
|
|
36
|
+
/** Upgrade already restored layouts without guessing from a focused or sibling pane. */
|
|
37
|
+
private rememberLegacyPanes;
|
|
38
|
+
private paneTargetFor;
|
|
39
|
+
private preservePaneRecoveryMarkers;
|
|
21
40
|
contextForSession(session: any): ScopeContext;
|
|
22
41
|
ngOnDestroy(): void;
|
|
23
42
|
}
|
|
@@ -20,6 +20,8 @@ export declare class StatsService {
|
|
|
20
20
|
private updateDebugState;
|
|
21
21
|
getServerKey(session: any): string;
|
|
22
22
|
private scopeContext;
|
|
23
|
+
isPaneVisible(session: any): boolean;
|
|
24
|
+
setPaneVisible(session: any, visible: boolean): void;
|
|
23
25
|
/** Disabled/out-of-scope commands never run. Unavailable items still refresh to detect recovery. */
|
|
24
26
|
getVisibleConfig(session: any): {
|
|
25
27
|
customMetrics: CustomMetric[];
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { ToolbarButtonProvider, ToolbarButton
|
|
1
|
+
import { ToolbarButtonProvider, ToolbarButton } from 'tabby-core';
|
|
2
2
|
export declare class StatsToolbarButtonProvider extends ToolbarButtonProvider {
|
|
3
|
-
private config;
|
|
4
|
-
private translate;
|
|
5
|
-
constructor(config: ConfigService, translate: TranslateService);
|
|
6
3
|
provide(): ToolbarButton[];
|
|
7
4
|
}
|