diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..9b29798d Binary files /dev/null and b/.DS_Store differ diff --git a/speckle_connector_3/.DS_Store b/speckle_connector_3/.DS_Store new file mode 100644 index 00000000..82edad5e Binary files /dev/null and b/speckle_connector_3/.DS_Store differ diff --git a/speckle_connector_3/src/.DS_Store b/speckle_connector_3/src/.DS_Store new file mode 100644 index 00000000..5b50a8cc Binary files /dev/null and b/speckle_connector_3/src/.DS_Store differ diff --git a/speckle_connector_3/src/actions/base_actions/add_receive_model_card.rb b/speckle_connector_3/src/actions/base_actions/add_receive_model_card.rb index 004cb259..dfdeb492 100644 --- a/speckle_connector_3/src/actions/base_actions/add_receive_model_card.rb +++ b/speckle_connector_3/src/actions/base_actions/add_receive_model_card.rb @@ -17,6 +17,7 @@ class AddReceiveModelCard < Action def self.update_state(state, resolve_id, data) model_card_id = data['modelCardId'] account_id = data['accountId'] + workspace_id = data['workspaceId'] project_id = data['projectId'] model_id = data['modelId'] project_name = data['projectName'] @@ -31,7 +32,7 @@ def self.update_state(state, resolve_id, data) has_dismissed_update_warning = data['hasDismissedUpdateWarning'] baked_object_ids = data['bakedObjectIds'].nil? ? nil : data['bakedObjectIds'].values - receive_card = Cards::ReceiveCard.new(model_card_id, account_id, + receive_card = Cards::ReceiveCard.new(model_card_id, account_id, workspace_id, project_id, model_id, project_name, model_name, selected_version_id, selected_version_source_app, selected_version_user_id, diff --git a/speckle_connector_3/src/actions/base_actions/add_send_model_card.rb b/speckle_connector_3/src/actions/base_actions/add_send_model_card.rb index 2e2dccc6..e0715362 100644 --- a/speckle_connector_3/src/actions/base_actions/add_send_model_card.rb +++ b/speckle_connector_3/src/actions/base_actions/add_send_model_card.rb @@ -22,6 +22,7 @@ def self.update_state(state, resolve_id, data) send_card = Cards::SendCard.new( data['modelCardId'], data['accountId'], + data['workspaceId'], data['projectId'], data['projectName'], data['modelId'], diff --git a/speckle_connector_3/src/actions/base_actions/get_document_state.rb b/speckle_connector_3/src/actions/base_actions/get_document_state.rb index 91c12b63..66ed8fe0 100644 --- a/speckle_connector_3/src/actions/base_actions/get_document_state.rb +++ b/speckle_connector_3/src/actions/base_actions/get_document_state.rb @@ -21,6 +21,7 @@ def self.update_state(state, resolve_id) send_card = Cards::SendCard.new( id, card['account_id'], + card['workspace_id'], card['project_id'], card['project_name'], card['model_id'], @@ -35,6 +36,7 @@ def self.update_state(state, resolve_id) { modelCardId: send_card.model_card_id, accountId: send_card.account_id, + workspaceId: send_card.workspace_id, projectId: send_card.project_id, modelId: send_card.model_id, sendFilter: send_card.send_filter, @@ -49,7 +51,7 @@ def self.update_state(state, resolve_id) # TODO: CONVERTER_V2: Extract into new actions receive_cards = receive_cards_hash.collect do |id, card| - receive_card = Cards::ReceiveCard.new(id, card['account_id'], card['project_id'], card['model_id'], + receive_card = Cards::ReceiveCard.new(id, card['account_id'], card['workspace_id'], card['project_id'], card['model_id'], card['project_name'], card['model_name'], card['selected_version_id'], card['selected_version_source_app'], card['selected_version_user_id'], card['latest_version_id'], card['latest_version_source_app'], @@ -61,6 +63,7 @@ def self.update_state(state, resolve_id) { modelCardId: receive_card.model_card_id, accountId: receive_card.account_id, + workspaceId: receive_card.workspace_id, projectId: receive_card.project_id, modelId: receive_card.model_id, projectName: receive_card.project_name, diff --git a/speckle_connector_3/src/cards/card.rb b/speckle_connector_3/src/cards/card.rb index b8e22f4b..2cb7a3f6 100644 --- a/speckle_connector_3/src/cards/card.rb +++ b/speckle_connector_3/src/cards/card.rb @@ -24,14 +24,18 @@ class Card < Hash # @return [String] model name of the card. attr_reader :model_name + # @return [String] workspace id of the card. + attr_reader :workspace_id + # @return [Boolean] card is valid or not. attr_reader :valid # rubocop:disable Metrics/ParameterLists - def initialize(model_card_id, account_id, project_id, project_name, model_id, model_name) + def initialize(model_card_id, account_id, workspace_id, project_id, project_name, model_id, model_name) super() @model_card_id = model_card_id @account_id = account_id + @workspace_id = workspace_id @project_id = project_id @project_name = project_name @model_id = model_id @@ -39,6 +43,7 @@ def initialize(model_card_id, account_id, project_id, project_name, model_id, mo @valid = true self[:model_card_id] = model_card_id self[:account_id] = account_id + self[:workspace_id] = workspace_id self[:project_id] = project_id self[:project_name] = project_name self[:model_id] = model_id diff --git a/speckle_connector_3/src/cards/receive_card.rb b/speckle_connector_3/src/cards/receive_card.rb index cf562459..e64c0465 100644 --- a/speckle_connector_3/src/cards/receive_card.rb +++ b/speckle_connector_3/src/cards/receive_card.rb @@ -48,6 +48,7 @@ class ReceiveCard < Card def initialize( model_card_id, account_id, + workspace_id, project_id, model_id, project_name, @@ -62,7 +63,7 @@ def initialize( expired, baked_object_ids = nil ) - super(model_card_id, account_id, project_id, project_name, model_id, model_name) + super(model_card_id, account_id, workspace_id, project_id, project_name, model_id, model_name) @selected_version_id = selected_version_id @selected_version_source_app = selected_version_source_app @selected_version_user_id = selected_version_user_id diff --git a/speckle_connector_3/src/cards/send_card.rb b/speckle_connector_3/src/cards/send_card.rb index 90e1845d..311772ec 100644 --- a/speckle_connector_3/src/cards/send_card.rb +++ b/speckle_connector_3/src/cards/send_card.rb @@ -26,6 +26,7 @@ class SendCard < Card def initialize( model_card_id, account_id, + workspace_id, project_id, project_name, model_id, @@ -34,7 +35,7 @@ def initialize( send_filter, send_settings ) - super(model_card_id, account_id, project_id, project_name, model_id, model_name) + super(model_card_id, account_id, workspace_id, project_id, project_name, model_id, model_name) @send_filter = send_filter @send_settings = send_settings @latest_created_version_id = latest_created_version_id diff --git a/speckle_connector_3/src/ui/dui3_dialog.rb b/speckle_connector_3/src/ui/dui3_dialog.rb index ead1d585..8718c188 100644 --- a/speckle_connector_3/src/ui/dui3_dialog.rb +++ b/speckle_connector_3/src/ui/dui3_dialog.rb @@ -84,8 +84,8 @@ def init_dialog true end # File.exist?(@htm_file) ? dialog.set_file(@htm_file) : dialog.set_url('http://localhost:9091') - # dialog.set_url('http://localhost:8082') # uncomment this line if you want to use your local version of ui - dialog.set_url('https://boisterous-douhua-e3cefb.netlify.app/') # uncomment this line if you want to use deployed ui on netlify + dialog.set_url('http://localhost:8082') # uncomment this line if you want to use your local version of ui + # dialog.set_url('https://boisterous-douhua-e3cefb.netlify.app/') # uncomment this line if you want to use deployed ui on netlify add_exec_callback(dialog) dialog end