@pb33f/cowboy-components 0.6.2 → 0.6.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.
@@ -17,8 +17,8 @@ let RodeoNav = class RodeoNav extends LitElement {
17
17
  return html `
18
18
  <nav>
19
19
  <ul>
20
- <li><a href="/">roundup</a></li>
21
- <li><a href="users/">patrons</a></li>
20
+ <li><a href="/rodeo/roundup/">roundup</a></li>
21
+ <li><a href="/rodeo/users/">patrons</a></li>
22
22
  </ul>
23
23
  </nav>
24
24
  `;
@@ -1,9 +1,9 @@
1
1
  import { LitElement } from "lit";
2
2
  import './rodeo-nav.js';
3
- import './roundup.ts';
4
- import './users.ts';
3
+ import './roundup.js';
4
+ import './users.js';
5
5
  import { BusCallback, CommandResponse } from "@pb33f/ranch";
6
- import { PlatformEvent } from "../../model/platform-events";
6
+ import { PlatformEvent } from "../../model/platform-events.js";
7
7
  export declare class Rodeo extends LitElement {
8
8
  static styles: import("lit").CSSResult[];
9
9
  private readonly bus;
@@ -7,18 +7,18 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { html, LitElement } from "lit";
8
8
  import { customElement } from "lit/decorators.js";
9
9
  import rodeoCss from "./rodeo.css";
10
- import listsCss from "../../css/lists.css";
10
+ import listsCss from "../../css/lists.css.js";
11
11
  import { Router } from '@vaadin/router';
12
12
  import './rodeo-nav.js';
13
- import './roundup.ts';
14
- import './users.ts';
13
+ import './roundup.js';
14
+ import './users.js';
15
15
  import { CreateBus } from "@pb33f/ranch";
16
- import { Command, DoctorServiceChannel, isBrokerResponse, QueuePrefix, TopicPrefix, RodeoServiceChannel, isPlatformEvent } from "../../model/channels";
17
- import { LintingService } from "../../services/linting-service";
18
- import { AuthController } from "../../controllers/auth";
19
- import { RodeoService } from "../../services/rodeo-service";
20
- import { RodeoRoundup } from "./roundup";
21
- import { PlatformEventType } from "../../model/platform-events";
16
+ import { Command, DoctorServiceChannel, isBrokerResponse, QueuePrefix, TopicPrefix, RodeoServiceChannel, isPlatformEvent } from "../../model/channels.js";
17
+ import { LintingService } from "../../services/linting-service.js";
18
+ import { AuthController } from "../../controllers/auth.js";
19
+ import { RodeoService } from "../../services/rodeo-service.js";
20
+ import { RodeoRoundup } from "./roundup.js";
21
+ import { PlatformEventType } from "../../model/platform-events.js";
22
22
  let Rodeo = class Rodeo extends LitElement {
23
23
  constructor() {
24
24
  super();
@@ -45,7 +45,7 @@ let Rodeo = class Rodeo extends LitElement {
45
45
  if (useTLS && useTLS == 'true') {
46
46
  this.useTLS = true;
47
47
  }
48
- this.authController = new AuthController(this, this.connectToBroker, true);
48
+ this.authController = new AuthController(this);
49
49
  }
50
50
  connectToBroker() {
51
51
  let protocol = "ws://";
@@ -79,11 +79,16 @@ let Rodeo = class Rodeo extends LitElement {
79
79
  }
80
80
  },
81
81
  {
82
- path: '/', action: () => {
82
+ path: '/rodeo/roundup', action: () => {
83
83
  return this.roundupComponent;
84
84
  }
85
85
  },
86
- { path: '/users', component: 'pb33f-rodeo-users' }
86
+ {
87
+ path: '/rodeo/', action: () => {
88
+ return this.roundupComponent;
89
+ }
90
+ },
91
+ { path: '/rodeo/users', component: 'pb33f-rodeo-users' }
87
92
  ]);
88
93
  this.connectToBroker();
89
94
  }
@@ -106,10 +111,20 @@ let Rodeo = class Rodeo extends LitElement {
106
111
  break;
107
112
  case PlatformEventType.SessionStarted:
108
113
  this.roundupComponent.numSessionsActive++;
114
+ this.roundupComponent.numHttpSessions++;
109
115
  break;
110
116
  case PlatformEventType.UserCreated:
111
117
  this.roundupComponent.numUsers++;
112
118
  break;
119
+ case PlatformEventType.FileCreated:
120
+ this.roundupComponent.numFiles++;
121
+ break;
122
+ case PlatformEventType.FileRevisionCreated:
123
+ this.roundupComponent.numFileRevisions++;
124
+ break;
125
+ case PlatformEventType.RulesetCreated:
126
+ this.roundupComponent.numRuleSets++;
127
+ break;
113
128
  }
114
129
  }
115
130
  rodeoServiceStream() {
@@ -12,6 +12,10 @@ export declare class RodeoRoundup extends LitElement {
12
12
  numAuthenticatedSessions: number;
13
13
  numUsers: number;
14
14
  numBrokerAssociations: number;
15
+ numHttpSessions: number;
16
+ numFiles: number;
17
+ numFileRevisions: number;
18
+ numRuleSets: number;
15
19
  private terminalEmulator;
16
20
  constructor();
17
21
  firstUpdated(): void;
@@ -28,6 +28,10 @@ let RodeoRoundup = class RodeoRoundup extends LitElement {
28
28
  this.numAuthenticatedSessions = stats.sessionsAuthenticated;
29
29
  this.numUsers = stats.users;
30
30
  this.numBrokerAssociations = stats.brokerAssociations;
31
+ this.numHttpSessions = stats.httpSessions;
32
+ this.numFiles = stats.files;
33
+ this.numFileRevisions = stats.fileRevisions;
34
+ this.numRuleSets = stats.ruleSets;
31
35
  });
32
36
  }
33
37
  pushConsoleEventInfoMessage(evt) {
@@ -56,7 +60,14 @@ let RodeoRoundup = class RodeoRoundup extends LitElement {
56
60
  value="${this.numBrokerAssociations}"></pb33f-rodeo-statistic>
57
61
  <pb33f-rodeo-statistic title="Users"
58
62
  value="${this.numUsers}"></pb33f-rodeo-statistic>
59
-
63
+ <pb33f-rodeo-statistic title="HTTP Sessions"
64
+ value="${this.numHttpSessions}"></pb33f-rodeo-statistic>
65
+ <pb33f-rodeo-statistic title="Files"
66
+ value="${this.numFiles}"></pb33f-rodeo-statistic>
67
+ <pb33f-rodeo-statistic title="File Revisions"
68
+ value="${this.numFileRevisions}"></pb33f-rodeo-statistic>
69
+ <pb33f-rodeo-statistic title="Rulesets"
70
+ value="${this.numRuleSets}"></pb33f-rodeo-statistic>
60
71
  </div>
61
72
  <div class="emulator">
62
73
  ${this.terminalEmulator}
@@ -90,6 +101,18 @@ __decorate([
90
101
  __decorate([
91
102
  property({ type: Number })
92
103
  ], RodeoRoundup.prototype, "numBrokerAssociations", void 0);
104
+ __decorate([
105
+ property({ type: Number })
106
+ ], RodeoRoundup.prototype, "numHttpSessions", void 0);
107
+ __decorate([
108
+ property({ type: Number })
109
+ ], RodeoRoundup.prototype, "numFiles", void 0);
110
+ __decorate([
111
+ property({ type: Number })
112
+ ], RodeoRoundup.prototype, "numFileRevisions", void 0);
113
+ __decorate([
114
+ property({ type: Number })
115
+ ], RodeoRoundup.prototype, "numRuleSets", void 0);
93
116
  RodeoRoundup = __decorate([
94
117
  customElement('pb33f-rodeo-home')
95
118
  ], RodeoRoundup);
@@ -2,7 +2,11 @@ export declare enum PlatformEventType {
2
2
  AssociateBroker = "broker-associated",
3
3
  UserAuthenticated = "user-authenticated",
4
4
  UserCreated = "user-created",
5
- SessionStarted = "session-started"
5
+ SessionStarted = "session-started",
6
+ FileCreated = "file=created",
7
+ FileRevisionCreated = "file-revision-created",
8
+ RulesetCreated = "ruleset-created",
9
+ RulesetUpdated = "ruleset-updated"
6
10
  }
7
11
  export interface PlatformEvent {
8
12
  id?: string;
@@ -4,4 +4,8 @@ export var PlatformEventType;
4
4
  PlatformEventType["UserAuthenticated"] = "user-authenticated";
5
5
  PlatformEventType["UserCreated"] = "user-created";
6
6
  PlatformEventType["SessionStarted"] = "session-started";
7
+ PlatformEventType["FileCreated"] = "file=created";
8
+ PlatformEventType["FileRevisionCreated"] = "file-revision-created";
9
+ PlatformEventType["RulesetCreated"] = "ruleset-created";
10
+ PlatformEventType["RulesetUpdated"] = "ruleset-updated";
7
11
  })(PlatformEventType || (PlatformEventType = {}));
@@ -7,4 +7,8 @@ export interface RoundupStats {
7
7
  sessionsAuthenticated: number;
8
8
  brokerAssociations: number;
9
9
  users: number;
10
+ httpSessions: number;
11
+ files: number;
12
+ fileRevisions: number;
13
+ ruleSets: number;
10
14
  }
@@ -1,4 +1,4 @@
1
- import { AuthenticationState } from "../model/auth";
1
+ import { AuthenticationState } from "../model/auth.js";
2
2
  export declare class AuthService {
3
3
  static doctorEndpoint: string;
4
4
  static checkAuth(): Promise<AuthenticationState>;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Princess Beef Heavy Industries Cowboy Components",
4
4
  "private": false,
5
5
  "license": "BUSL-1.1",
6
- "version": "0.6.2",
6
+ "version": "0.6.4",
7
7
  "type": "module",
8
8
  "main": "./dist/cowboy-components.umd.cjs",
9
9
  "module": "./dist/cowboy-components.js",