summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Byrne <jack@livio.io>2015-06-18 16:48:32 -0400
committerJack Byrne <jack@livio.io>2015-06-18 16:48:32 -0400
commit44da661209146fa064f7fa11db151fb11caf05e7 (patch)
tree6ba1cc25817791e82984d716dc566ec955659533
parent5bf25a8ee79579ff428bf5fe1987257f35c6c0b3 (diff)
downloadsdl_core-hotfix/local_pt_update.tar.gz
Policy Table Update HMI Buttonhotfix/local_pt_update
-rw-r--r--src/components/HMI/app/view/home/controlButtons.js11
-rw-r--r--src/components/HMI/css/sdl.css9
-rw-r--r--src/components/HMI/ffw/BasicCommunicationRPC.js28
3 files changed, 45 insertions, 3 deletions
diff --git a/src/components/HMI/app/view/home/controlButtons.js b/src/components/HMI/app/view/home/controlButtons.js
index 3b32d47368..4f567422e6 100644
--- a/src/components/HMI/app/view/home/controlButtons.js
+++ b/src/components/HMI/app/view/home/controlButtons.js
@@ -53,9 +53,18 @@ SDL.ControlButtons = Em.ContainerView
'appTTSVRLanguagesLabel',
'appUILang',
'appTTSVRLang',
- 'phoneCall'
+ 'phoneCall',
+ 'policyUpdate'
],
+ policyUpdate: SDL.Button.extend({
+ elementId: 'policy_update_button',
+ text: 'Policy Update',
+ action: 'OnHMIPolicyUpdate',
+ target: 'FFW.BasicCommunication'
+
+ }),
+
/**
* Button to initiate phone call emulation on HMI
*/
diff --git a/src/components/HMI/css/sdl.css b/src/components/HMI/css/sdl.css
index e6bf641513..036aa6906d 100644
--- a/src/components/HMI/css/sdl.css
+++ b/src/components/HMI/css/sdl.css
@@ -528,6 +528,15 @@
line-height: 48px;
}
+#policy_update_button {
+ width: 117px;
+ height: 48px;
+ left: 1200px;
+ top: 206px;
+ text-align: center;
+ line-height: 48px;
+}
+
#tbtClientStateButton.tbtClientStateButton {
width: 158px;
height: 48px;
diff --git a/src/components/HMI/ffw/BasicCommunicationRPC.js b/src/components/HMI/ffw/BasicCommunicationRPC.js
index ed33daef17..dac0f0a4e3 100644
--- a/src/components/HMI/ffw/BasicCommunicationRPC.js
+++ b/src/components/HMI/ffw/BasicCommunicationRPC.js
@@ -201,7 +201,7 @@ FFW.BasicCommunication = FFW.RPCObserver
Em.Logger.log("FFW.BasicCommunicationRPC.onRPCResult");
this._super();
-
+ Em.Logger.log("OnRPCResult: " + JSON.stringify(response));
if ("result" in response
&& response.result.code === SDL.SDLModel.resultCode["SUCCESS"]) {
@@ -300,7 +300,7 @@ FFW.BasicCommunication = FFW.RPCObserver
} else {
this.OnSystemRequest("PROPRIETARY");
}
-
+ Em.Logger.log("response.result.urls: "+ JSON.stringify(response.result.urls));
SDL.SettingsController.policyUpdateRetry();
}
@@ -520,6 +520,7 @@ FFW.BasicCommunication = FFW.RPCObserver
this.client.send(JSONMessage);
}
if (request.method == "BasicCommunication.PolicyUpdate") {
+ Em.Logger.log("policy update");
SDL.SettingsController.policyUpdateFile = request.params.file;
SDL.SDLModel.policyUpdateRetry.timeout = request.params.timeout;
@@ -792,6 +793,27 @@ FFW.BasicCommunication = FFW.RPCObserver
},
/**
+ * Notification of decrypted policy table available
+ *
+ * @param {String} policyfile
+ */
+ OnHMIPolicyUpdate: function() {
+
+ Em.Logger.log("FFW.SDL.OnReceivedPolicyUpdate");
+
+ // send repsonse
+ var JSONMessage = {
+ "jsonrpc": "2.0",
+ "method": "SDL.OnReceivedPolicyUpdate",
+ "params": {
+ "policyfile": document.location.pathname.replace("index.html", "IVSU/POLICY_UPDATE_TEST")
+ }
+ };
+
+ this.client.send(JSONMessage);
+ },
+
+ /**
* Notifies if functionality was changed
*
* @param {Boolean}
@@ -1290,6 +1312,8 @@ FFW.BasicCommunication = FFW.RPCObserver
OnSystemRequest: function(type, appID, fileName, url) {
Em.Logger.log("FFW.BasicCommunication.OnSystemRequest");
+ Em.Logger.log("OnSystemRequest Params: " + type + " " + appID + " " + fileName
+ + " " + url);
// send request