Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • master
1 result

Target

Select target project
No results found
Select Git revision
  • master
1 result
Show changes

Commits on Source 19

522 files
+ 93813
0
Compare changes
  • Side-by-side
  • Inline

Files

+4 −0
Original line number Original line Diff line number Diff line
##

projet/node_modules*

############### MacOS
############### MacOS
# General
# General
.DS_Store
.DS_Store

projet/db/data.sql

0 → 100644
+35 −0
Original line number Original line Diff line number Diff line
USE hyperdrive;

INSERT INTO Users
VALUES 
    ("a", "test"),
    ("b", "test"),
    ("c", "test"),
    ("d", "test"),
    ("e", "test"); 

INSERT INTO Paths
VALUES
    ("/a", "a", NULL),
    ("/a/coucou", "a", "/a"),
    ("/b", "b", NULL),
    ("/c", "c", NULL),
    ("/c/test", "c", "/c"),
    ("/d", "d", NULL),
    ("/e", "e", NULL);

INSERT INTO Files
VALUES
    ("abcd", "un", "/a"),
    ("ab", "deux", "/a"),
    ("@dfsg", "trois", "/c/test"),
    ("gbvaf", "quatre", "/b"),
    ("dsfgh", "cinq", "/d"),
    ("sdfa", "six", "/e");

INSERT INTO Shares
VALUES
    ("a", "b", "abcd"),
    ("a", "c", "abcd"),
    ("a", "d", "abcd"),
    ("c", "e", "@dfsg");
+17 −0
Original line number Original line Diff line number Diff line
version: '3'
services:
    db:
        image: mysql
        restart: always
        container_name: hyperdrive
        environment:
            MYSQL_ROOT_PASSWORD: super
            MYSQL_DATABASE: hyperdrive
            MYSQL_USER: hyperdrive
            MYSQL_PASSWORD: hyper
        ports:
            - '3306:3306'
        expose:
            - 3306
        volumes:
            - ./hyperdrive.sql:/docker-entrypoint-initdb.d/hyperdrive.sql
 No newline at end of file
+76 −0
Original line number Original line Diff line number Diff line
CREATE DATABASE IF NOT EXISTS `hyperdrive` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `hyperdrive`;

-- mysql -h localhost -P 3306 --protocol=tcp -u root -p
-- Creating tables

CREATE TABLE IF NOT EXISTS Users (
    pseudo varchar(60) NOT NULL,
    passwd varchar(256) NOT NULL,
    PRIMARY KEY (pseudo)
);

CREATE TABLE IF NOT EXISTS Paths (
    paths varchar(50) NOT NULL,
    pseudo varchar(60) NOT NULL,
    parent varchar(50),
    PRIMARY KEY (paths),
    FOREIGN KEY (pseudo) REFERENCES Users(pseudo),
    FOREIGN KEY (parent) REFERENCES Paths(paths)
);

CREATE TABLE IF NOT EXISTS Files (
    file_id varchar(100) NOT NULL,
    file_name varchar(50) NOT NULL,
    paths varchar(50) NOT NULL,
    lat FLOAT,
    lng FLOAT,
    PRIMARY KEY (file_id),
    FOREIGN KEY (paths) REFERENCES Paths(paths)
);

CREATE TABLE IF NOT EXISTS Shares (
    pseudo_1 varchar(60) NOT NULL,
    pseudo_2 varchar(60) NOT NULL,
    file_id varchar(100) NOT NULL,
    PRIMARY KEY (pseudo_1, pseudo_2, file_id),
    FOREIGN KEY (pseudo_1) REFERENCES Users(pseudo),
    FOREIGN KEY (pseudo_2) REFERENCES Users(pseudo),
    FOREIGN KEY (file_id) REFERENCES Files(file_id)
);

-- Inserting datas

INSERT INTO Users
VALUES 
    ("a", "test"),
    ("b", "test"),
    ("c", "test"),
    ("d", "test"),
    ("e", "test"); 

INSERT INTO Paths
VALUES
    ("/a", "a", NULL),
    ("/a/coucou", "a", "/a"),
    ("/b", "b", NULL),
    ("/c", "c", NULL),
    ("/c/test", "c", "/c"),
    ("/d", "d", NULL),
    ("/e", "e", NULL);

INSERT INTO Files
VALUES
    ("abcd", "un", "/a", 46.2054, 6.1459),
    ("ab", "deux", "/a", 46.2054, 6.1459),
    ("@dfsg", "trois", "/c/test", 46.2054, 6.1459),
    ("gbvaf", "quatre", "/b", 46.2054, 6.1459),
    ("dsfgh", "cinq", "/d", 46.2054, 6.1459),
    ("sdfa", "six", "/e", 46.2054, 6.1459);

INSERT INTO Shares
VALUES
    ("a", "b", "abcd"),
    ("a", "c", "abcd"),
    ("a", "d", "abcd"),
    ("c", "e", "@dfsg");
+38 −0
Original line number Original line Diff line number Diff line
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" type="text/css" href="/styles/style.css">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <h1>Hyperdrive</h1>
    <div id="hyperdrive">
        <div id="menu">
            <h3>Menu</h3>
            <button><img src="/images/file_img.png" height="50px"></button>
        </div>
        <div id="drive">
            <h3>Drive</h3>
            <div class="folder">
                <p>
                    <button><img src="/images/folder_img.png" height="50px"></button>
                    <p>folder 1</p>
                </p>
            </div>
            <div class="file">
                <p>
                    <button><img src="/images/file_img.png" height="50px"></button>
                    <p>file 1</p>
                </p>
            </div>
        </div>
        <div id="info">
            <h3>Infos</h3>
            <button><img src="/images/file_img.png" height="50px"></button>
        </div>
    </div>
</body>
</html>
 No newline at end of file
+49 −0
Original line number Original line Diff line number Diff line
* {
    margin: 2.5px;
    padding: 2px;
    box-sizing: border-box;
}

button {
    border: none;
}

button:hover {
    background-color: grey;
}

#menu {
    border: solid grey 2px;
    width: 30%;
    float: left;
}

#drive {
    border: solid grey 2px;
    width: 30%;
    float: left;
}

#info {
    border: solid grey 2px;
    width: 30%;
    float: left;
}

.folder {
    float: left;
}

.folder p{
    font-size: 10pt;
    text-align: center;
}

.file {
    float: left;
}

.file p{
    font-size: 10pt;
    text-align: center;
}
 No newline at end of file