pyegeria 5.2__py3-none-any.whl → 5.2.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyegeria/.DS_Store +0 -0
- pyegeria/__init__.py +0 -2
- pyegeria/_client.py +2 -7
- pyegeria/asset_catalog_omvs.py +0 -34
- pyegeria/classification_manager_omvs.py +3 -2
- pyegeria/collection_manager_omvs.py +45 -92
- pyegeria/commands/.DS_Store +0 -0
- pyegeria/commands/README.md +1 -2
- pyegeria/commands/cat/__init__.py +5 -1
- pyegeria/commands/cat/get_collection.py +14 -23
- pyegeria/commands/cat/get_tech_type_elements.py +1 -1
- pyegeria/commands/cat/glossary_actions.py +8 -28
- pyegeria/commands/cat/list_assets.py +17 -8
- pyegeria/commands/cat/list_collections.py +5 -10
- pyegeria/commands/cat/list_deployed_catalogs.py +2 -4
- pyegeria/commands/cat/list_deployed_database_schemas.py +14 -8
- pyegeria/commands/cat/list_deployed_databases.py +3 -2
- pyegeria/commands/cat/list_tech_types.py +24 -36
- pyegeria/commands/cat/list_terms.py +2 -4
- pyegeria/commands/cli/egeria.py +108 -104
- pyegeria/commands/cli/egeria_cat.py +54 -53
- pyegeria/commands/cli/egeria_my.py +33 -25
- pyegeria/commands/cli/egeria_ops.py +40 -38
- pyegeria/commands/cli/egeria_tech.py +41 -55
- pyegeria/commands/cli/ops_config.py +1 -3
- pyegeria/commands/doc/.DS_Store +0 -0
- pyegeria/commands/doc/Visual Command Reference/.DS_Store +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/.DS_Store +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/CleanShot 2024-11-20 at 16.17.43@2x.png +0 -0
- pyegeria/commands/doc/{README.md → command-overview.md} +5 -50
- pyegeria/commands/doc/glossary/.DS_Store +0 -0
- pyegeria/commands/doc/glossary/images/.DS_Store +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/.DS_Store +0 -0
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/{README.md → hey_egeria: overview.md } +1 -1
- pyegeria/commands/doc/hey_egeria: a pyegeria command line interface/images/.DS_Store +0 -0
- pyegeria/commands/my/monitor_my_todos.py +5 -17
- pyegeria/commands/my/monitor_open_todos.py +1 -1
- pyegeria/commands/ops/monitor_asset_events.py +22 -27
- pyegeria/commands/ops/monitor_engine_activity_c.py +1 -1
- pyegeria/commands/ops/monitor_gov_eng_status.py +4 -31
- pyegeria/commands/ops/monitor_integ_daemon_status.py +14 -17
- pyegeria/commands/ops/monitor_platform_status.py +1 -1
- pyegeria/commands/ops/orig_monitor_server_status.py +21 -36
- pyegeria/commands/ops/refresh_integration_daemon.py +1 -1
- pyegeria/commands/ops/restart_integration_daemon.py +1 -1
- pyegeria/commands/tech/get_tech_details.py +42 -79
- pyegeria/commands/tech/get_tech_type_template.py +53 -69
- pyegeria/commands/tech/list_anchored_elements.py +15 -18
- pyegeria/commands/tech/list_elements_x.py +4 -7
- pyegeria/commands/tech/list_registered_services.py +1 -1
- pyegeria/commands/tech/list_relationship_types.py +21 -19
- pyegeria/commands/tech/list_relationships.py +3 -7
- pyegeria/commands/tech/table_tech_templates.py +1 -3
- pyegeria/create_tech_guid_lists.py +2 -2
- pyegeria/egeria_client.py +0 -2
- pyegeria/egeria_tech_client.py +0 -5
- pyegeria/glossary_manager_omvs.py +7 -101
- pyegeria/server_operations.py +4 -4
- pyegeria/template_manager_omvs.py +3 -1
- pyegeria/valid_metadata_omvs.py +1 -1
- {pyegeria-5.2.dist-info → pyegeria-5.2.0.2.dist-info}/METADATA +5 -3
- pyegeria-5.2.0.2.dist-info/RECORD +185 -0
- {pyegeria-5.2.dist-info → pyegeria-5.2.0.2.dist-info}/entry_points.txt +0 -2
- pyegeria/commands/cat/list_tech_type_elements.py +0 -190
- pyegeria/commands/cli/egeria_login_tui.py +0 -313
- pyegeria/commands/cli/txt_custom_v2.tcss +0 -19
- pyegeria/commands/doc/Visual Command Reference/README.md +0 -511
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-data-catalogs 2024-12-17 at 15.43.27@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-schemas 2024-11-25 at 20.14.50@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-schemas 2024-12-17 at 15.48.38@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-servers 2024-11-25 at 20.21.25@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed-servers 2024-12-17 at 15.52.16@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/deployed-data/deployed_databases 2024-12-16 at 16.40.31@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/glossary/list-glossaries 2024-11-25 at 20.30.02.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/glossary/list-terms 2024-11-25 at 20.32.11.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/asset-types 2024-11-25 at 20.34.19@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/certification-types 2024-11-25 at 20.37.07.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/collection-graph 2024-12-12 at 11.33.18@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-collections 2024-12-10 at 14.25.51@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-todos 2024-12-12 at 11.46.30@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/list-user-ids 2024-12-12 at 11.51.09@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/info/tech-types 2024-12-12 at 11.37.20@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/projects/project_dependencies 2024-12-14 at 16.24.39@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/projects/project_structure 2024-12-14 at 16.21.35@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/cat/show/projects/projects 2024-12-14 at 16.18.10@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/hey_egeria tui 2024-12-16 at 16.58.22@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/my/show/my_profile 2024-12-14 at 16.29.27@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/my/show/my_roles 2024-12-14 at 16.32.10@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/my/show/my_todos 2024-12-15 at 16.24.13@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/my/show/open_todos 2024-12-14 at 16.36.12@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/engines/list_engine_activity compressed 2024-12-15 at 16.48.48@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_activity 2024-12-15 at 16.32.55@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_activity compressed 2024-12-15 at 16.38.29@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/engines/monitor_engine_status 2024-12-15 at 16.51.26.jpeg +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/integrations/monitor_integration_daemon_status 2024-12-15 at 16.57.12@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/integrations/monitor_integration_targets 2024-12-15 at 17.02.19@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/platforms/monitor_platform_status 2024-12-15 at 19.53.18@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_server_status 2024-12-15 at 19.59.39@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_server_status full 2024-12-15 at 20.01.57@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/ops/show/servers/monitor_startup_servers 2024-12-15 at 19.56.07@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/get_anchored_elements 2024-12-15 at 21.25.41@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/get_elements_of_om_type 2024-12-16 at 14.39.59@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/info_for_guid 2024-12-16 at 11.35.29@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_by_om-type 2024-12-16 at 14.24.18@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_by_om-type extended 2024-12-16 at 14.28.46@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/list_elements_of_om_type_by_classification 2024-12-16 at 14.35.26@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/related_elements 2024-12-16 at 14.55.01@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/elements/show_related_specifications 2024-12-16 at 15.04.55@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/asset_types 2024-12-16 at 15.10.16@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/detailed_governance_action_processes 2024-12-16 at 15.16.26@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/governance_action_processes 2024-12-16 at 15.13.01@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/registered_services 2024-12-16 at 16.44.54@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/relationship_types 2024-12-16 at 16.20.34@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/relationship_types 2024-12-19 at 10.51.54@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-info/valid_metadata_values 2024-12-16 at 15.31.56@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/list_tech_type_template_specs 2024-12-16 at 16.03.22@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/list_technology_types 2024-12-16 at 15.39.20@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/tech_type_details 2024-12-16 at 15.37.21@2x.png +0 -0
- pyegeria/commands/doc/Visual Command Reference/tech/show/tech-types/tech_type_templates 2024-12-16 at 16.11.48@2x.png +0 -0
- pyegeria/metadata_explorer_omvs.py +0 -2371
- pyegeria-5.2.dist-info/RECORD +0 -232
- /pyegeria/commands/doc/Visual Command Reference/cat/show/assets/{asset-graph 2024-11-20 at 15.56.42.png → Asset-graph 2024-11-20 at 15.56.42.png} +0 -0
- /pyegeria/commands/doc/Visual Command Reference/cat/show/assets/{assets-in-domain 2024-11-20 at 15.49.55@2x.png → Assets-in-domain 2024-11-20 at 15.49.55@2x.png} +0 -0
- /pyegeria/commands/doc/Visual Command Reference/cat/show/{deployed-data/deployed-data-catalogs-2024-11-20 at 16.17.43@2x.png → assets/deployed-catalogs 2024-11-20 at 16.17.43@2x.png} +0 -0
- {pyegeria-5.2.dist-info → pyegeria-5.2.0.2.dist-info}/LICENSE +0 -0
- {pyegeria-5.2.dist-info → pyegeria-5.2.0.2.dist-info}/WHEEL +0 -0
@@ -1,313 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
SPDX-License-Identifier: Apache-2.0
|
3
|
-
Copyright Contributors to the ODPi Egeria project.
|
4
|
-
|
5
|
-
A form exemplar for Egeria users to enter data into templates using Textual open source framework
|
6
|
-
|
7
|
-
Peter Coldicott
|
8
|
-
"""
|
9
|
-
|
10
|
-
import os
|
11
|
-
from os import system
|
12
|
-
import click
|
13
|
-
from textual.reactive import Reactive
|
14
|
-
|
15
|
-
from textual.app import App, ComposeResult
|
16
|
-
from textual.containers import (
|
17
|
-
Container,
|
18
|
-
Vertical,
|
19
|
-
HorizontalScroll,
|
20
|
-
VerticalScroll,
|
21
|
-
ScrollableContainer,
|
22
|
-
)
|
23
|
-
from textual import on, work
|
24
|
-
from textual.screen import ModalScreen, Screen
|
25
|
-
from textual.widgets import (
|
26
|
-
Input,
|
27
|
-
Static,
|
28
|
-
Button,
|
29
|
-
RichLog,
|
30
|
-
Label,
|
31
|
-
Tree,
|
32
|
-
Footer,
|
33
|
-
DataTable,
|
34
|
-
Header,
|
35
|
-
)
|
36
|
-
|
37
|
-
from typing import Any
|
38
|
-
|
39
|
-
|
40
|
-
EGERIA_METADATA_STORE = os.environ.get("EGERIA_METADATA_STORE", "active-metadata-store")
|
41
|
-
EGERIA_KAFKA_ENDPOINT = os.environ.get("KAFKA_ENDPOINT", "localhost:9092")
|
42
|
-
EGERIA_PLATFORM_URL = os.environ.get("EGERIA_PLATFORM_URL", "https://localhost:9443")
|
43
|
-
EGERIA_VIEW_SERVER = os.environ.get("VIEW_SERVER", "view-server")
|
44
|
-
EGERIA_VIEW_SERVER_URL = os.environ.get(
|
45
|
-
"EGERIA_VIEW_SERVER_URL", "https://localhost:9443"
|
46
|
-
)
|
47
|
-
EGERIA_INTEGRATION_DAEMON = os.environ.get("INTEGRATION_DAEMON", "integration-daemon")
|
48
|
-
EGERIA_USER = os.environ.get("EGERIA_USER", "erinoverview")
|
49
|
-
EGERIA_USER_PASSWORD = os.environ.get("EGERIA_USER_PASSWORD", "secret")
|
50
|
-
EGERIA_JUPYTER = bool(os.environ.get("EGERIA_JUPYTER", "False"))
|
51
|
-
|
52
|
-
disable_ssl_warnings = True
|
53
|
-
|
54
|
-
TITLE = "User Access"
|
55
|
-
|
56
|
-
|
57
|
-
class UserInfo(Screen):
|
58
|
-
"""A screen to request user access info - required
|
59
|
-
If no information is supplied the access defaults to a set of
|
60
|
-
demo/test values:
|
61
|
-
User: erinoverview
|
62
|
-
Password: Secret
|
63
|
-
Platform URL: https://localhost:9443
|
64
|
-
View Server Name: view-server"""
|
65
|
-
|
66
|
-
BINDINGS = [("d", "toggle_dark", "Toggle dark mode")]
|
67
|
-
|
68
|
-
def __init__(self) -> None:
|
69
|
-
"""Initialize the UserInfo Screen variables"""
|
70
|
-
self.app.dark = True
|
71
|
-
self.user = ""
|
72
|
-
self.password = ""
|
73
|
-
self.platformu = ""
|
74
|
-
self.view_server = ""
|
75
|
-
self.tech_type = ""
|
76
|
-
super().__init__()
|
77
|
-
|
78
|
-
def compose(self) -> ComposeResult:
|
79
|
-
self.log("In UserInfo - Compose ")
|
80
|
-
with VerticalScroll(id="user-container"):
|
81
|
-
yield Label("Username: ", classes="uprompt")
|
82
|
-
yield Input("", id="username", classes="uinput")
|
83
|
-
with VerticalScroll(id="pwd-container"):
|
84
|
-
yield Label("Password: ", classes="uprompt")
|
85
|
-
yield Input("", id="password", classes="uinput")
|
86
|
-
with VerticalScroll(id="platform-container"):
|
87
|
-
yield Label("Platform URL: ", classes="uprompt")
|
88
|
-
yield Input("", id="platform_url", classes="uinput")
|
89
|
-
with VerticalScroll(id="view-server-container"):
|
90
|
-
yield Label("View Server Name: ", classes="uprompt")
|
91
|
-
yield Input("", id="view_server", classes="uinput")
|
92
|
-
with HorizontalScroll(id="button-container"):
|
93
|
-
yield Button("Cancel", "warning", id="cancel")
|
94
|
-
yield Button("Submit", "primary", id="submit")
|
95
|
-
yield RichLog()
|
96
|
-
yield Footer()
|
97
|
-
|
98
|
-
def action_toggle_dark(self) -> None:
|
99
|
-
"""An action to toggle dark mode."""
|
100
|
-
|
101
|
-
self.app.dark = not self.app.dark
|
102
|
-
|
103
|
-
def on_input_changed(self, event: Input.Changed) -> None:
|
104
|
-
"""Detect input changed events and capture input value"""
|
105
|
-
|
106
|
-
try:
|
107
|
-
ivalue = str(event.value)
|
108
|
-
except ValueError:
|
109
|
-
return
|
110
|
-
else:
|
111
|
-
if event.input.id == "username":
|
112
|
-
self.user = ivalue
|
113
|
-
elif event.input.id == "password":
|
114
|
-
self.password = ivalue
|
115
|
-
elif event.input.id == "platform_url":
|
116
|
-
self.platformu = ivalue
|
117
|
-
elif event.input.id == "view_server":
|
118
|
-
self.view_server = ivalue
|
119
|
-
return
|
120
|
-
|
121
|
-
@on(Button.Pressed, "#submit")
|
122
|
-
async def on_submit(self) -> []:
|
123
|
-
"""This processes the user input."""
|
124
|
-
|
125
|
-
global EGERIA_USER
|
126
|
-
global EGERIA_USER_PASSWORD
|
127
|
-
global EGERIA_PLATFORM_URL
|
128
|
-
global EGERIA_VIEW_SERVER
|
129
|
-
|
130
|
-
result = [" meow", "woof", "neigh", "hoot"]
|
131
|
-
|
132
|
-
if self.user:
|
133
|
-
result[0] = self.user
|
134
|
-
else:
|
135
|
-
result[0] = "erinoverview"
|
136
|
-
if self.password:
|
137
|
-
result[1] = self.password
|
138
|
-
else:
|
139
|
-
result[1] = "secret"
|
140
|
-
if self.platformu:
|
141
|
-
result[2] = self.platformu
|
142
|
-
else:
|
143
|
-
result[2] = "https://localhost:9443"
|
144
|
-
if self.view_server:
|
145
|
-
result[3] = self.view_server
|
146
|
-
else:
|
147
|
-
result[3] = "view-server"
|
148
|
-
|
149
|
-
# Also store the input in global variables
|
150
|
-
|
151
|
-
EGERIA_USER = result[0]
|
152
|
-
EGERIA_USER_PASSWORD = result[1]
|
153
|
-
EGERIA_PLATFORM_URL = result[2]
|
154
|
-
EGERIA_VIEW_SERVER = result[3]
|
155
|
-
|
156
|
-
await self.action_dismiss(result)
|
157
|
-
|
158
|
-
@on(Button.Pressed, "#cancel")
|
159
|
-
def on_cancel(self) -> None:
|
160
|
-
self.action_dismiss()
|
161
|
-
|
162
|
-
|
163
|
-
class ExitScreen(ModalScreen):
|
164
|
-
"""App exit screen."""
|
165
|
-
|
166
|
-
DEFAULT_CSS = """
|
167
|
-
ExitScreen {
|
168
|
-
align: center middle;
|
169
|
-
}
|
170
|
-
|
171
|
-
ExitScreen > Container {
|
172
|
-
width: auto;
|
173
|
-
height: auto;
|
174
|
-
}
|
175
|
-
"""
|
176
|
-
|
177
|
-
BINDINGS = [("d", "toggle_dark", "Toggle dark mode")]
|
178
|
-
|
179
|
-
def __init__(self) -> None:
|
180
|
-
"""Initialize the UserInfo Screen variables"""
|
181
|
-
super().__init__()
|
182
|
-
|
183
|
-
def action_toggle_dark(self) -> None:
|
184
|
-
"""An action to toggle dark mode."""
|
185
|
-
self.app.dark = not self.app.dark
|
186
|
-
|
187
|
-
def compose(self) -> ComposeResult:
|
188
|
-
with Container():
|
189
|
-
yield Label("Are you sure you want to quit?")
|
190
|
-
yield Button("No", id="no", variant="error")
|
191
|
-
yield Button("Yes", id="yes", variant="success")
|
192
|
-
yield Footer()
|
193
|
-
yield RichLog()
|
194
|
-
|
195
|
-
@on(Button.Pressed, "#no")
|
196
|
-
def on_no(self) -> None:
|
197
|
-
"""No the user pressed the exit button in error"""
|
198
|
-
self.action_dismiss()
|
199
|
-
|
200
|
-
@on(Button.Pressed, "#yes")
|
201
|
-
def on_yes(self) -> None:
|
202
|
-
"""Yes the user wants to quit the app"""
|
203
|
-
self.app.exit()
|
204
|
-
|
205
|
-
|
206
|
-
class Egeria_login(App):
|
207
|
-
"""main app class"""
|
208
|
-
|
209
|
-
CSS_PATH = "txt_custom_v2.tcss"
|
210
|
-
|
211
|
-
BINDINGS = [("d", "toggle_dark", "Toggle dark mode")]
|
212
|
-
|
213
|
-
def __init__(self, *args, **kwargs) -> None:
|
214
|
-
super().__init__(*args, **kwargs)
|
215
|
-
dark = Reactive(True, compute=False)
|
216
|
-
self.app.dark = False
|
217
|
-
self.template: Any = None
|
218
|
-
|
219
|
-
def compose(self) -> ComposeResult:
|
220
|
-
"""Compose the main display"""
|
221
|
-
|
222
|
-
yield Label(f"User: {EGERIA_USER}, password: {EGERIA_USER_PASSWORD}")
|
223
|
-
yield Label(
|
224
|
-
f"Platform: {EGERIA_PLATFORM_URL}, View Server: {EGERIA_VIEW_SERVER}"
|
225
|
-
)
|
226
|
-
yield Button("Finish", "success", id="finish")
|
227
|
-
yield RichLog()
|
228
|
-
yield Footer()
|
229
|
-
|
230
|
-
def on_button_pressed(self, event: Button.Pressed) -> (str, str, str, str):
|
231
|
-
"""Yes the user wants to quit the app"""
|
232
|
-
|
233
|
-
self.exit(
|
234
|
-
(
|
235
|
-
EGERIA_USER,
|
236
|
-
EGERIA_USER_PASSWORD,
|
237
|
-
EGERIA_PLATFORM_URL,
|
238
|
-
EGERIA_VIEW_SERVER,
|
239
|
-
),
|
240
|
-
200,
|
241
|
-
"Finished",
|
242
|
-
)
|
243
|
-
|
244
|
-
def action_toggle_dark(self) -> None:
|
245
|
-
"""An action to toggle dark and light mode."""
|
246
|
-
self.app.dark = not self.app.dark
|
247
|
-
|
248
|
-
async def on_mount(self) -> None:
|
249
|
-
"""Main Program flow control start routine
|
250
|
-
Pushes the user info popup with an associated call back routine"""
|
251
|
-
|
252
|
-
global EGERIA_USER
|
253
|
-
global EGERIA_USER_PASSWORD
|
254
|
-
global EGERIA_PLATFORM_URL
|
255
|
-
global EGERIA_VIEW_SERVER
|
256
|
-
|
257
|
-
system("clear")
|
258
|
-
# Display User Info Screen
|
259
|
-
self.install_screen(UserInfo(), name="userinfo")
|
260
|
-
await self.push_screen(UserInfo(), self.input_userinfo_callback)
|
261
|
-
|
262
|
-
async def input_userinfo_callback(self, user_input) -> (str, str, str, str):
|
263
|
-
"""Prompt for user id and password, callback routine
|
264
|
-
This routine is invoked when user input is completed
|
265
|
-
"""
|
266
|
-
|
267
|
-
global EGERIA_USER
|
268
|
-
global EGERIA_USER_PASSWORD
|
269
|
-
global EGERIA_PLATFORM_URL
|
270
|
-
global EGERIA_VIEW_SERVER
|
271
|
-
global TECH_NAME
|
272
|
-
|
273
|
-
if user_input[0] != None:
|
274
|
-
EGERIA_USER = user_input[0]
|
275
|
-
else:
|
276
|
-
EGERIA_USER = "erinoverview"
|
277
|
-
if user_input[1] != None:
|
278
|
-
EGERIA_USER_PASSWORD = user_input[1]
|
279
|
-
else:
|
280
|
-
EGERIA_USER_PASSWORD = "secret"
|
281
|
-
if user_input[2] != None:
|
282
|
-
EGERIA_PLATFORM_URL = user_input[2]
|
283
|
-
else:
|
284
|
-
EGERIA_PLATFORM_URL = "https://localhost:9443"
|
285
|
-
if user_input[3] != None:
|
286
|
-
EGERIA_VIEW_SERVER = user_input[3]
|
287
|
-
else:
|
288
|
-
EGERIA_VIEW_SERVER = "view-server"
|
289
|
-
|
290
|
-
return (
|
291
|
-
EGERIA_USER,
|
292
|
-
EGERIA_USER_PASSWORD,
|
293
|
-
EGERIA_PLATFORM_URL,
|
294
|
-
EGERIA_VIEW_SERVER,
|
295
|
-
)
|
296
|
-
|
297
|
-
|
298
|
-
# @click.command("egeria-login")
|
299
|
-
# @click.option("--server", default=EGERIA_VIEW_SERVER, help="Egeria view server to use.")
|
300
|
-
# @click.option(
|
301
|
-
# "--url", default=EGERIA_VIEW_SERVER_URL, help="URL of Egeria platform to connect to"
|
302
|
-
# )
|
303
|
-
# @click.option("--userid", default=EGERIA_USER, help="Egeria user")
|
304
|
-
# @click.option("--password", default=EGERIA_USER_PASSWORD, help="Egeria user password")
|
305
|
-
def login(userid: str, password: str, server: str, url: str) -> None:
|
306
|
-
app = Egeria_login()
|
307
|
-
app.run()
|
308
|
-
return "peterprofile"
|
309
|
-
|
310
|
-
|
311
|
-
if __name__ == "__main__":
|
312
|
-
app = Egeria_login()
|
313
|
-
app.run()
|