From 8fa4cf54ec75b2683451ddfd63dd26057f5dc01f Mon Sep 17 00:00:00 2001
From: Kai Reinhard <K.Reinhard@micromata.de>
Date: Sun, 16 Dec 2018 21:35:00 +0000
Subject: [PATCH] Unused.
---
/dev/null | 47 -----------------------------------------------
1 files changed, 0 insertions(+), 47 deletions(-)
diff --git a/borgbutler-webapp/src/components/general/LinkFile.jsx b/borgbutler-webapp/src/components/general/LinkFile.jsx
deleted file mode 100644
index 5863c99..0000000
--- a/borgbutler-webapp/src/components/general/LinkFile.jsx
+++ /dev/null
@@ -1,41 +0,0 @@
-import React from 'react';
-import {Button} from 'reactstrap';
-import {getRestServiceUrl} from "../../utilities/global";
-
-/*
-* Link to a file. If Merlin is running both local, the server and the client, the file will be opened (e. g. in Excel).
-* For remote clients the desired file will be downloaded.
- */
-class LinkFile extends React.Component {
- openFile() {
- fetch(getRestServiceUrl('files/open-local-file', {primaryKey: this.props.primaryKey}), {
- method: "GET",
- dataType: "text",
- headers: {
- "Content-Type": "text/plain; charset=utf-8"
- }
- })
- .then(response => response.text())
- .then((text) => {
- if (text !== 'OK') {
- alert(text);
- }
- })
- .catch((error) => {
- alert("Can't open file on local file system :-(")
- })
- }
-
- render() {
- return (
- <Button color="link" onClick={() => this.openFile()}>{this.props.filepath}</Button>
- )
- }
-
- constructor(props) {
- super(props);
- this.openFile = this.openFile.bind(this);
- }
-}
-
-export default LinkFile;
\ No newline at end of file
diff --git a/borgbutler-webapp/src/components/general/OpenLocalFile.jsx b/borgbutler-webapp/src/components/general/OpenLocalFile.jsx
deleted file mode 100644
index a188c2f..0000000
--- a/borgbutler-webapp/src/components/general/OpenLocalFile.jsx
+++ /dev/null
@@ -1,47 +0,0 @@
-import React from 'react';
-import {Button} from 'reactstrap';
-import {getRestServiceUrl} from "../../utilities/global";
-
-class OpenLocalFile extends React.Component {
- openFile() {
- fetch(getRestServiceUrl('files/open-local-file', {filepath: this.props.filepath}), {
- method: "GET",
- dataType: "text",
- headers: {
- "Content-Type": "text/plain; charset=utf-8"
- }
- })
- .then(response => response.text())
- .then((text) => {
- if (text !== 'OK') {
- alert(text);
- }
- })
- .catch((error) => {
- alert("Can't open file on local file system :-(")
- })
- }
- render() {
- const service = this.props.service;
- const params = this.props.params;
- var url;
- if (params) {
- if (service === 'files/browse-local-filesystem') {
- url = getRestServiceUrl(service) + '?' + params;
- } else {
- url = getRestServiceUrl(service) + '?prettyPrinter=true&' + params;
- }
- } else {
- url = getRestServiceUrl(service) + '?prettyPrinter=true';
- }
- return (
- <Button color="link" onClick={() => this.openFile()}>{this.props.filepath}</Button>
- )
- }
-
- constructor(props) {
- super(props);
- this.openFile = this.openFile.bind(this);
- }
-}
-export default OpenLocalFile;
\ No newline at end of file
--
Gitblit v1.10.0