Mercurial > code > home > repos > light9
comparison web/metrics/ServiceButtonRow.ts @ 2400:9a4bc2ea264e
ui tweaks and link fix
author | drewp@bigasterisk.com |
---|---|
date | Fri, 17 May 2024 13:25:46 -0700 |
parents | 4556eebe5d73 |
children |
comparison
equal
deleted
inserted
replaced
2399:bbff83207963 | 2400:9a4bc2ea264e |
---|---|
3 export { StatsLine } from "./StatsLine"; | 3 export { StatsLine } from "./StatsLine"; |
4 | 4 |
5 @customElement("service-button-row") | 5 @customElement("service-button-row") |
6 export class ServiceButtonRow extends LitElement { | 6 export class ServiceButtonRow extends LitElement { |
7 @property() name: string = "?"; | 7 @property() name: string = "?"; |
8 @property({ type:Boolean, attribute: "metrics" }) hasMetrics: boolean = false; | 8 @property({ type: Boolean, attribute: "metrics" }) hasMetrics: boolean = false; |
9 static styles = [ | 9 static styles = [ |
10 css` | 10 css` |
11 :host { | 11 :host { |
12 padding-bottom: 10px; | 12 padding-bottom: 10px; |
13 border-bottom: 1px solid #333; | 13 border-bottom: 1px solid #333; |
55 <div class="window"><button @click="${this.click}">window</button></div> | 55 <div class="window"><button @click="${this.click}">window</button></div> |
56 ${this.hasMetrics ? html`<div><a href="${this.name}/metrics">metrics</a></div>` : ""} | 56 ${this.hasMetrics ? html`<div><a href="${this.name}/metrics">metrics</a></div>` : ""} |
57 </div> | 57 </div> |
58 | 58 |
59 ${this.hasMetrics ? html`<div id="stats"><stats-line name="${this.name}"></div>` : ""} | 59 ${this.hasMetrics ? html`<div id="stats"><stats-line name="${this.name}"></div>` : ""} |
60 `; | 60 `; |
61 } | 61 } |
62 | 62 |
63 click() { | 63 click() { |
64 window.open(this.name + "/", "_blank", "scrollbars=1,resizable=1,titlebar=0,location=0"); | 64 window.open("/" + this.name + "/", "_blank", "scrollbars=1,resizable=1,titlebar=0,location=0"); |
65 } | 65 } |
66 } | 66 } |