File tree Expand file tree Collapse file tree 4 files changed +36
-1
lines changed
api/src/main/java/com/intuit/tank/vm/settings
tools/agent_debugger/src/main/java/com/intuit/tank/tools/debugger
web_support/src/main/java/com/intuit/tank
web_ui/src/main/webapp/projects Expand file tree Collapse file tree 4 files changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,8 @@ public class TankConfig extends BaseCommonsXmlConfig {
58
58
private static final String KEY_REPORTING_NODE = "reporting" ;
59
59
private static final String KEY_OIDC_SSO_NODE = "oidc-sso" ;
60
60
61
+ private static final String KEY_BANNER_TEXT = "banner-text" ;
62
+
61
63
private static String configName = CONFIG_NAME ;
62
64
63
65
static {
@@ -118,6 +120,14 @@ public String getDataFileStorageDir() {
118
120
public boolean isRestSecurityEnabled () {
119
121
return config .getBoolean (KEY_REST_SECURITY_ENABLED , false );
120
122
}
123
+
124
+ /**
125
+ * @return banner text
126
+ */
127
+ public String getTextBanner () {
128
+ return config .getString (KEY_BANNER_TEXT , "" );
129
+ }
130
+
121
131
/**
122
132
* @return true if rest security is enabled
123
133
*/
Original file line number Diff line number Diff line change @@ -380,7 +380,8 @@ public void actionPerformed(ActionEvent event) {
380
380
baseURLPanel .setBorder (BorderFactory .createTitledBorder ("Intuit/Tank Base URL" ));
381
381
JPanel tokenPanel = new JPanel ();
382
382
comboBox .setPreferredSize (new Dimension (375 ,25 ));
383
- tokenPanel .setBorder (BorderFactory .createTitledBorder ("Intuit/Tank Token" ));
383
+ tokenPanel .setBorder (BorderFactory .createTitledBorder ("Intuit/Tank Token*" ));
384
+ tokenPanel .setToolTipText ("Generate a Tank API token by logging into Tank and going to 'Account Settings' on the upper right to create a token for this specific host. " );
384
385
final JTextField tokenField = new JTextField ();
385
386
tokenField .setPreferredSize (new Dimension (375 ,25 ));
386
387
baseURLPanel .add (comboBox );
Original file line number Diff line number Diff line change 16
16
import java .io .Serializable ;
17
17
import java .util .List ;
18
18
19
+ import com .intuit .tank .vm .settings .TankConfig ;
19
20
import jakarta .annotation .PostConstruct ;
20
21
import jakarta .enterprise .event .Event ;
21
22
import jakarta .faces .model .SelectItem ;
@@ -44,6 +45,9 @@ public class ProjectDescriptionBean extends SelectableBean<Project> implements S
44
45
45
46
private static final long serialVersionUID = 1L ;
46
47
48
+ @ Inject
49
+ private TankConfig tankConfig ;
50
+
47
51
@ Inject
48
52
private ProjectLoader projectLoader ;
49
53
@@ -70,6 +74,14 @@ public void init() {
70
74
tablePrefs .registerListener (userPrefs );
71
75
}
72
76
77
+ public String getBannerMessage () {
78
+ return tankConfig .getTextBanner ();
79
+ }
80
+
81
+ public boolean isBannerVisible () {
82
+ return !tankConfig .getTextBanner ().isEmpty ();
83
+ }
84
+
73
85
public void deleteSelectedProject () {
74
86
if (selectedProject != null ) {
75
87
delete (selectedProject .getEntity ());
Original file line number Diff line number Diff line change 35
35
</ ts:toolbar >
36
36
37
37
< div class ="vertical-spacer " />
38
+
39
+ <!-- Section for Banners on project page - configurable via settings file -->
40
+
41
+ < p:panel id ="banner-text "
42
+ styleClass ="d-flex align-items-center justify-content-between p-3 flex-wrap "
43
+ style ="background-color: #dfeffc; color: #000; font-size: 0.8rem; font-weight: bold; border-radius: 10px; "
44
+ visible ="#{projectDescriptionBean.bannerVisible} ">
45
+ < h:outputText styleClass ="mr-8 " value ="#{projectDescriptionBean.getBannerMessage()} " />
46
+ < br />
47
+ < br />
48
+ </ p:panel >
49
+
38
50
< p:growl globalOnly ="true " id ="messages " autoUpdate ="true " />
39
51
40
52
< pe:remoteCommand id ="resizeListener " name ="resizeFinished " update ="projectTableId " />
You can’t perform that action at this time.
0 commit comments