Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/web/machineid.go
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ func (h *Handler) listBotInstances(_ http.ResponseWriter, r *http.Request, _ htt
uiInstance.HostNameLatest = heartbeat.Hostname
uiInstance.VersionLatest = heartbeat.Version
uiInstance.ActiveAtLatest = heartbeat.RecordedAt.AsTime().Format(time.RFC3339)
uiInstance.OSLatest = heartbeat.Os
}

return uiInstance
Expand All @@ -462,4 +463,5 @@ type BotInstance struct {
HostNameLatest string `json:"host_name_latest,omitempty"`
VersionLatest string `json:"version_latest,omitempty"`
ActiveAtLatest string `json:"active_at_latest,omitempty"`
OSLatest string `json:"os_latest,omitempty"`
}
2 changes: 2 additions & 0 deletions lib/web/machineid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@ func TestListBotInstances(t *testing.T) {
Version: "1.0.0",
Hostname: "test-hostname",
JoinMethod: "test-join-method",
Os: "linux",
},
},
},
Expand All @@ -616,6 +617,7 @@ func TestListBotInstances(t *testing.T) {
HostNameLatest: "test-hostname",
VersionLatest: "1.0.0",
ActiveAtLatest: "1970-01-01T00:00:03Z",
OSLatest: "linux",
},
},
}))
Expand Down
54 changes: 33 additions & 21 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions web/packages/design/src/Icon/Icons/ModelContextProtocol.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ export const ModelContextProtocol = forwardRef<HTMLSpanElement, IconProps>(
{...otherProps}
ref={ref}
>
<path d="M11.1233 2.2703C12.6791 0.86452 15.081 0.911433 16.5803 2.41092L16.7209 2.55838C17.5524 3.4788 17.8739 4.69486 17.6887 5.84549C18.8391 5.66026 20.0553 5.98289 20.9758 6.81424L21.1243 6.95487L21.1711 7.00174L21.3118 7.15018C22.672 8.65578 22.672 10.9532 21.3118 12.4588L21.1711 12.6072L12.9514 20.8269C12.8263 20.9522 12.8266 21.1557 12.9514 21.281L14.6399 22.9685L14.6907 23.0262C14.9309 23.3207 14.9145 23.7555 14.6399 24.0301C14.3653 24.3046 13.9305 24.3211 13.636 24.0808L13.5784 24.0301L11.8909 22.3416C11.1803 21.6304 11.18 20.4774 11.8909 19.7664L20.1106 11.5467L20.2795 11.3592C21.0161 10.4561 21.0161 9.15286 20.2795 8.24979L20.1106 8.06229L20.0637 8.01542L19.8762 7.84647C18.9731 7.11019 17.6698 7.10988 16.7668 7.84647L16.5862 8.00858L16.5803 8.01542L9.71702 14.8797L9.65941 14.9314C9.36492 15.1712 8.92994 15.1539 8.6555 14.8797C8.36294 14.5869 8.3632 14.112 8.6555 13.8191L8.74241 13.7312L15.5266 6.94706L15.6887 6.76834C16.4254 5.86531 16.4253 4.5611 15.6887 3.65799L15.5198 3.47147C14.6179 2.56954 13.1904 2.51313 12.2229 3.30252L12.0364 3.47147L2.94749 12.5603C2.65469 12.8527 2.17973 12.8527 1.88695 12.5603C1.59418 12.2676 1.59447 11.7927 1.88695 11.4998L10.9758 2.41092L11.1233 2.2703Z" />
<path d="M13.2483 4.68338C13.5412 4.39063 14.016 4.39054 14.3088 4.68338C14.6012 4.97627 14.6014 5.45119 14.3088 5.74393L7.58714 12.4656C6.62517 13.4276 6.62514 14.9879 7.58714 15.95L7.77366 16.1189C8.74111 16.9077 10.1688 16.8515 11.0705 15.95L17.7922 9.22733C18.0851 8.93474 18.5599 8.93474 18.8528 9.22733C19.1452 9.52018 19.1453 9.99509 18.8528 10.2879L12.1311 17.0105C10.6319 18.5096 8.2298 18.5563 6.67406 17.1512L6.52659 17.0105C4.97888 15.4627 4.97885 12.9529 6.52659 11.4051L13.2483 4.68338Z" />
<path d="M11.123 2.27a3.963 3.963 0 0 1 5.457.14l.14.148a3.96 3.96 0 0 1 .969 3.287 3.96 3.96 0 0 1 3.287.97l.148.14.047.047.14.148a3.963 3.963 0 0 1 0 5.309l-.14.148-8.22 8.22a.32.32 0 0 0 0 .454l1.689 1.688.05.057a.75.75 0 0 1-1.054 1.055l-.058-.05-1.687-1.69a1.82 1.82 0 0 1 0-2.575l8.22-8.22.168-.187a2.464 2.464 0 0 0 0-3.11l-.168-.187-.047-.047-.188-.169a2.464 2.464 0 0 0-3.11 0l-.18.163-.006.006-6.863 6.865-.058.051a.751.751 0 0 1-1.004-1.112l.087-.088 6.785-6.784.162-.179a2.465 2.465 0 0 0 0-3.11l-.17-.187a2.464 2.464 0 0 0-3.296-.168l-.187.168-9.089 9.09a.75.75 0 0 1-1.06-1.061l9.089-9.09z" />
<path d="M13.248 4.683a.75.75 0 0 1 1.06 1.06l-6.72 6.723a2.464 2.464 0 0 0 0 3.484l.186.169a2.465 2.465 0 0 0 3.296-.169l6.722-6.723a.75.75 0 0 1 1.06 1.06l-6.72 6.724a3.964 3.964 0 0 1-5.458.14l-.147-.14a3.964 3.964 0 0 1 0-5.606z" />
<path d="M0 .75h24v24H0z" />
</Icon>
)
);
46 changes: 38 additions & 8 deletions web/packages/design/src/Label/Label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,35 @@ const kind = ({ kind, theme }: { kind?: LabelKind; theme: Theme }) => {
};
}

if (kind === 'outline') {
if (kind === 'outline-secondary') {
return {
color: theme.colors.text.main,
backgroundColor: 'transparent',
borderColor: theme.colors.interactive.tonal.neutral[0],
borderWidth: 1,
borderStyle: 'solid',
backgroundColor: 'transparent',
color: theme.colors.text.main,
fontWeight: theme.fontWeights.regular,
};
}

if (kind === 'outline-warning') {
return {
color: theme.colors.interactive.solid.alert.default,
backgroundColor: theme.colors.interactive.tonal.alert[0],
borderColor: theme.colors.interactive.tonal.alert[2],
borderWidth: 1,
borderStyle: 'solid',
fontWeight: theme.fontWeights.regular,
};
}

if (kind === 'outline-danger') {
return {
color: theme.colors.interactive.solid.danger.default,
backgroundColor: theme.colors.interactive.tonal.danger[0],
borderColor: theme.colors.interactive.tonal.danger[2],
borderWidth: 1,
borderStyle: 'solid',
fontWeight: theme.fontWeights.regular,
};
}
Expand All @@ -73,10 +95,12 @@ const kind = ({ kind, theme }: { kind?: LabelKind; theme: Theme }) => {
export type LabelKind =
| 'primary'
| 'secondary'
| 'outline'
| 'warning'
| 'danger'
| 'success';
| 'success'
| 'outline-secondary'
| 'outline-warning'
| 'outline-danger';

interface LabelProps extends SpaceProps {
kind?: LabelKind;
Expand Down Expand Up @@ -107,12 +131,18 @@ export const Primary = (props: LabelPropsWithoutKind) => (
export const Secondary = (props: LabelPropsWithoutKind) => (
<Label kind="secondary" {...props} />
);
export const Outline = (props: LabelPropsWithoutKind) => (
<Label kind="outline" {...props} />
);
export const Warning = (props: LabelPropsWithoutKind) => (
<Label kind="warning" {...props} />
);
export const Danger = (props: LabelPropsWithoutKind) => (
<Label kind="danger" {...props} />
);
export const SecondaryOutlined = (props: LabelPropsWithoutKind) => (
<Label kind="outline-secondary" {...props} />
);
export const WarningOutlined = (props: LabelPropsWithoutKind) => (
<Label kind="outline-warning" {...props} />
);
export const DangerOutlined = (props: LabelPropsWithoutKind) => (
<Label kind="outline-danger" {...props} />
);
11 changes: 10 additions & 1 deletion web/packages/design/src/Label/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,17 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import Label, { Danger, Primary, Secondary, Warning } from './Label';
import Label, {
Danger,
DangerOutlined,
Primary,
Secondary,
SecondaryOutlined,
Warning,
WarningOutlined,
} from './Label';

export default Label;
export { Primary, Secondary, Warning, Danger };
export { SecondaryOutlined, WarningOutlined, DangerOutlined };
export type { LabelKind } from './Label';
Loading
Loading