Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit044661e

Browse files
committed
implement tracking activity with amqp
1 parent7cf27f2 commit044661e

File tree

78 files changed

+1037
-422
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+1037
-422
lines changed

‎front-end/src/modals/CardModal.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<divclass="description"v-show="description && !editingDescription"v-html="descriptionHtml"></div>
3434
</div>
3535
</div>
36-
<divclass="wrapper attachments-wrapper"v-show="attachments.length">
36+
<divclass="wrapper attachments-wrapper"v-show="attachments.length || uploadingCount">
3737
<h5><font-awesome-iconicon="paperclip"class="icon"/> <span>Attachments</span></h5>
3838
<divclass="wrapper-body">
3939
<divclass="uploading"v-show="uploadingCount"><font-awesome-iconicon="spinner"class="fa-spin"spin/>Uploading...</div>

‎pom.xml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@
6565
</exclusion>
6666
</exclusions>
6767
</dependency>
68+
<dependency>
69+
<groupId>org.springframework.boot</groupId>
70+
<artifactId>spring-boot-starter-amqp</artifactId>
71+
</dependency>
6872
<dependency>
6973
<groupId>mysql</groupId>
7074
<artifactId>mysql-connector-java</artifactId>

‎setup/2.refactoring-database.sql‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ ALTER TABLE `task_agile`.`card` ADD CONSTRAINT `fk_card_board_board_id`
1515
ALTERTABLE`task_agile`.`activity` CHANGE COLUMN`board_id``board_id`INT(11)NULL COMMENT'' AFTER`card_id`;
1616
-- Change type to support integer value other than 0, 1
1717
ALTERTABLE`task_agile`.`activity` CHANGE COLUMN`type``type`INT(11)NOT NULL COMMENT'' AFTER`board_id`;
18+
-- Add `ip_address` to activity table
19+
ALTERTABLE`task_agile`.`activity` ADD COLUMN`ip_address`VARCHAR(64) CHARACTERSET utf8 COLLATE utf8_binNOT NULL DEFAULT'' AFTER`detail`;
20+
1821
-- Change file_type to be a varchar
1922
ALTERTABLE`task_agile`.`attachment` CHANGE COLUMN`file_type``file_type`VARCHAR(32)NOT NULL DEFAULT'' COMMENT'' AFTER`file_path`;
2023
-- Add thumbnail_created to attachment
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
packagecom.taskagile.config;
2+
3+
importorg.springframework.amqp.core.Binding;
4+
importorg.springframework.amqp.core.BindingBuilder;
5+
importorg.springframework.amqp.core.FanoutExchange;
6+
importorg.springframework.amqp.core.Queue;
7+
importorg.springframework.context.annotation.Bean;
8+
importorg.springframework.context.annotation.Configuration;
9+
10+
@Configuration
11+
publicclassMessageConfiguration {
12+
13+
@Bean
14+
publicFanoutExchangedomainEventsExchange() {
15+
returnnewFanoutExchange("ta.domain.events",true,false);
16+
}
17+
18+
@Bean
19+
publicQueueactivityTrackingQueue() {
20+
returnnewQueue("ta.activity.tracking",true);
21+
}
22+
23+
@Bean
24+
publicBindingbindingActivityTracking(FanoutExchangeexchange,QueueactivityTrackingQueue) {
25+
returnBindingBuilder.bind(activityTrackingQueue).to(exchange);
26+
}
27+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
packagecom.taskagile.domain.application;
2+
3+
importcom.taskagile.domain.model.activity.Activity;
4+
5+
publicinterfaceActivityService {
6+
7+
/**
8+
* Save an activity
9+
*
10+
* @param activity the activity instance
11+
*/
12+
voidsaveActivity(Activityactivity);
13+
}

‎src/main/java/com/taskagile/domain/application/BoardService.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
packagecom.taskagile.domain.application;
22

3+
importcom.taskagile.domain.application.commands.AddBoardMemberCommand;
34
importcom.taskagile.domain.application.commands.CreateBoardCommand;
45
importcom.taskagile.domain.model.board.Board;
56
importcom.taskagile.domain.model.board.BoardId;
@@ -47,10 +48,9 @@ public interface BoardService {
4748
/**
4849
* Add board member
4950
*
50-
* @param boardId id of the board
51-
* @param usernameOrEmailAddress username or email address
51+
* @param command the command instance
5252
* @return newly added member user
5353
* @throws UserNotFoundException user by the usernameOrEmailAddress not found
5454
*/
55-
UseraddMember(BoardIdboardId,StringusernameOrEmailAddress)throwsUserNotFoundException;
55+
UseraddMember(AddBoardMemberCommandcommand)throwsUserNotFoundException;
5656
}

‎src/main/java/com/taskagile/domain/application/TeamService.java‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
packagecom.taskagile.domain.application;
22

33
importcom.taskagile.domain.application.commands.CreateTeamCommand;
4-
importcom.taskagile.domain.model.board.Board;
54
importcom.taskagile.domain.model.team.Team;
65
importcom.taskagile.domain.model.team.TeamId;
76
importcom.taskagile.domain.model.user.UserId;

‎src/main/java/com/taskagile/domain/application/UserService.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
packagecom.taskagile.domain.application;
22

3-
importcom.taskagile.domain.application.commands.RegistrationCommand;
3+
importcom.taskagile.domain.application.commands.RegisterCommand;
44
importcom.taskagile.domain.model.user.RegistrationException;
55
importcom.taskagile.domain.model.user.User;
66
importcom.taskagile.domain.model.user.UserId;
@@ -19,10 +19,10 @@ public interface UserService extends UserDetailsService {
1919
/**
2020
* Register a new user with username, email address, and password.
2121
*
22-
* @param command instance of <code>RegistrationCommand</code>
22+
* @param command instance of <code>RegisterCommand</code>
2323
* @throws RegistrationException when registration failed. Possible reasons are:
2424
* 1) Username already exists
2525
* 2) Email address already exists.
2626
*/
27-
voidregister(RegistrationCommandcommand)throwsRegistrationException;
27+
voidregister(RegisterCommandcommand)throwsRegistrationException;
2828
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
packagecom.taskagile.domain.application.commands;
2+
3+
importcom.taskagile.domain.model.board.BoardId;
4+
5+
publicclassAddBoardMemberCommandextendsUserCommand {
6+
7+
privateBoardIdboardId;
8+
privateStringusernameOrEmailAddress;
9+
10+
publicAddBoardMemberCommand(BoardIdboardId,StringusernameOrEmailAddress) {
11+
this.boardId =boardId;
12+
this.usernameOrEmailAddress =usernameOrEmailAddress;
13+
}
14+
15+
publicBoardIdgetBoardId() {
16+
returnboardId;
17+
}
18+
19+
publicStringgetUsernameOrEmailAddress() {
20+
returnusernameOrEmailAddress;
21+
}
22+
}
Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
packagecom.taskagile.domain.application.commands;
22

33
importcom.taskagile.domain.model.card.CardId;
4-
importcom.taskagile.domain.model.user.UserId;
54
importorg.springframework.web.multipart.MultipartFile;
65

7-
publicclassAddCardAttachmentCommand {
6+
publicclassAddCardAttachmentCommandextendsUserCommand{
87

98
privateCardIdcardId;
109
privateMultipartFilefile;
11-
privateUserIduserId;
1210

13-
publicAddCardAttachmentCommand(longcardId,MultipartFilefile,UserIduserId) {
11+
publicAddCardAttachmentCommand(longcardId,MultipartFilefile) {
1412
this.cardId =newCardId(cardId);
1513
this.file =file;
16-
this.userId =userId;
1714
}
1815

1916
publicCardIdgetCardId() {
@@ -23,8 +20,4 @@ public CardId getCardId() {
2320
publicMultipartFilegetFile() {
2421
returnfile;
2522
}
26-
27-
publicUserIdgetUserId() {
28-
returnuserId;
29-
}
3023
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp