David Thornley 6 年之前
父節點
當前提交
bc2841ed34
共有 46 個檔案被更改,包括 0 行新增185 行删除
  1. 二進制
      .DS_Store
  2. 0
    0
      ReadMe.md
  3. 二進制
      client-ionic/.DS_Store
  4. 0
    0
      client-ionic/ClientReadme.md
  5. 0
    1
      client-ionic/ionicvault
  6. 0
    0
      mvnw
  7. 0
    0
      mvnw.cmd
  8. 0
    0
      pom.xml
  9. 二進制
      server-springboot/.DS_Store
  10. 二進制
      server-springboot/src/.DS_Store
  11. 二進制
      server-springboot/src/main/.DS_Store
  12. 二進制
      server-springboot/src/main/resources/.DS_Store
  13. 0
    69
      server-springboot/src/main/resources/static/app.js
  14. 0
    55
      server-springboot/src/main/resources/static/index.html
  15. 0
    34
      server-springboot/target/classes/application.properties
  16. 二進制
      server-springboot/target/classes/com/ziplinegreen/vault/Config/WebSocketConfig.class
  17. 二進制
      server-springboot/target/classes/com/ziplinegreen/vault/Controller/PostController.class
  18. 二進制
      server-springboot/target/classes/com/ziplinegreen/vault/Controller/UserController.class
  19. 二進制
      server-springboot/target/classes/com/ziplinegreen/vault/Exception/ResourceNotFoundException.class
  20. 二進制
      server-springboot/target/classes/com/ziplinegreen/vault/Model/AuditModel.class
  21. 二進制
      server-springboot/target/classes/com/ziplinegreen/vault/Model/Post.class
  22. 二進制
      server-springboot/target/classes/com/ziplinegreen/vault/Model/User.class
  23. 二進制
      server-springboot/target/classes/com/ziplinegreen/vault/Repository/PostRepository.class
  24. 二進制
      server-springboot/target/classes/com/ziplinegreen/vault/Repository/UsersRepository.class
  25. 二進制
      server-springboot/target/classes/com/ziplinegreen/vault/Service/PostService.class
  26. 二進制
      server-springboot/target/classes/com/ziplinegreen/vault/Service/UserService.class
  27. 二進制
      server-springboot/target/classes/com/ziplinegreen/vault/VaultApplication.class
  28. 二進制
      server-springboot/target/test-classes/com/ziplinegreen/vault/VaultApplicationTests.class
  29. 0
    0
      src/main/java/com/ziplinegreen/vault/Config/WebSocketConfig.java
  30. 0
    0
      src/main/java/com/ziplinegreen/vault/Controller/PostController.java
  31. 0
    0
      src/main/java/com/ziplinegreen/vault/Controller/UserController.java
  32. 0
    0
      src/main/java/com/ziplinegreen/vault/Exception/ResourceNotFoundException.java
  33. 0
    0
      src/main/java/com/ziplinegreen/vault/Model/AuditModel.java
  34. 0
    0
      src/main/java/com/ziplinegreen/vault/Model/Post.java
  35. 0
    26
      src/main/java/com/ziplinegreen/vault/Model/Repo.java
  36. 0
    0
      src/main/java/com/ziplinegreen/vault/Model/User.java
  37. 0
    0
      src/main/java/com/ziplinegreen/vault/Repository/PostRepository.java
  38. 0
    0
      src/main/java/com/ziplinegreen/vault/Repository/UsersRepository.java
  39. 0
    0
      src/main/java/com/ziplinegreen/vault/Service/PostService.java
  40. 0
    0
      src/main/java/com/ziplinegreen/vault/Service/UserService.java
  41. 0
    0
      src/main/java/com/ziplinegreen/vault/VaultApplication.java
  42. 0
    0
      src/main/resources/application.properties
  43. 0
    0
      src/main/resources/static/app.js
  44. 0
    0
      src/main/resources/static/index.html
  45. 0
    0
      src/test/java/com/ziplinegreen/vault/VaultApplicationTests.java
  46. 0
    0
      test.txt

二進制
.DS_Store 查看文件


server-springboot/ReadMe.md → ReadMe.md 查看文件


二進制
client-ionic/.DS_Store 查看文件


+ 0
- 0
client-ionic/ClientReadme.md 查看文件


+ 0
- 1
client-ionic/ionicvault

1
-Subproject commit 45681e801179caa485b4d2d9a5d1706cc2e96509

server-springboot/mvnw → mvnw 查看文件


server-springboot/mvnw.cmd → mvnw.cmd 查看文件


server-springboot/pom.xml → pom.xml 查看文件


二進制
server-springboot/.DS_Store 查看文件


二進制
server-springboot/src/.DS_Store 查看文件


二進制
server-springboot/src/main/.DS_Store 查看文件


二進制
server-springboot/src/main/resources/.DS_Store 查看文件


+ 0
- 69
server-springboot/src/main/resources/static/app.js 查看文件

1
-var stompClient = null;
2
-
3
-function setConnected(connected) {
4
-    $('#connect').prop("disabled", connected);
5
-    $('#disconnect').prop("disabled", !connected);
6
-    if (connected) {
7
-        $("#conversation").show();
8
-    }
9
-    else {
10
-        $("#conversation").hide();
11
-    }
12
-    $("#messages").html("");
13
-}
14
-
15
-function connect() {
16
-    var socket = new SockJS('/vault-socket');
17
-    stompClient = Stomp.over(socket);
18
-    stompClient.connect({}, function (frame) {
19
-        setConnected(true);
20
-        console.log('Connected: ' + frame);
21
-        stompClient.subscribe('/topic/posts', function (greeting) {
22
-            showGreeting(JSON.parse(greeting.body).message, JSON.parse(greeting.body).userName);
23
-        });
24
-    });
25
-}
26
-
27
-function disconnect() {
28
-    if (stompClient !== null) {
29
-        stompClient.disconnect();
30
-    }
31
-    setConnected(false);
32
-    console.log("Disconnected");
33
-}
34
-
35
-var userId = 1;
36
-var userPostUrl = "/app/posts";
37
-
38
-function user1() {
39
-    $('#user1').prop("disabled", true);
40
-    $('#user2').prop("disabled", false);
41
-    userId = 1;
42
-}
43
-
44
-function user2() {
45
-    $('#user1').prop("disabled", false);
46
-    $('#user2').prop("disabled", true);
47
-    userId = 2;
48
-}
49
-
50
-
51
-function sendName() {
52
-
53
-    stompClient.send(userPostUrl, {}, JSON.stringify({'id': '','message': $("#message").val(),'userId': userId}))
54
-}
55
-
56
-function showGreeting(message, userName) {
57
-    $("#messages").append("<tr><td>" + userName + ": " + message + "</td></tr>");
58
-}
59
-
60
-$(function () {
61
-    $("form").on('submit', function (e) {
62
-        e.preventDefault();
63
-    });
64
-    $( "#connect" ).click(function() { connect(); });
65
-    $( "#disconnect" ).click(function() { disconnect(); });
66
-    $( "#send" ).click(function() { sendName(); });
67
-    $( "#user1" ).click(function() { user1(); });
68
-    $( "#user2" ).click(function() { user2(); })
69
-});

+ 0
- 55
server-springboot/src/main/resources/static/index.html 查看文件

1
-<!DOCTYPE html>
2
-<html>
3
-<head>
4
-    <title>Hello WebSocket</title>
5
-    <link href="/webjars/bootstrap/css/bootstrap.min.css" rel="stylesheet">
6
-    <!--<link href="/main.css" rel="stylesheet">-->
7
-    <script src="/webjars/jquery/jquery.min.js"></script>
8
-    <script src="/webjars/sockjs-client/sockjs.min.js"></script>
9
-    <script src="/webjars/stomp-websocket/stomp.min.js"></script>
10
-    <script src="./app.js"></script>
11
-</head>
12
-<body>
13
-<noscript><h2 style="color: #ff0000">Seems your browser doesn't support Javascript! Websocket relies on Javascript being
14
-    enabled. Please enable
15
-    Javascript and reload this page!</h2></noscript>
16
-<div id="main-content" class="container">
17
-    <div class="row">
18
-        <div class="col-md-6">
19
-            <form class="form-inline">
20
-                <div class="form-group">
21
-                    <label for="connect">WebSocket connection:</label>
22
-                    <button id="connect" class="btn btn-default" type="submit">Connect</button>
23
-                    <button id="disconnect" class="btn btn-default" type="submit" disabled="disabled">Disconnect
24
-                    </button>
25
-                    <button id="user1" class="btn btn-default" type="submit" disabled="disabled">User 1</button>
26
-                    <button id="user2" class="btn btn-default" type="submit">User 2</button>
27
-                </div>
28
-            </form>
29
-        </div>
30
-        <div class="col-md-6">
31
-            <form class="form-inline">
32
-                <div class="form-group">
33
-                    <label for="message">Message?</label>
34
-                    <input type="text" id="message" class="form-control" placeholder="What is your message...">
35
-                </div>
36
-                <button id="send" class="btn btn-default" type="submit">Send</button>
37
-            </form>
38
-        </div>
39
-    </div>
40
-    <div class="row">
41
-        <div class="col-md-12">
42
-            <table id="conversation" class="table table-striped">
43
-                <thead>
44
-                <tr>
45
-                    <th>Messages</th>
46
-                </tr>
47
-                </thead>
48
-                <tbody id="messages">
49
-                </tbody>
50
-            </table>
51
-        </div>
52
-    </div>
53
-</div>
54
-</body>
55
-</html>

+ 0
- 34
server-springboot/target/classes/application.properties 查看文件

1
-## H2
2
-#spring.h2.console.enabled=true
3
-#spring.h2.console.path=/h2
4
-#
5
-## Datasource
6
-#spring.datasource.url=jdbc:h2:file:~/test
7
-#spring.datasource.username=sa
8
-#spring.datasource.password=
9
-#spring.datasource.driver-class-name=org.h2.Driver
10
-
11
-spring.datasource.url= jdbc:postgresql://localhost:5432/thevault 
12
-spring.datasource.username=postgres
13
-spring.datasource.password=ZipCode4dot1   
14
-spring.jpa.hibernate.ddl-auto=update
15
-
16
-#hibernate.jdbc.lob.non_contextual_creation=true
17
-# Disable feature detection by this undocumented parameter. Check the org.hibernate.engine.jdbc.internal.JdbcServiceImpl.configure method for more details.
18
-spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults = false
19
-
20
-# Because detection is disabled you have to set correct dialect by hand.
21
-spring.jpa.database-platform=org.hibernate.dialect.PostgreSQL9Dialect
22
-
23
-#spring.datasource.url=jdbc:mysql://localhost:3306/zipLine?useSSL=false
24
-#spring.datasource.username=root
25
-#spring.datasource.password=Calcifer1650
26
-#
27
-## The SQL dialect makes Hibernate generate better SQL for the chosen database
28
-#spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect
29
-#
30
-## Hibernate ddl auto (create, create-drop, validate, update)
31
-#spring.jpa.hibernate.ddl-auto = update
32
-#
33
-#logging.level.org.hibernate.SQL=DEBUG
34
-#logging.level.org.hibernate.type=TRACE

二進制
server-springboot/target/classes/com/ziplinegreen/vault/Config/WebSocketConfig.class 查看文件


二進制
server-springboot/target/classes/com/ziplinegreen/vault/Controller/PostController.class 查看文件


二進制
server-springboot/target/classes/com/ziplinegreen/vault/Controller/UserController.class 查看文件


二進制
server-springboot/target/classes/com/ziplinegreen/vault/Exception/ResourceNotFoundException.class 查看文件


二進制
server-springboot/target/classes/com/ziplinegreen/vault/Model/AuditModel.class 查看文件


二進制
server-springboot/target/classes/com/ziplinegreen/vault/Model/Post.class 查看文件


二進制
server-springboot/target/classes/com/ziplinegreen/vault/Model/User.class 查看文件


二進制
server-springboot/target/classes/com/ziplinegreen/vault/Repository/PostRepository.class 查看文件


二進制
server-springboot/target/classes/com/ziplinegreen/vault/Repository/UsersRepository.class 查看文件


二進制
server-springboot/target/classes/com/ziplinegreen/vault/Service/PostService.class 查看文件


二進制
server-springboot/target/classes/com/ziplinegreen/vault/Service/UserService.class 查看文件


二進制
server-springboot/target/classes/com/ziplinegreen/vault/VaultApplication.class 查看文件


二進制
server-springboot/target/test-classes/com/ziplinegreen/vault/VaultApplicationTests.class 查看文件


server-springboot/src/main/java/com/ziplinegreen/vault/Config/WebSocketConfig.java → src/main/java/com/ziplinegreen/vault/Config/WebSocketConfig.java 查看文件


server-springboot/src/main/java/com/ziplinegreen/vault/Controller/PostController.java → src/main/java/com/ziplinegreen/vault/Controller/PostController.java 查看文件


server-springboot/src/main/java/com/ziplinegreen/vault/Controller/UserController.java → src/main/java/com/ziplinegreen/vault/Controller/UserController.java 查看文件


server-springboot/src/main/java/com/ziplinegreen/vault/Exception/ResourceNotFoundException.java → src/main/java/com/ziplinegreen/vault/Exception/ResourceNotFoundException.java 查看文件


server-springboot/src/main/java/com/ziplinegreen/vault/Model/AuditModel.java → src/main/java/com/ziplinegreen/vault/Model/AuditModel.java 查看文件


server-springboot/src/main/java/com/ziplinegreen/vault/Model/Post.java → src/main/java/com/ziplinegreen/vault/Model/Post.java 查看文件


+ 0
- 26
src/main/java/com/ziplinegreen/vault/Model/Repo.java 查看文件

1
-package com.ziplinegreen.vault.Model;
2
-
3
-import javax.persistence.Entity;
4
-import javax.persistence.Table;
5
-import java.math.BigInteger;
6
-
7
-@Entity
8
-@Table(name = "repo")
9
-public class Repo {
10
-
11
-    private String clone_url;
12
-    private String created_at;
13
-    private String default_branch;
14
-    private String description;
15
-    private boolean empty;
16
-    private boolean fork;
17
-    private long forks_count;
18
-    private String full_name;
19
-    private String html_url;
20
-    private BigInteger id;
21
-    private boolean mirror;
22
-    private long name;
23
-    private long open_issues_count;
24
-    private User owner;
25
-
26
-}

server-springboot/src/main/java/com/ziplinegreen/vault/Model/User.java → src/main/java/com/ziplinegreen/vault/Model/User.java 查看文件


server-springboot/src/main/java/com/ziplinegreen/vault/Repository/PostRepository.java → src/main/java/com/ziplinegreen/vault/Repository/PostRepository.java 查看文件


server-springboot/src/main/java/com/ziplinegreen/vault/Repository/UsersRepository.java → src/main/java/com/ziplinegreen/vault/Repository/UsersRepository.java 查看文件


server-springboot/src/main/java/com/ziplinegreen/vault/Service/PostService.java → src/main/java/com/ziplinegreen/vault/Service/PostService.java 查看文件


server-springboot/src/main/java/com/ziplinegreen/vault/Service/UserService.java → src/main/java/com/ziplinegreen/vault/Service/UserService.java 查看文件


server-springboot/src/main/java/com/ziplinegreen/vault/VaultApplication.java → src/main/java/com/ziplinegreen/vault/VaultApplication.java 查看文件


server-springboot/src/main/resources/application.properties → src/main/resources/application.properties 查看文件


server-springboot/target/classes/static/app.js → src/main/resources/static/app.js 查看文件


server-springboot/target/classes/static/index.html → src/main/resources/static/index.html 查看文件


server-springboot/src/test/java/com/ziplinegreen/vault/VaultApplicationTests.java → src/test/java/com/ziplinegreen/vault/VaultApplicationTests.java 查看文件


server-springboot/test.txt → test.txt 查看文件