[
https://issues.apache.org/jira/browse/ARTEMIS-4780?focusedWorklogId=929811&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-929811
]
ASF GitHub Bot logged work on ARTEMIS-4780:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 12/Aug/24 11:44
Start Date: 12/Aug/24 11:44
Worklog Time Spent: 10m
Work Description: gemmellr commented on code in PR #21:
URL:
https://github.com/apache/activemq-artemis-console/pull/21#discussion_r1713599637
##########
artemis-console-extension/artemis-extension/public/artemisconfig.json:
##########
@@ -0,0 +1,5 @@
+{
Review Comment:
This one probably fails the RAT check too.
##########
artemis-console-extension/artemis-extension/src/artemis-extension/artemis/config-manager.ts:
##########
@@ -0,0 +1,63 @@
+import { log } from "./globals"
Review Comment:
Missing licence header failed the build on the RAT check. Related, the RAT
check step only uploaded one result file, but they are generated per-module so
the failure isnt actually in the uploaded file.
##########
artemis-console-extension/artemis-extension/src/artemis-extension/artemis/config-manager.ts:
##########
@@ -0,0 +1,63 @@
+import { log } from "./globals"
+
+export type Artemisconfig = {
+ /**
+ * Configuration for branding & styles.
+ */
+ jmx: JMXConfig
+
+}
+
+/**
+ * JMX configuration type.
+ */
+export type JMXConfig = {
+ domain: string
+}
+
+export const ARTEMISCONFIG_JSON = 'artemisconfig.json'
+
+class ConfigManager {
+ private config?: Promise<Artemisconfig>
+
+ getArtemisconfig(): Promise<Artemisconfig> {
+ if (this.config) {
+ return this.config
+ }
+
+ this.config = this.loadConfig()
+ return this.config
+ }
+
+
+ private async loadConfig(): Promise<Artemisconfig> {
+
+ try {
+ const res = await fetch(ARTEMISCONFIG_JSON)
+ if (!res.ok) {
+
+ log.info("Unable to load Artemis Config using Default");
+ return {
+ jmx: {
+ domain: "org.apache.activemq.artemis"
+ }
+ }
+ }
+
+ const config = await res.json()
+
+ log.info("Loaded Artemis Config:", config);
+ return config
+ } catch (err) {
+ log.info("Unable to load Artemis Config using Default");
Review Comment:
Comma needed to make the log message more understandable: ", using Default"
##########
artemis-console-extension/artemis-extension/src/artemis-extension/artemis/config-manager.ts:
##########
@@ -0,0 +1,63 @@
+import { log } from "./globals"
+
+export type Artemisconfig = {
+ /**
+ * Configuration for branding & styles.
+ */
+ jmx: JMXConfig
+
+}
+
+/**
+ * JMX configuration type.
+ */
+export type JMXConfig = {
+ domain: string
+}
+
+export const ARTEMISCONFIG_JSON = 'artemisconfig.json'
+
+class ConfigManager {
+ private config?: Promise<Artemisconfig>
+
+ getArtemisconfig(): Promise<Artemisconfig> {
+ if (this.config) {
+ return this.config
+ }
+
+ this.config = this.loadConfig()
+ return this.config
+ }
+
+
+ private async loadConfig(): Promise<Artemisconfig> {
+
+ try {
+ const res = await fetch(ARTEMISCONFIG_JSON)
+ if (!res.ok) {
+
+ log.info("Unable to load Artemis Config using Default");
Review Comment:
Indentation seems wonky.
Comma needed to make the log message more understandable: ", using Default"
Issue Time Tracking
-------------------
Worklog Id: (was: 929811)
Time Spent: 2h 20m (was: 2h 10m)
> Artemis web console does not ever set 'artemisJmxDomain' in localStorage
> ------------------------------------------------------------------------
>
> Key: ARTEMIS-4780
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4780
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Affects Versions: 2.32.0
> Reporter: Josh Byster
> Assignee: Andy Taylor
> Priority: Minor
> Time Spent: 2h 20m
> Remaining Estimate: 0h
>
> We relocate our artemis packages as part of our shading process.
> I did set up:
>
> {code:java}
> aActiveMQServer.getConfiguration().setJMXDomain("com.abc.shaded.org.apache.activemq.artemis");
> {code}
> However the web console does not show up. I noticed in the code it's because
> we try to read in localStorage['artemisJmxDomain'] but never actually set it
> as far as I can tell. Thus we always default to org.apache.activemq.artemis.
> Everything works properly when setting localStorage['artemisJmxDomain'] =
> "com.abc.shaded.org.apache.activemq.artemis"
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact