Skip to content

Commit 9bdd729

Browse files
authored
Merge pull request #5416 from stroomworks1876/gchq/3206
#3206 user tab sessions
2 parents 19795e7 + 11fb365 commit 9bdd729

93 files changed

Lines changed: 3821 additions & 705 deletions

File tree

Some content is hidden

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

config/checkstyle/checkstyle.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@
186186
stroom.explorer.impl.db.jooq.tables.ExplorerFavourite.*,
187187
stroom.explorer.impl.db.jooq.tables.ExplorerNode.*,
188188
stroom.explorer.impl.db.jooq.tables.ExplorerPath.*,
189+
stroom.explorer.impl.db.jooq.tables.TabSession.*,
190+
stroom.explorer.impl.db.jooq.tables.TabSessionDocRef.*,
189191
stroom.gitrepo.impl.db.jooq.tables.GitRepo.*,
190192
stroom.index.impl.db.jooq.tables.IndexField.*,
191193
stroom.index.impl.db.jooq.tables.IndexFieldSource.*,

stroom-app-gwt/src/main/java/stroom/app/client/App.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ public void onModuleLoad() {
8787
// at some point.
8888
// ginjector.getPlaceManager().revealCurrentPlace();
8989
}, new QuietTaskMonitorFactory());
90+
91+
ginjector.getTabSessionManager().getTabSessionsThenAccept(s ->
92+
ginjector.getNavigationPlugin().setTabSessions(s));
9093
}
9194
}
9295

stroom-app-gwt/src/main/java/stroom/app/client/gin/AppModule.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@
5858
import stroom.explorer.client.presenter.NavigationPresenter.NavigationView;
5959
import stroom.explorer.client.presenter.RecentItemsPresenter;
6060
import stroom.explorer.client.presenter.RecentItemsPresenter.RecentItemsProxy;
61+
import stroom.explorer.client.presenter.TabSessionChooserPresenter;
62+
import stroom.explorer.client.presenter.TabSessionChooserPresenter.TabSessionChooserView;
6163
import stroom.explorer.client.presenter.TypeFilterPresenter;
6264
import stroom.explorer.client.presenter.TypeFilterPresenter.TypeFilterView;
6365
import stroom.explorer.client.presenter.TypeFilterViewImpl;
@@ -67,6 +69,7 @@
6769
import stroom.explorer.client.view.ExplorerNodeRemoveTagsViewImpl;
6870
import stroom.explorer.client.view.FindInContentViewImpl;
6971
import stroom.explorer.client.view.NavigationViewImpl;
72+
import stroom.explorer.client.view.TabSessionChooserViewImpl;
7073
import stroom.hyperlink.client.HyperlinkEventHandlerImpl;
7174
import stroom.iframe.client.presenter.IFrameContentPresenter;
7275
import stroom.iframe.client.presenter.IFrameContentPresenter.IFrameContentView;
@@ -84,6 +87,9 @@
8487
import stroom.widget.menu.client.presenter.MenuPresenter;
8588
import stroom.widget.menu.client.presenter.MenuPresenter.MenuView;
8689
import stroom.widget.menu.client.presenter.MenuViewImpl;
90+
import stroom.widget.popup.client.presenter.TextBoxPopup;
91+
import stroom.widget.popup.client.presenter.TextBoxPopup.TextBoxView;
92+
import stroom.widget.popup.client.view.TextBoxViewImpl;
8793
import stroom.widget.tab.client.presenter.CurveTabLayoutView;
8894
import stroom.widget.tab.client.view.CurveTabLayoutViewImpl;
8995
import stroom.widget.tooltip.client.presenter.TooltipPresenter;
@@ -175,6 +181,8 @@ protected void configure() {
175181
RecentItemsPresenter.class,
176182
RecentItemsProxy.class);
177183

184+
bind(TabSessionChooserPresenter.class);
185+
178186
// Menu
179187
bind(Menu.class).asEagerSingleton();
180188
bind(MenuItems.class).in(Singleton.class);
@@ -186,5 +194,8 @@ protected void configure() {
186194
bindSharedView(PagerView.class, PagerViewImpl.class);
187195
bindSharedView(PagerViewWithHeading.class, PagerViewWithHeadingImpl.class);
188196
bindSharedView(LinkTabPanelView.class, LinkTabPanelViewImpl.class);
197+
bindSharedView(TabSessionChooserView.class, TabSessionChooserViewImpl.class);
198+
199+
bindPresenterWidget(TextBoxPopup.class, TextBoxView.class, TextBoxViewImpl.class);
189200
}
190201
}

stroom-app-gwt/src/main/java/stroom/app/client/gin/PluginsGinjector.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,18 @@
1616

1717
package stroom.app.client.gin;
1818

19+
import stroom.explorer.client.NavigationPlugin;
20+
import stroom.explorer.client.presenter.TabSessionManager;
1921
import stroom.help.client.HelpPlugin;
2022

2123
import com.google.gwt.inject.client.AsyncProvider;
2224

2325
public interface PluginsGinjector {
2426

2527
AsyncProvider<HelpPlugin> getHelpPlugin();
28+
29+
TabSessionManager getTabSessionManager();
30+
31+
NavigationPlugin getNavigationPlugin();
32+
2633
}

stroom-app-gwt/src/main/java/stroom/app/client/gin/PluginsModule.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import stroom.core.client.gin.PluginModule;
2020
import stroom.document.client.DocumentPluginEventManager;
2121
import stroom.explorer.client.NavigationPlugin;
22+
import stroom.explorer.client.presenter.TabSessionManager;
2223
import stroom.help.client.HelpPlugin;
2324
import stroom.trackers.client.TrackersPlugin;
2425

@@ -31,5 +32,6 @@ protected void configure() {
3132
bindPlugin(HelpPlugin.class);
3233
bindPlugin(TrackersPlugin.class);
3334
bindPlugin(NavigationPlugin.class);
35+
bindPlugin(TabSessionManager.class);
3436
}
3537
}

stroom-app/src/main/java/stroom/app/guice/CoreModule.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ protected void configure() {
7474
install(new stroom.dropwizard.common.DropwizardModule());
7575
install(new stroom.explorer.impl.ExplorerFavModule());
7676
install(new stroom.explorer.impl.db.ExplorerFavDbModule());
77+
install(new stroom.explorer.impl.db.TabSessionDbModule());
7778
install(new stroom.event.logging.impl.EventLoggingModule());
7879
install(new stroom.event.logging.rs.impl.RestResourceAutoLoggerModule());
7980
install(new stroom.explorer.impl.ExplorerModule());

stroom-app/src/main/resources/ui/noauth/swagger/stroom.json

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11140,6 +11140,90 @@
1114011140
"tags" : [ "System Info" ]
1114111141
}
1114211142
},
11143+
"/tabSession/v1" : {
11144+
"delete" : {
11145+
"operationId" : "deleteTabSession",
11146+
"requestBody" : {
11147+
"content" : {
11148+
"application/json" : {
11149+
"schema" : {
11150+
"$ref" : "#/components/schemas/TabSessionDeleteRequest"
11151+
}
11152+
}
11153+
},
11154+
"description" : "request",
11155+
"required" : true
11156+
},
11157+
"responses" : {
11158+
"default" : {
11159+
"content" : {
11160+
"application/json" : {
11161+
"schema" : {
11162+
"type" : "array",
11163+
"items" : {
11164+
"$ref" : "#/components/schemas/TabSession"
11165+
}
11166+
}
11167+
}
11168+
},
11169+
"description" : "default response"
11170+
}
11171+
},
11172+
"summary" : "Deletes a tab session",
11173+
"tags" : [ "Tab Sessions" ]
11174+
},
11175+
"get" : {
11176+
"operationId" : "getForCurrentUser",
11177+
"responses" : {
11178+
"default" : {
11179+
"content" : {
11180+
"application/json" : {
11181+
"schema" : {
11182+
"type" : "array",
11183+
"items" : {
11184+
"$ref" : "#/components/schemas/TabSession"
11185+
}
11186+
}
11187+
}
11188+
},
11189+
"description" : "default response"
11190+
}
11191+
},
11192+
"summary" : "Get tab sessions for the current user",
11193+
"tags" : [ "Tab Sessions" ]
11194+
},
11195+
"post" : {
11196+
"operationId" : "addTabSession",
11197+
"requestBody" : {
11198+
"content" : {
11199+
"application/json" : {
11200+
"schema" : {
11201+
"$ref" : "#/components/schemas/TabSessionAddRequest"
11202+
}
11203+
}
11204+
},
11205+
"description" : "request",
11206+
"required" : true
11207+
},
11208+
"responses" : {
11209+
"default" : {
11210+
"content" : {
11211+
"application/json" : {
11212+
"schema" : {
11213+
"type" : "array",
11214+
"items" : {
11215+
"$ref" : "#/components/schemas/TabSession"
11216+
}
11217+
}
11218+
}
11219+
},
11220+
"description" : "default response"
11221+
}
11222+
},
11223+
"summary" : "Add a tab session for the current user",
11224+
"tags" : [ "Tab Sessions" ]
11225+
}
11226+
},
1114311227
"/task/v1/find/{nodeName}" : {
1114411228
"post" : {
1114511229
"operationId" : "findTasks",
@@ -24981,6 +25065,54 @@
2498125065
}
2498225066
} ]
2498325067
},
25068+
"TabSession" : {
25069+
"type" : "object",
25070+
"properties" : {
25071+
"docRefs" : {
25072+
"type" : "array",
25073+
"items" : {
25074+
"$ref" : "#/components/schemas/DocRef"
25075+
}
25076+
},
25077+
"name" : {
25078+
"type" : "string"
25079+
},
25080+
"sessionId" : {
25081+
"type" : "string"
25082+
},
25083+
"userId" : {
25084+
"type" : "string"
25085+
}
25086+
}
25087+
},
25088+
"TabSessionAddRequest" : {
25089+
"type" : "object",
25090+
"properties" : {
25091+
"docRefs" : {
25092+
"type" : "array",
25093+
"items" : {
25094+
"$ref" : "#/components/schemas/DocRef"
25095+
}
25096+
},
25097+
"name" : {
25098+
"type" : "string"
25099+
},
25100+
"sessionId" : {
25101+
"type" : "string"
25102+
}
25103+
}
25104+
},
25105+
"TabSessionDeleteRequest" : {
25106+
"type" : "object",
25107+
"properties" : {
25108+
"name" : {
25109+
"type" : "string"
25110+
},
25111+
"sessionId" : {
25112+
"type" : "string"
25113+
}
25114+
}
25115+
},
2498425116
"TableBuilderAnalyticProcessConfig" : {
2498525117
"type" : "object",
2498625118
"allOf" : [ {

stroom-app/src/main/resources/ui/noauth/swagger/stroom.yaml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7606,6 +7606,63 @@ paths:
76067606
summary: Get a system info result by name
76077607
tags:
76087608
- System Info
7609+
/tabSession/v1:
7610+
delete:
7611+
operationId: deleteTabSession
7612+
requestBody:
7613+
content:
7614+
application/json:
7615+
schema:
7616+
$ref: "#/components/schemas/TabSessionDeleteRequest"
7617+
description: request
7618+
required: true
7619+
responses:
7620+
default:
7621+
content:
7622+
application/json:
7623+
schema:
7624+
type: array
7625+
items:
7626+
$ref: "#/components/schemas/TabSession"
7627+
description: default response
7628+
summary: Deletes a tab session
7629+
tags:
7630+
- Tab Sessions
7631+
get:
7632+
operationId: getForCurrentUser
7633+
responses:
7634+
default:
7635+
content:
7636+
application/json:
7637+
schema:
7638+
type: array
7639+
items:
7640+
$ref: "#/components/schemas/TabSession"
7641+
description: default response
7642+
summary: Get tab sessions for the current user
7643+
tags:
7644+
- Tab Sessions
7645+
post:
7646+
operationId: addTabSession
7647+
requestBody:
7648+
content:
7649+
application/json:
7650+
schema:
7651+
$ref: "#/components/schemas/TabSessionAddRequest"
7652+
description: request
7653+
required: true
7654+
responses:
7655+
default:
7656+
content:
7657+
application/json:
7658+
schema:
7659+
type: array
7660+
items:
7661+
$ref: "#/components/schemas/TabSession"
7662+
description: default response
7663+
summary: Add a tab session for the current user
7664+
tags:
7665+
- Tab Sessions
76097666
/task/v1/find/{nodeName}:
76107667
post:
76117668
operationId: findTasks
@@ -18556,6 +18613,37 @@ components:
1855618613
type: array
1855718614
items:
1855818615
$ref: "#/components/schemas/TabConfig"
18616+
TabSession:
18617+
type: object
18618+
properties:
18619+
docRefs:
18620+
type: array
18621+
items:
18622+
$ref: "#/components/schemas/DocRef"
18623+
name:
18624+
type: string
18625+
sessionId:
18626+
type: string
18627+
userId:
18628+
type: string
18629+
TabSessionAddRequest:
18630+
type: object
18631+
properties:
18632+
docRefs:
18633+
type: array
18634+
items:
18635+
$ref: "#/components/schemas/DocRef"
18636+
name:
18637+
type: string
18638+
sessionId:
18639+
type: string
18640+
TabSessionDeleteRequest:
18641+
type: object
18642+
properties:
18643+
name:
18644+
type: string
18645+
sessionId:
18646+
type: string
1855918647
TableBuilderAnalyticProcessConfig:
1856018648
type: object
1856118649
allOf:

0 commit comments

Comments
 (0)