ibridgesgui 0.2.3__tar.gz → 0.2.4__tar.gz
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.
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/PKG-INFO +1 -1
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/docs/getting-started.qmd +18 -4
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/__main__.py +1 -2
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/_version.py +2 -2
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/config.py +7 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/login.py +25 -30
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/logviewer.py +3 -3
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/popup_widgets.py +23 -24
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/ui_files/configCheck.py +1 -6
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/ui_files/configCheck.ui +0 -9
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui.egg-info/PKG-INFO +1 -1
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/.flake8 +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/.github/dependabot.yml +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/.github/workflows/linter.yml +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/.github/workflows/publish.yml +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/.github/workflows/pypi_release.yml +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/.gitignore +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/LICENSE +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/README.md +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/_quarto.yml +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/docs/info.qmd +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/docs/screenshots/add_check_config.png +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/docs/screenshots/add_new_config.png +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/docs/screenshots/browser.png +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/docs/screenshots/delete.png +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/docs/screenshots/login.png +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/docs/screenshots/metadata.png +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/docs/screenshots/permissions.png +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/docs/screenshots/replicas.png +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/docs/screenshots/search.png +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/docs/screenshots/start_ibridges.png +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/docs/screenshots/sync.png +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/docs/userdoc.qmd +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/__init__.py +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/browser.py +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/gui_utils.py +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/icons/arrow-left.png +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/icons/arrow-right.png +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/icons/arrow-up.png +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/icons/home.png +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/icons/iBridges.ico +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/icons/loading_circle.gif +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/icons/logo.png +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/icons/nosync.png +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/icons/refresh.png +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/icons/syncing.png +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/info.py +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/irods_tree_model.py +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/search.py +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/sync.py +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/threads.py +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/ui_files/.py +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/ui_files/ExampleTab.py +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/ui_files/ExampleTab.ui +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/ui_files/MainMenu.py +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/ui_files/MainMenu.ui +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/ui_files/__init__.py +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/ui_files/createCollection.py +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/ui_files/createCollection.ui +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/ui_files/irodsLogin.py +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/ui_files/irodsLogin.ui +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/ui_files/renameItem.py +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/ui_files/renameItem.ui +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/ui_files/tabBrowser.py +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/ui_files/tabBrowser.ui +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/ui_files/tabInfo.py +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/ui_files/tabInfo.ui +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/ui_files/tabLogging.py +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/ui_files/tabLogging.ui +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/ui_files/tabSearch.py +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/ui_files/tabSearch.ui +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/ui_files/tabSync.py +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/ui_files/tabSync.ui +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/ui_files/welcome.py +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/ui_files/welcome.ui +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui/welcome.py +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui.egg-info/SOURCES.txt +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui.egg-info/dependency_links.txt +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui.egg-info/entry_points.txt +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui.egg-info/requires.txt +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/ibridgesgui.egg-info/top_level.txt +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/index.qmd +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/pyproject.toml +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/requirements.txt +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/requirements_dev.txt +0 -0
- {ibridgesgui-0.2.3 → ibridgesgui-0.2.4}/setup.cfg +0 -0
|
@@ -13,25 +13,39 @@ Please start **iBridges-Gui** by typing `ibridges-gui` on your terminal and hit
|
|
|
13
13
|
|
|
14
14
|
## Configuring iBridges-Gui
|
|
15
15
|
|
|
16
|
+
To connect to the server you need a configuration file, a so-called `irods_environment.json`.
|
|
17
|
+
You can create one for yourself using templates, editing default settings we provide for you or simply create such a file.
|
|
18
|
+
|
|
19
|
+
### Installing iRODS server templates
|
|
20
|
+
We have created a plugin system to automatically create the environment file for you.
|
|
21
|
+
Please follow the [documentation](https://ibridges.readthedocs.io/en/latest/cli.html) how to set it up.
|
|
22
|
+
|
|
23
|
+
### Creating an iRODS configuration file
|
|
24
|
+
|
|
16
25
|
When you start iBridges you will find in the upper drop-down menu `Connect` and `Configure`.
|
|
17
26
|
|
|
18
27
|
{width=50% fig-align="center"}
|
|
19
28
|
|
|
20
|
-
|
|
29
|
+
Let us check or create a valid configuration file; Click on `Configure -> Add Configuration`.
|
|
21
30
|
|
|
22
31
|
{width=75% fig-align="center"}
|
|
23
32
|
|
|
24
|
-
|
|
33
|
+
#### Existing configuration files
|
|
34
|
+
In the drop-down menu you will find previously created iRODS environments, they start with `irods_environment` and end with `.json`. Select the one you want to check.
|
|
25
35
|
|
|
26
|
-
|
|
36
|
+
#### Creating a configuration from a template
|
|
37
|
+
If you do not have an iRODS configuration yet, and you installed a plugin (see above) you can select a configuration template from the drop-down menu.
|
|
38
|
+
You will have to add your username and save as `irods_environment.json`.
|
|
27
39
|
|
|
40
|
+
#### Creating a new configuration
|
|
41
|
+
To create a new environment click on the button `New Config`.
|
|
28
42
|
You should see now something like:
|
|
29
43
|
|
|
30
44
|
{width=75% fig-align="center"}
|
|
31
45
|
|
|
32
46
|
Click the `Check` button to find out whether you can make a connection to the iRODS server. If you get error messages, adjust the contents accordingly. If you are unsure, please contact your iRODS service provider.
|
|
33
47
|
|
|
34
|
-
Once the check runs through fine click the `Save` or `Save as` button. This will store the adjusted configuration in the correct directory on
|
|
48
|
+
Once the check runs through fine click the `Save` or `Save as` button. This will store the adjusted configuration in the correct directory on your laptop so that we can use it for the login (See Section below).
|
|
35
49
|
|
|
36
50
|
## Start an iRODS session
|
|
37
51
|
|
|
@@ -48,7 +48,7 @@ class MainMenu(PyQt6.QtWidgets.QMainWindow, Ui_MainWindow):
|
|
|
48
48
|
"tabSync": self.init_sync_tab,
|
|
49
49
|
"tabSearch": self.init_search_tab,
|
|
50
50
|
"tabInfo": self.init_info_tab,
|
|
51
|
-
"tabLog": self.init_log_tab
|
|
51
|
+
"tabLog": self.init_log_tab,
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
self.session = None
|
|
@@ -61,7 +61,6 @@ class MainMenu(PyQt6.QtWidgets.QMainWindow, Ui_MainWindow):
|
|
|
61
61
|
self.action_check_configuration.triggered.connect(self.inspect_env_file)
|
|
62
62
|
self.tab_widget.setCurrentIndex(0)
|
|
63
63
|
|
|
64
|
-
|
|
65
64
|
def disconnect(self):
|
|
66
65
|
"""Close iRODS session."""
|
|
67
66
|
self.error_label.clear()
|
|
@@ -10,6 +10,7 @@ from pathlib import Path
|
|
|
10
10
|
from typing import Union
|
|
11
11
|
|
|
12
12
|
from ibridges.session import Session
|
|
13
|
+
from irods.auth.pam import PamLoginException
|
|
13
14
|
from irods.connection import PlainTextPAMPasswordError
|
|
14
15
|
from irods.exception import (
|
|
15
16
|
CAT_INVALID_AUTHENTICATION,
|
|
@@ -204,6 +205,12 @@ def check_irods_config(ienv: Union[Path, dict]) -> str:
|
|
|
204
205
|
return repr(err)
|
|
205
206
|
except AttributeError as err:
|
|
206
207
|
return repr(err)
|
|
208
|
+
except PamLoginException as err:
|
|
209
|
+
# irods4.3+ specific
|
|
210
|
+
return f'Adjust "irods_authentication_scheme" {err.args}'
|
|
211
|
+
except ModuleNotFoundError as err:
|
|
212
|
+
# irods4.3+ uses string in authenticationscheme as class
|
|
213
|
+
return f'"irods_authentication_scheme": "{err.name}" does not exist'
|
|
207
214
|
|
|
208
215
|
except PlainTextPAMPasswordError:
|
|
209
216
|
return (
|
|
@@ -68,6 +68,17 @@ class Login(QDialog, Ui_irodsLogin):
|
|
|
68
68
|
"""Abort login."""
|
|
69
69
|
self.done(0)
|
|
70
70
|
|
|
71
|
+
def _check_home(self, session):
|
|
72
|
+
if not IrodsPath(session).collection_exists():
|
|
73
|
+
return False
|
|
74
|
+
return True
|
|
75
|
+
|
|
76
|
+
def _check_resource(self, session):
|
|
77
|
+
resc = Resources(session).get_resource(session.default_resc)
|
|
78
|
+
if resc.parent is not None:
|
|
79
|
+
return False
|
|
80
|
+
return True
|
|
81
|
+
|
|
71
82
|
def login_function(self):
|
|
72
83
|
"""Connect to iRODS server with gathered info."""
|
|
73
84
|
self.error_label.clear()
|
|
@@ -86,8 +97,17 @@ class Login(QDialog, Ui_irodsLogin):
|
|
|
86
97
|
session.home,
|
|
87
98
|
)
|
|
88
99
|
session.write_pam_password()
|
|
89
|
-
self.
|
|
90
|
-
|
|
100
|
+
if self._check_home(session) and self._check_resource(session):
|
|
101
|
+
self.session_dict["session"] = session
|
|
102
|
+
set_last_ienv_path(env_file.name)
|
|
103
|
+
self.close()
|
|
104
|
+
elif not self._check_home(session):
|
|
105
|
+
self.error_label.setText(f'"irods_home": "{session.home}" does not exist.')
|
|
106
|
+
elif not self._check_resource(session):
|
|
107
|
+
self.error_label.setText(
|
|
108
|
+
f'"irods_default_resource": "{session.default_resc}" not writeable.'
|
|
109
|
+
)
|
|
110
|
+
|
|
91
111
|
except LoginError:
|
|
92
112
|
self.error_label.setText("irods_environment.json not setup correctly.")
|
|
93
113
|
self.logger.error("irods_environment.json not setup correctly.")
|
|
@@ -99,35 +119,10 @@ class Login(QDialog, Ui_irodsLogin):
|
|
|
99
119
|
"Cannot connect to server. Check Internet, host name and port."
|
|
100
120
|
)
|
|
101
121
|
self.logger.exception("Network error.")
|
|
122
|
+
except ResourceDoesNotExist:
|
|
123
|
+
self.error_label.setText('"irods_default_resource" does not exist.')
|
|
124
|
+
self.logger.exception("Default resource does not exist.")
|
|
102
125
|
except Exception as err:
|
|
103
126
|
log_path = Path("~/.ibridges")
|
|
104
127
|
self.logger.exception("Failed to login: %s", repr(err))
|
|
105
128
|
self.error_label.setText(f"Login failed, consult the log file(s) in {log_path}")
|
|
106
|
-
|
|
107
|
-
#check irods_home
|
|
108
|
-
fail_home = True
|
|
109
|
-
if not IrodsPath(self.session_dict["session"]).collection_exists():
|
|
110
|
-
self.error_label.setText(f'"irods_home": "{session.home}" does not exist.')
|
|
111
|
-
self.logger.error("irods_home does not exist.")
|
|
112
|
-
else:
|
|
113
|
-
fail_home = False
|
|
114
|
-
|
|
115
|
-
#check existance of default resource
|
|
116
|
-
fail_resc = True
|
|
117
|
-
try:
|
|
118
|
-
resc = Resources(self.session_dict["session"]).get_resource(session.default_resc)
|
|
119
|
-
if resc.parent is None:
|
|
120
|
-
fail_resc = False
|
|
121
|
-
else:
|
|
122
|
-
self.error_label.setText(f'"default_resource": "{session.default_resc}" not valid.')
|
|
123
|
-
except ResourceDoesNotExist:
|
|
124
|
-
self.error_label.setText(
|
|
125
|
-
f'"default_resource": "{session.default_resc}" does not exist.')
|
|
126
|
-
self.logger.error("Default resource does not exist.")
|
|
127
|
-
except AttributeError:
|
|
128
|
-
self.error_label.setText(f'"default_resource": "{session.default_resc}" not valid.')
|
|
129
|
-
|
|
130
|
-
if fail_resc or fail_home:
|
|
131
|
-
del self.session_dict["session"]
|
|
132
|
-
else:
|
|
133
|
-
self.close()
|
|
@@ -25,7 +25,7 @@ class QTextEditLogger(logging.Handler, PyQt6.QtCore.QObject):
|
|
|
25
25
|
|
|
26
26
|
def emit(self, record):
|
|
27
27
|
"""Emit when new logging accurs."""
|
|
28
|
-
msg = self.format(record)+"\n"
|
|
28
|
+
msg = self.format(record) + "\n"
|
|
29
29
|
self.append_plain_text.emit(msg)
|
|
30
30
|
|
|
31
31
|
|
|
@@ -44,7 +44,7 @@ class LogViewer(PyQt6.QtWidgets.QWidget, Ui_tabLogging):
|
|
|
44
44
|
self.log_label.setText(str(CONFIG_DIR))
|
|
45
45
|
self.log_text = QTextEditLogger(self.log_browser)
|
|
46
46
|
self.log_text.setFormatter(
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
logging.Formatter("%(asctime)s %(levelname)s %(module)s %(funcName)s %(message)s")
|
|
48
|
+
)
|
|
49
49
|
self.logger.addHandler(self.log_text)
|
|
50
50
|
self.logger.setLevel(logging.DEBUG)
|
|
@@ -140,11 +140,16 @@ class CheckConfig(QDialog, Ui_configCheck):
|
|
|
140
140
|
self.logger = logger
|
|
141
141
|
self.env_path = env_path
|
|
142
142
|
self.setWindowTitle("Create, edit and inspect iRODS environment")
|
|
143
|
+
|
|
144
|
+
providers = get_environment_providers()
|
|
145
|
+
self.templates = {
|
|
146
|
+
f"Template - {key} ({descr})": key
|
|
147
|
+
for p in providers
|
|
148
|
+
for key, descr in p.descriptions.items()
|
|
149
|
+
}
|
|
143
150
|
self._init_env_box()
|
|
144
|
-
self._init_template_box()
|
|
145
151
|
|
|
146
|
-
self.envbox.activated.connect(self.
|
|
147
|
-
self.template_box.activated.connect(self.load_template)
|
|
152
|
+
self.envbox.activated.connect(self.load)
|
|
148
153
|
self.new_button.clicked.connect(self.create_env)
|
|
149
154
|
self.check_button.clicked.connect(self.check_env)
|
|
150
155
|
self.save_button.clicked.connect(self.save_env)
|
|
@@ -156,36 +161,30 @@ class CheckConfig(QDialog, Ui_configCheck):
|
|
|
156
161
|
env_jsons = [""] + [path.name for path in self.env_path.glob("irods_environment*json")]
|
|
157
162
|
if len(env_jsons) != 0:
|
|
158
163
|
self.envbox.addItems(env_jsons)
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
def _init_template_box(self):
|
|
162
|
-
self.template_box.clear()
|
|
163
|
-
providers = get_environment_providers()
|
|
164
|
-
|
|
165
|
-
if len(providers) == 0:
|
|
166
|
-
self.template_box.hide()
|
|
167
|
-
return
|
|
164
|
+
self.envbox.addItems(self.templates.keys())
|
|
165
|
+
self.envbox.setCurrentIndex(0)
|
|
168
166
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
self.
|
|
167
|
+
def load(self):
|
|
168
|
+
"""Decide whether load template or irods env."""
|
|
169
|
+
selected = self.envbox.currentText()
|
|
170
|
+
if selected.startswith("Template - "):
|
|
171
|
+
self.load_template(self.templates[selected])
|
|
172
|
+
else:
|
|
173
|
+
self.load_env(self.env_path.joinpath(selected))
|
|
174
174
|
|
|
175
|
-
def load_template(self):
|
|
175
|
+
def load_template(self, template_key):
|
|
176
176
|
"""Load environment template into text field."""
|
|
177
177
|
self.error_label.clear()
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
178
|
+
provider = find_environment_provider(get_environment_providers(), template_key)
|
|
179
|
+
env_json = provider.environment_json(
|
|
180
|
+
template_key, *[q.upper() for q in provider.questions]
|
|
181
|
+
).split("\n")
|
|
182
182
|
populate_textfield(self.env_field, env_json)
|
|
183
183
|
self.error_label.setText("Please fill in your user name.")
|
|
184
184
|
|
|
185
|
-
def load_env(self):
|
|
185
|
+
def load_env(self, env_file):
|
|
186
186
|
"""Load json into text field."""
|
|
187
187
|
self.error_label.clear()
|
|
188
|
-
env_file = self.env_path.joinpath(self.envbox.currentText())
|
|
189
188
|
try:
|
|
190
189
|
content = json.dumps(
|
|
191
190
|
_read_json(env_file), sort_keys=True, indent=4, separators=(",", ": ")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Form implementation generated from reading ui file 'ibridgesgui/ui_files/configCheck.ui'
|
|
2
2
|
#
|
|
3
|
-
# Created by: PyQt6 UI code generator 6.
|
|
3
|
+
# Created by: PyQt6 UI code generator 6.6.1
|
|
4
4
|
#
|
|
5
5
|
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
|
|
6
6
|
# run again. Do not edit this file unless you know what you are doing.
|
|
@@ -56,10 +56,6 @@ class Ui_configCheck(object):
|
|
|
56
56
|
self.envbox = QtWidgets.QComboBox(parent=Dialog)
|
|
57
57
|
self.envbox.setObjectName("envbox")
|
|
58
58
|
self.horizontalLayout.addWidget(self.envbox)
|
|
59
|
-
self.template_box = QtWidgets.QComboBox(parent=Dialog)
|
|
60
|
-
self.template_box.setObjectName("template_box")
|
|
61
|
-
self.template_box.addItem("")
|
|
62
|
-
self.horizontalLayout.addWidget(self.template_box)
|
|
63
59
|
self.new_button = QtWidgets.QPushButton(parent=Dialog)
|
|
64
60
|
self.new_button.setObjectName("new_button")
|
|
65
61
|
self.horizontalLayout.addWidget(self.new_button)
|
|
@@ -105,7 +101,6 @@ class Ui_configCheck(object):
|
|
|
105
101
|
def retranslateUi(self, Dialog):
|
|
106
102
|
_translate = QtCore.QCoreApplication.translate
|
|
107
103
|
Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
|
|
108
|
-
self.template_box.setItemText(0, _translate("Dialog", "Server Templates"))
|
|
109
104
|
self.new_button.setText(_translate("Dialog", "New Config"))
|
|
110
105
|
self.check_button.setText(_translate("Dialog", "Check"))
|
|
111
106
|
self.save_button.setText(_translate("Dialog", "Save"))
|
|
@@ -57,15 +57,6 @@ QTabWidget#info_tabs
|
|
|
57
57
|
<item>
|
|
58
58
|
<widget class="QComboBox" name="envbox"/>
|
|
59
59
|
</item>
|
|
60
|
-
<item>
|
|
61
|
-
<widget class="QComboBox" name="template_box">
|
|
62
|
-
<item>
|
|
63
|
-
<property name="text">
|
|
64
|
-
<string>Server Templates</string>
|
|
65
|
-
</property>
|
|
66
|
-
</item>
|
|
67
|
-
</widget>
|
|
68
|
-
</item>
|
|
69
60
|
<item>
|
|
70
61
|
<widget class="QPushButton" name="new_button">
|
|
71
62
|
<property name="text">
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|