jmuehlner commented on code in PR #840:
URL: https://github.com/apache/guacamole-client/pull/840#discussion_r1174148967
##########
guacamole/src/main/frontend/src/app/import/templates/connectionImport.html:
##########
@@ -38,6 +38,28 @@ <h2>{{'IMPORT.SECTION_HEADER_CONNECTION_IMPORT' |
translate}}</h2>
</div>
+ <ul class="import-config">
+ <li>
+ <input type="checkbox"
+ id="existing-connection-mode"
ng-model="importConfig.existingConnectionMode"
+ ng-true-value="'REPLACE'" ng-false-value="'REJECT'" />
+ <label for="existing-connection-mode">
+ {{'IMPORT.FIELD_HEADER_EXISTING_CONNECTION_MODE' |
translate}}
+ </label>
+ <span title="{{'IMPORT.HELP_EXISTING_CONNECTION_MODE' |
translate}}" class="help"></span>
Review Comment:
Good call! Will do.
##########
guacamole/src/main/frontend/src/translations/en.json:
##########
@@ -200,38 +200,50 @@
"DIALOG_HEADER_ERROR" : "@:APP.DIALOG_HEADER_ERROR",
"DIALOG_HEADER_SUCCESS" : "Success",
- "ERROR_AMBIGUOUS_CSV_HEADER" : "Ambiguous CSV Header \"{HEADER}\"
could be either a connection attribute or parameter",
- "ERROR_AMBIGUOUS_PARENT_GROUP" : "Both group and parentIdentifier
may be not specified at the same time",
- "ERROR_ARRAY_REQUIRED" : "The provided file must contain a
list of connections",
- "ERROR_DUPLICATE_CSV_HEADER" : "Duplicate CSV Header: {HEADER}",
- "ERROR_EMPTY_FILE" : "The provided file is empty",
- "ERROR_INVALID_CSV_HEADER" : "Invalid CSV Header \"{HEADER}\" is
neither an attribute or parameter",
- "ERROR_INVALID_MIME_TYPE" : "Unsupported file type: \"{TYPE}\"",
- "ERROR_DETECTED_INVALID_TYPE" : "Unsupported file type. Please make
sure the file is valid CSV, JSON, or YAML.",
- "ERROR_INVALID_GROUP" : "No group matching \"{GROUP}\"
found",
- "ERROR_INVALID_GROUP_IDENTIFIER" : "No connection group with
identifier \"{IDENTIFIER}\" found",
- "ERROR_NO_FILE_SUPPLIED" : "Please select a file to import",
- "ERROR_PARSE_FAILURE_CSV" : "Please make sure your file is
valid CSV. Parsing failed with error \"{ERROR}\". ",
- "ERROR_PARSE_FAILURE_JSON" : "Please make sure your file is
valid JSON. Parsing failed with error \"{ERROR}\". ",
- "ERROR_PARSE_FAILURE_YAML" : "Please make sure your file is
valid YAML. Parsing failed with error \"{ERROR}\". ",
- "ERROR_REQUIRED_NAME" : "No connection name found in the
provided file",
- "ERROR_REQUIRED_PROTOCOL" : "No connection protocol found in
the provided file",
+ "ERROR_AMBIGUOUS_CSV_HEADER" : "Ambiguous CSV Header
\"{HEADER}\" could be either a connection attribute or parameter",
+ "ERROR_AMBIGUOUS_PARENT_GROUP" : "Both group and
parentIdentifier may be not specified at the same time",
+ "ERROR_ARRAY_REQUIRED" : "The provided file must contain
a list of connections",
+ "ERROR_DETECTED_INVALID_TYPE" : "Unsupported file type. Please
make sure the file is valid CSV, JSON, or YAML.",
+ "ERROR_DUPLICATE_CONNECTION_IN_FILE" : "Duplicated connection
\"{NAME}\" at \"{PATH}\" in import file",
+ "ERROR_DUPLICATE_CSV_HEADER" : "Duplicate CSV Header:
{HEADER}",
+ "ERROR_EMPTY_FILE" : "The provided file is empty",
+ "ERROR_INVALID_CSV_HEADER" : "Invalid CSV Header
\"{HEADER}\" is neither an attribute or parameter",
+ "ERROR_INVALID_MIME_TYPE" : "Unsupported file type:
\"{TYPE}\"",
+ "ERROR_INVALID_GROUP" : "No group matching \"{GROUP}\"
found",
+ "ERROR_INVALID_GROUP_IDENTIFIER" : "No connection group with
identifier \"{IDENTIFIER}\" found",
+ "ERROR_NO_FILE_SUPPLIED" : "Please select a file to
import",
+ "ERROR_PARSE_FAILURE_CSV" : "Please make sure your file is
valid CSV. Parsing failed with error \"{ERROR}\". ",
+ "ERROR_PARSE_FAILURE_JSON" : "Please make sure your file is
valid JSON. Parsing failed with error \"{ERROR}\". ",
+ "ERROR_PARSE_FAILURE_YAML" : "Please make sure your file is
valid YAML. Parsing failed with error \"{ERROR}\". ",
+ "ERROR_REJECT_UPDATE_CONNECTION" : "Connection \"{NAME}\" already
exists at \"{PATH}\"",
+ "ERROR_REQUIRED_NAME" : "No connection name found in
the provided file",
+ "ERROR_REQUIRED_PROTOCOL" : "No connection protocol found
in the provided file",
"FIELD_PLACEHOLDER_FILTER" : "@:APP.FIELD_PLACEHOLDER_FILTER",
+ "FIELD_HEADER_EXISTING_CONNECTION_MODE" : "Replace/Update existing
connections",
+ "FIELD_HEADER_EXISTING_PERMISSION_MODE" : "Reset permissions",
+
+ "FIELD_OPTION_DUPLICATE_REPLACE" : "Replace duplicates",
+ "FIELD_OPTION_DUPLICATE_IGNORE" : "Ignore duplicates",
+ "FIELD_OPTION_DUPLICATE_ERROR" : "Disallow duplicates",
+
"HELP_CSV_DESCRIPTION" : "A connection import CSV file
has one connection record per row. Each column will specify a connection field.
At minimum the connection name and protocol must be specified.",
"HELP_CSV_EXAMPLE" :
"name,protocol,hostname,group,users,groups,guacd-encryption
(attribute)\nconn1,vnc,conn1.web.com,ROOT,guac user 1;guac user 2,Connection 1
Users,none\nconn2,rdp,conn2.web.com,ROOT/Parent Group,guac user
1,,ssl\nconn3,ssh,conn3.web.com,ROOT/Parent Group/Child Group,guac user 2;guac
user 3,,\nconn4,kubernetes,,,,,",
"HELP_CSV_MORE_DETAILS" : "The CSV header for each row
specifies the connection field. The connection group ID that the connection
should be imported into may be directly specified with \"parentIdentifier\", or
the path to the parent group may be specified using \"group\" as shown below.
In most cases, there should be no conflict between fields, but if needed, an \"
(attribute)\" or \" (parameter)\" suffix may be added to disambiguate. Lists of
user or user group identifiers must be semicolon-separated.ยน",
- "HELP_FILE_TYPE_DESCRIPTION" : "Three file types are supported
for connection import: CSV, JSON, and YAML. The same data may be specified by
each file type. This must include the connection name and protocol. Optionally,
a connection group location, a list of users and/or user groups to grant
access, connection parameters, or connection protocols may also be specified.
Any users or user groups that do not exist in the current data source will be
automatically created.",
+ "HELP_FILE_TYPE_DESCRIPTION" : "Three file types are supported
for connection import: CSV, JSON, and YAML. The same data may be specified by
each file type. This must include the connection name and protocol. Optionally,
a connection group location, a list of users and/or user groups to grant
access, connection parameters, or connection protocols may also be specified.
Any users or user groups that do not exist in the current data source will be
automatically created. Note that any existing connection permissions will not
be removed for updated connections.",
Review Comment:
Also good call - also will do.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]