Skip to content

Commit

Permalink
[minor] Adding mobile version info in dashboard (#1253)
Browse files Browse the repository at this point in the history
Co-authored-by: Leonardo Miranda <[email protected]>
Co-authored-by: leo-miran <[email protected]>
Co-authored-by: JonahLuckett <[email protected]>
  • Loading branch information
4 people committed Sep 27, 2024
1 parent 806157b commit 4a2e6f6
Show file tree
Hide file tree
Showing 4 changed files with 419 additions and 354 deletions.
21 changes: 21 additions & 0 deletions image/cli/app-root/src/finalizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
from openshift.dynamic import DynamicClient
from slackclient import SlackClient
from subprocess import PIPE, Popen, TimeoutExpired
from mobilever import MobVer
import threading
from jira import JIRA


class RunCmdResult(object):
def __init__(self, returnCode, output, error):
self.rc = returnCode
Expand Down Expand Up @@ -371,6 +373,25 @@ def getcp4dCompsVersions():
print(f"Unable to determine Manage installed components: status.components unavailable")
except Exception as e:
print(f"Unable to determine Manage installed components: {e}")

# Get Mobile Components
# -------------------------------------------------------------------------
# Note: Only works for workspace "masdev"
try:
#getting versions from mobile
mobileVer = MobVer(instanceId=instanceId, dynClient=dynClient)
mobileComponents = mobileVer.get_graphite_versions()
treatedComponents={}
for key,value in mobileComponents.items():
if "mobileVersion" in value:
treatedComponents[key]={"enabled":True,"version":(value["mobileVersion"]+" || "+value["buildToolsVersion"])}

setObject[f"products.ibm-mas-mobile.buildId"] = "NA"
setObject[f"products.ibm-mas-mobile.buildNumber"] = "NA"
setObject[f"products.ibm-mas-mobile.version"] = mobileComponents["navigator"]["mobileVersion"]
setObject[f"products.ibm-mas-mobile.components"] = treatedComponents
except Exception as e:
print(f"Unable to determine Mobile installed components: {e}")

# Get Maximo Process Automation Engine (MPAE) version
# -------------------------------------------------------------------------
Expand Down
353 changes: 0 additions & 353 deletions image/cli/app-root/src/mobile-version-finder.py

This file was deleted.

Loading

0 comments on commit 4a2e6f6

Please sign in to comment.