Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Implementation of Expandable design for proprietary data exchange feature #73

Merged
5 changes: 5 additions & 0 deletions app/model/sdl/Abstract/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,13 @@ SDL.SDLModelData = Em.Object.create(
{
name: 'FOTA',
id: 19
},
{
name: 'OEM_SPECIFIC',
id: 20
}
],

/**
* Data for AudioPassThruPopUp that contains params for visualisation
*
Expand Down
23 changes: 22 additions & 1 deletion app/view/sdl/SystemRequestView.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ SDL.SystemRequest = Em.ContainerView.create(
'systemRequestViewTitle',
'systemRequestViewSelect',
'urlsLabel',
'systemRequestLabel',
'urlsInput',
'requestSubTypeInput',
'appIDSelect',
'appIDSelectTitle',
'sendButton',
Expand Down Expand Up @@ -97,6 +99,16 @@ SDL.SystemRequest = Em.ContainerView.create(
content: 'URL'
}
),
/**
* Label for System Request Input
*/
systemRequestLabel: SDL.Label.extend(
{
elementId: 'systemRequestLabel',
classNames: 'systemRequestLabel',
content: 'requestSubType'
}
),
/**
* Input for urls value changes
*/
Expand All @@ -109,6 +121,14 @@ SDL.SystemRequest = Em.ContainerView.create(
)
}
),

requestSubTypeInput: Ember.TextField.extend(
{
elementId: 'requestSubTypeInput',
classNames: 'requestSubTypeInput',
value: 'OEM specific request'
}
),
/**
* Title of appID group of parameters
*/
Expand Down Expand Up @@ -173,7 +193,8 @@ SDL.SystemRequest = Em.ContainerView.create(
element._parentView.systemRequestViewSelect.selection.name,
element._parentView.fileNameInput.value,
element._parentView.urlsInput.value,
element._parentView.appIDSelect.selection
element._parentView.appIDSelect.selection,
element._parentView.requestSubTypeInput.value
);
},
onDown: false
Expand Down
11 changes: 11 additions & 0 deletions css/sdl.css
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,7 @@
#VehicleInfo .speedInput,
#VehicleInfo .fuelLevelInput,
#systemRequestView .urlsInput,
#systemRequestView .requestSubTypeInput,
#systemRequestView .policyAppIdInput,
#systemRequestView .fileNameInput,
#policies_settings_get_urls .listInput {
Expand All @@ -799,6 +800,7 @@
}

#systemRequestView .urlsInput,
#systemRequestView .requestSubTypeInput,
#systemRequestView .policyAppIdInput,
#systemRequestView .fileNameInput {
height: 30px;
Expand All @@ -813,6 +815,11 @@
left: 60px;
}

#systemRequestView .systemRequestLabel {
top: 224px;
left: 13px;
}

#systemRequestView .policyAppIdLabel {
top: 223px;
left: 30px;
Expand All @@ -827,6 +834,10 @@
top: 180px;
}

#systemRequestView .requestSubTypeInput {
top: 217px;
}

#systemRequestView .policyAppIdInput {
top: 217px;
}
Expand Down
10 changes: 9 additions & 1 deletion ffw/BasicCommunicationRPC.js
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ FFW.BasicCommunication = FFW.RPCObserver
/**
* Initiated by HMI.
*/
OnSystemRequest: function(type, fileName, url, appID) {
OnSystemRequest: function(type, fileName, url, appID, subType) {
Em.Logger.log('FFW.BasicCommunication.OnSystemRequest');
// send request
var JSONMessage = {
Expand All @@ -1149,6 +1149,14 @@ FFW.BasicCommunication = FFW.RPCObserver
if (appID) {
JSONMessage.params.appID = appID;
}

var requestSubTypeNotApplicable =
(JSONMessage.params.fileType == 'BINARY' && type == "HTTP") ||
(JSONMessage.params.fileType == 'JSON' && type == "PROPRIETARY");
if (subType && subType.length > 0 && !requestSubTypeNotApplicable) {
JSONMessage.params.requestSubType = subType;
}

this.client.send(JSONMessage);
},
/**
Expand Down