From b6e774585d32017e5f1ceeeb2b2e2a5e350354d3 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sun, 28 May 2017 23:15:41 +0200 Subject: move webex specific things in their own directory --- src/pages/logs.tsx | 82 ------------------------------------------------------ 1 file changed, 82 deletions(-) delete mode 100644 src/pages/logs.tsx (limited to 'src/pages/logs.tsx') diff --git a/src/pages/logs.tsx b/src/pages/logs.tsx deleted file mode 100644 index a1e5161ec..000000000 --- a/src/pages/logs.tsx +++ /dev/null @@ -1,82 +0,0 @@ -/* - This file is part of TALER - (C) 2016 Inria - - TALER is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - TALER is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - TALER; see the file COPYING. If not, see - */ - -/** - * Show wallet logs. - * - * @author Florian Dold - */ - -import * as React from "react"; -import * as ReactDOM from "react-dom"; -import {LogEntry, getLogs} from "../logging"; - -interface LogViewProps { - log: LogEntry; -} - -class LogView extends React.Component { - render(): JSX.Element { - let e = this.props.log; - return ( -
-
    -
  • level: {e.level}
  • -
  • msg: {e.msg}
  • -
  • id: {e.id || "unknown"}
  • -
  • file: {e.source || "(unknown)"}
  • -
  • line: {e.line || "(unknown)"}
  • -
  • col: {e.col || "(unknown)"}
  • - {(e.detail ?
  • detail:
    {e.detail}
  • : [])} -
-
- ); - } -} - -interface LogsState { - logs: LogEntry[]|undefined; -} - -class Logs extends React.Component { - constructor() { - super(); - this.update(); - this.state = {} as any; - } - - async update() { - let logs = await getLogs(); - this.setState({logs}); - } - - render(): JSX.Element { - let logs = this.state.logs; - if (!logs) { - return ...; - } - return ( -
- Logs: - {logs.map(e => )} -
- ); - } -} - -document.addEventListener("DOMContentLoaded", () => { - ReactDOM.render(, document.getElementById("container")!); -}); -- cgit v1.2.3