From 5c293f83fb18912e2db8fbfd9d4d96dac62d43f1 Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Wed, 17 Jan 2018 13:51:18 +0530 Subject: [PATCH 1/2] Fixing https://github.com/wso2/product-iots/issues/1142 --- .../iot/virtualfirealarm/agent/virtual/ui/AgentUI.java | 2 +- .../private/config.json | 2 +- .../type-view.hbs | 8 ++++---- .../private/config.json | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java index 4a8e3dda9..291f541d1 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java @@ -194,7 +194,7 @@ public class AgentUI extends JFrame { lblAgentName.setText("Device Name: " + AgentManager.getInstance().getDeviceName()); jLabel2.setHorizontalAlignment(SwingConstants.CENTER); - jLabel2.setText("Copyright (c) 2015, WSO2 Inc."); + jLabel2.setText("Copyright (c) 2018, WSO2 Inc."); jPanel1.setBackground(new Color(220, 220, 220)); diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/private/config.json b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/private/config.json index 997094474..be47969f0 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/private/config.json +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/private/config.json @@ -1,6 +1,6 @@ { "deviceType": { - "label": "Virtual Firealarm", + "label": "Virtual Fire Alarm", "category": "virtual", "downloadAgentUri": "virtual_firealarm/device/download", "scopes" : [ diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/type-view.hbs b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/type-view.hbs index 9040e8c8b..b97e29d0f 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/type-view.hbs +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/type-view.hbs @@ -39,7 +39,7 @@
  • STEP 02 - Follow the steps under [Prepare] + Follow the steps under [Prepare] section.
  • STEP 03 @@ -79,7 +79,7 @@
  • 02 - Navigate to the unzipped agent directory via the terminal. + Navigate to the unzipped Agent folder via the terminal.
  • 03 - Start the agent using the sh start-device.sh command. + Run this command: sh start-device.sh.

  • diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/private/config.json b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/private/config.json index 77396e058..e6ab55c5d 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/private/config.json +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/private/config.json @@ -1,7 +1,7 @@ { "deviceType": { "label": "Android", - "virtualLabel": "virtual Android", + "virtualLabel": "Virtual Android", "category": "hybrid", "analyticsEnabled": "false", "groupingEnabled": "true", From 45f46bb54491f5a0eeae1ff86c6b15d09d7b57e0 Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Wed, 17 Jan 2018 14:20:58 +0530 Subject: [PATCH 2/2] Retrieving current year for the copyright notice --- .../iot/virtualfirealarm/agent/virtual/ui/AgentUI.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java index 291f541d1..15b544389 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java @@ -22,10 +22,10 @@ import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentConstants import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentManager; import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.virtual.VirtualHardwareManager; -import javax.swing.*; import java.awt.*; -import java.net.URI; import java.net.URL; +import java.util.Calendar; +import javax.swing.*; public class AgentUI extends JFrame { @@ -193,8 +193,10 @@ public class AgentUI extends JFrame { lblAgentName.setHorizontalAlignment(SwingConstants.LEFT); lblAgentName.setText("Device Name: " + AgentManager.getInstance().getDeviceName()); + Calendar now = Calendar.getInstance(); + int currentYear = now.get(Calendar.YEAR); jLabel2.setHorizontalAlignment(SwingConstants.CENTER); - jLabel2.setText("Copyright (c) 2018, WSO2 Inc."); + jLabel2.setText("Copyright (c) " + currentYear + ", WSO2 Inc."); jPanel1.setBackground(new Color(220, 220, 220));