statussparklineSVG1 match
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2export function SparklineSVG({ strokeWidth = 2, data = [], fill = "none", stroke = "black" }) {
3const padding = 2;
4const xMargin = 25;
4const thisURL = parseProject(import.meta.url).links.self.latest;
56export async function notify(message: string) {
7await email({ subject: message, text: `Email sent from ${thisURL}` });
8}
7);
89export async function uptimeCheck(url: string) {
10let reason: string, status: number, end: number;
11let ok = true;
GitHubSyncvaltown-deploy6 matches
17////
1819export default async function valTownDeploy(c: Context) {
20console.log("deploy to valtown");
21const body = await c.req.json();
45}
4647async function getContents(repo: Repo, after: string, commits: Commit[]) {
48const filenames = config.vals.map((name: string) => name + ".tsx");
49console.log(`${filenames.length} val files updated`);
55}
5657function getModified(commits: Commit[], filenames: string[]) {
58return commits.reduce((a: string[], b: Commit) => {
59return [...a, ...b.modified];
61}
6263function getFileContent(repo: Repo, after: string) {
64return async (path: string): Promise<{
65name: string;
81}
8283async function updateVals(user: ValUser, updates: { name: string; code: string; }[]) {
84console.log("updateVals");
85await Promise.all(updates.map(async (update) => {
88}
8990async function updateVal(username: string, update: { name: string; code: string; }) {
91const { name, code } = update;
92const val = await valtown.alias.username.valName.retrieve(username, name);
blob_admin_migratedmain.tsx8 matches
13}
1415function Tooltip({ children, content }: TooltipProps) {
16const [isVisible, setIsVisible] = useState(false);
17const tooltipRef = useRef<HTMLDivElement>(null);
52}
5354function formatBytes(bytes: number, decimals = 2) {
55if (bytes === 0) return "0 Bytes";
56const k = 1024;
61}
6263function copyToClipboard(text: string) {
64navigator.clipboard.writeText(text).then(() => {
65console.log("Text copied to clipboard");
69}
7071function ActionMenu({ blob, onDownload, onRename, onDelete, onMoveToPublic, onMoveOutOfPublic }) {
72const [isOpen, setIsOpen] = useState(false);
73const menuRef = useRef(null);
7677useEffect(() => {
78function handleClickOutside(event) {
79if (menuRef.current && !menuRef.current.contains(event.target)) {
80event.stopPropagation();
158}
159160function BlobItem({ blob, onSelect, isSelected, onDownload, onRename, onDelete, onMoveToPublic, onMoveOutOfPublic }) {
161const [isLoading, setIsLoading] = useState(false);
162const decodedKey = decodeURIComponent(blob.key);
219}
220221function App({ initialEmail, initialProfile }) {
222const encodeKey = (key: string) => encodeURIComponent(key);
223const decodeKey = (key: string) => decodeURIComponent(key);
645}
646647function client() {
648const initialEmail = document.getElementById("root").getAttribute("data-email");
649const initialProfile = JSON.parse(document.getElementById("root").getAttribute("data-profile"));
9const thisURL = parseProject(import.meta.url).links.self.latest;
1011function StatusRow({ rows }) {
12return (
13<div className="w-full flex flex-col space-y-2">
31}
3233function StatusSection({ url, rows }) {
34const sectionRows = rows.filter(row => row[0] === url);
35const percentUp = Math.round((sectionRows.filter(row => row[1]).length / sectionRows.length) * 100);
47}
4849export default async function(req: Request): Promise<Response> {
50const { rows } = await sqlite.execute(
51"select url, ok, duration, timestamp from uptime order by timestamp desc limit 200",
statussparklineSVG1 match
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2export function SparklineSVG({ strokeWidth = 2, data = [], fill = "none", stroke = "black" }) {
3const padding = 2;
4const xMargin = 25;
4const thisURL = parseProject(import.meta.url).links.self.latest;
56export async function notify(message: string) {
7await email({ subject: message, text: `Email sent from ${thisURL}` });
8}
7);
89export async function uptimeCheck(url: string) {
10let reason: string, status: number, end: number;
11let ok = true;
1import { getImages } from "./image_manager";
23export default async function server(request: Request): Promise<Response> {
4const url = new URL(request.url);
5if (request.method === "GET" && url.pathname === "/image") {