From 08d2d9d6a7a38b9ad19a82850b94122aca4c53b7 Mon Sep 17 00:00:00 2001 From: charithag Date: Thu, 22 Oct 2015 06:48:00 +0530 Subject: [PATCH 1/5] Removed un used cdm dbscripts --- .../src/repository/dbscripts/cdm/h2.sql | 26 ----- .../src/repository/dbscripts/cdm/mysql.sql | 35 ------- .../repository/dbscripts/cdm/plugins/h2.sql | 82 --------------- .../dbscripts/cdm/plugins/mysql.sql | 99 ------------------- 4 files changed, 242 deletions(-) delete mode 100644 modules/distribution/src/repository/dbscripts/cdm/h2.sql delete mode 100644 modules/distribution/src/repository/dbscripts/cdm/mysql.sql delete mode 100644 modules/distribution/src/repository/dbscripts/cdm/plugins/h2.sql delete mode 100644 modules/distribution/src/repository/dbscripts/cdm/plugins/mysql.sql diff --git a/modules/distribution/src/repository/dbscripts/cdm/h2.sql b/modules/distribution/src/repository/dbscripts/cdm/h2.sql deleted file mode 100644 index 3ceea15a..00000000 --- a/modules/distribution/src/repository/dbscripts/cdm/h2.sql +++ /dev/null @@ -1,26 +0,0 @@ -CREATE TABLE IF NOT EXISTS DM_DEVICE_TYPE -( - ID INT(11) auto_increment NOT NULL, - NAME VARCHAR(300) NULL DEFAULT NULL, - PRIMARY KEY (ID) -); - -CREATE TABLE IF NOT EXISTS DM_DEVICE -( - ID INT auto_increment NOT NULL, - DESCRIPTION TEXT NULL DEFAULT NULL, - NAME VARCHAR(100) NULL DEFAULT NULL, - DATE_OF_ENROLLMENT BIGINT NULL DEFAULT NULL, - DATE_OF_LAST_UPDATE BIGINT NULL DEFAULT NULL, - OWNERSHIP VARCHAR(45) NULL DEFAULT NULL, - STATUS VARCHAR(15) NULL DEFAULT NULL, - DEVICE_TYPE_ID INT(11) NULL DEFAULT NULL, - DEVICE_IDENTIFICATION VARCHAR(300) NULL DEFAULT NULL, - OWNER VARCHAR(45) NULL DEFAULT NULL, - TENANT_ID INTEGER DEFAULT 0, - PRIMARY KEY (ID), - CONSTRAINT fk_DM_DEVICE_DM_DEVICE_TYPE2 FOREIGN KEY (DEVICE_TYPE_ID ) - REFERENCES DM_DEVICE_TYPE (ID ) ON DELETE NO ACTION ON UPDATE NO ACTION -); --- TO:DO - Remove this INSERT sql statement. -Insert into DM_DEVICE_TYPE (NAME) VALUES ('android'); diff --git a/modules/distribution/src/repository/dbscripts/cdm/mysql.sql b/modules/distribution/src/repository/dbscripts/cdm/mysql.sql deleted file mode 100644 index bc04de87..00000000 --- a/modules/distribution/src/repository/dbscripts/cdm/mysql.sql +++ /dev/null @@ -1,35 +0,0 @@ --- ----------------------------------------------------- --- Table `DM_DEVICE_TYPE` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `DM_DEVICE_TYPE` ( - `ID` INT(11) NOT NULL , - `NAME` VARCHAR(300) NULL DEFAULT NULL , - PRIMARY KEY (`ID`) ) -ENGINE = InnoDB -DEFAULT CHARACTER SET = latin1; - - --- ----------------------------------------------------- --- Table `DM_DEVICE` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `DM_DEVICE` ( - `ID` VARCHAR(20) NOT NULL , - `DESCRIPTION` TEXT NULL DEFAULT NULL , - `NAME` VARCHAR(100) NULL DEFAULT NULL , - `DATE_OF_ENROLLMENT` DATETIME NULL DEFAULT NULL , - `DATE_OF_LAST_UPDATE` DATETIME NULL DEFAULT NULL , - `OWNERSHIP` VARCHAR(45) NULL DEFAULT NULL , - `STATUS` VARCHAR(15) NULL DEFAULT NULL , - `DEVICE_TYPE_ID` INT(11) NULL DEFAULT NULL , - `DEVICE_IDENTIFICATION` VARCHAR(300) NULL DEFAULT NULL , - `OWNER` VARCHAR(45) NULL DEFAULT NULL , - TENANT_ID INTEGER DEFAULT 0, - PRIMARY KEY (`ID`) , - INDEX `fk_DM_DEVICE_DM_DEVICE_TYPE2_idx` (`DEVICE_TYPE_ID` ASC) , - CONSTRAINT `fk_DM_DEVICE_DM_DEVICE_TYPE2` - FOREIGN KEY (`DEVICE_TYPE_ID` ) - REFERENCES `DM_DEVICE_TYPE` (`ID` ) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB -DEFAULT CHARACTER SET = latin1; diff --git a/modules/distribution/src/repository/dbscripts/cdm/plugins/h2.sql b/modules/distribution/src/repository/dbscripts/cdm/plugins/h2.sql deleted file mode 100644 index 39610edd..00000000 --- a/modules/distribution/src/repository/dbscripts/cdm/plugins/h2.sql +++ /dev/null @@ -1,82 +0,0 @@ - --- ----------------------------------------------------- --- Table `MBL_DEVICE` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `MBL_DEVICE` ( - `MOBILE_DEVICE_ID` VARCHAR(45) NOT NULL , - `REG_ID` VARCHAR(45) NULL DEFAULT NULL , - `IMEI` VARCHAR(45) NULL DEFAULT NULL , - `IMSI` VARCHAR(45) NULL DEFAULT NULL , - `OS_VERSION` VARCHAR(45) NULL DEFAULT NULL , - `DEVICE_MODEL` VARCHAR(45) NULL DEFAULT NULL , - `VENDOR` VARCHAR(45) NULL DEFAULT NULL , - `LATITUDE` VARCHAR(45) NULL DEFAULT NULL, - `LONGITUDE` VARCHAR(45) NULL DEFAULT NULL, - PRIMARY KEY (`MOBILE_DEVICE_ID`) ); - - --- ----------------------------------------------------- --- Table `MBL_FEATURE` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `MBL_FEATURE` ( - `FEATURE_ID` INT NOT NULL AUTO_INCREMENT , - `CODE` VARCHAR(45) NOT NULL , - `NAME` VARCHAR(100) NULL , - `DESCRIPTION` VARCHAR(200) NULL , - PRIMARY KEY (`FEATURE_ID`) ); - --- ----------------------------------------------------- --- Table `MBL_OPERATION` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `MBL_OPERATION` ( - `OPERATION_ID` INT NOT NULL AUTO_INCREMENT , - `FEATURE_CODE` VARCHAR(45) NOT NULL , - `CREATED_DATE` BIGINT NULL , - PRIMARY KEY (`OPERATION_ID`)); - --- ----------------------------------------------------- --- Table `MBL_DEVICE_OPERATION_MAPPING` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `MBL_DEVICE_OPERATION_MAPPING` ( - `DEVICE_ID` VARCHAR(45) NOT NULL , - `OPERATION_ID` INT NOT NULL , - `SENT_DATE` BIGINT NULL , - `RECEIVED_DATE` BIGINT NULL , - PRIMARY KEY (`DEVICE_ID`, `OPERATION_ID`) , - CONSTRAINT `fk_MBL_DEVICE_OPERATION_MBL_DEVICE` - FOREIGN KEY (`DEVICE_ID` ) - REFERENCES `MBL_DEVICE` (`MOBILE_DEVICE_ID` ) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_MBL_DEVICE_OPERATION_MBL_OPERATION1` - FOREIGN KEY (`OPERATION_ID` ) - REFERENCES `MBL_OPERATION` (`OPERATION_ID` ) - ON DELETE NO ACTION - ON UPDATE NO ACTION); - --- ----------------------------------------------------- --- Table `MBL_OPERATION_PROPERTY` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `MBL_OPERATION_PROPERTY` ( - `OPERATION_ID` INT NOT NULL , - `PROPERTY` VARCHAR(45) NOT NULL , - `VALUE` TEXT NULL , - PRIMARY KEY (`OPERATION_ID`, `PROPERTY`) , - CONSTRAINT `fk_MBL_OPERATION_PROPERTY_MBL_OPERATION1` - FOREIGN KEY (`OPERATION_ID` ) - REFERENCES `MBL_OPERATION` (`OPERATION_ID` ) - ON DELETE NO ACTION - ON UPDATE NO ACTION); - --- ----------------------------------------------------- --- Table `MBL_FEATURE_PROPERTY` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `MBL_FEATURE_PROPERTY` ( - `PROPERTY` VARCHAR(45) NOT NULL , - `FEATURE_ID` VARCHAR(45) NOT NULL , - PRIMARY KEY (`PROPERTY`) , - CONSTRAINT `fk_MBL_FEATURE_PROPERTY_MBL_FEATURE1` - FOREIGN KEY (`FEATURE_ID` ) - REFERENCES `MBL_FEATURE` (`FEATURE_ID` ) - ON DELETE NO ACTION - ON UPDATE NO ACTION); diff --git a/modules/distribution/src/repository/dbscripts/cdm/plugins/mysql.sql b/modules/distribution/src/repository/dbscripts/cdm/plugins/mysql.sql deleted file mode 100644 index 10adee8d..00000000 --- a/modules/distribution/src/repository/dbscripts/cdm/plugins/mysql.sql +++ /dev/null @@ -1,99 +0,0 @@ --- ----------------------------------------------------- --- Table `MBL_DEVICE` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `MBL_DEVICE` ( - `MOBILE_DEVICE_ID` VARCHAR(45) NOT NULL, - `REG_ID` VARCHAR(45) NULL DEFAULT NULL, - `IMEI` VARCHAR(45) NULL DEFAULT NULL, - `IMSI` VARCHAR(45) NULL DEFAULT NULL, - `OS_VERSION` VARCHAR(45) NULL DEFAULT NULL, - `DEVICE_MODEL` VARCHAR(45) NULL DEFAULT NULL, - `VENDOR` VARCHAR(45) NULL DEFAULT NULL, - `LATITUDE` VARCHAR(45) NULL DEFAULT NULL, - `LONGITUDE` VARCHAR(45) NULL DEFAULT NULL, - PRIMARY KEY (`MOBILE_DEVICE_ID`)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `MBL_FEATURE` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `MBL_FEATURE` ( - `FEATURE_ID` INT NOT NULL AUTO_INCREMENT, - `CODE` VARCHAR(45) NULL, - `NAME` VARCHAR(100) NULL, - `DESCRIPTION` VARCHAR(200) NULL, - PRIMARY KEY (`FEATURE_ID`)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `MBL_OPERATION` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `MBL_OPERATION` ( - `OPERATION_ID` INT NOT NULL AUTO_INCREMENT, - `FEATURE_CODE` VARCHAR(45) NULL, - `CREATED_DATE` INT NULL, - PRIMARY KEY (`OPERATION_ID`)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `MBL_DEVICE_OPERATION_MAPING` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `MBL_DEVICE_OPERATION_MAPPING` ( - `DEVICE_ID` VARCHAR(45) NOT NULL, - `OPERATION_ID` INT NOT NULL, - `SENT_DATE` INT NULL, - `RECEIVED_DATE` INT NULL, - PRIMARY KEY (`DEVICE_ID`, `OPERATION_ID`), - INDEX `fk_MBL_DEVICE_OPERATION_MBL_OPERATION1_idx` (`OPERATION_ID` ASC), - CONSTRAINT `fk_MBL_DEVICE_OPERATION_MBL_DEVICE` - FOREIGN KEY (`DEVICE_ID`) - REFERENCES `MBL_DEVICE` (`MOBILE_DEVICE_ID`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_MBL_DEVICE_OPERATION_MBL_OPERATION1` - FOREIGN KEY (`OPERATION_ID`) - REFERENCES `MBL_OPERATION` (`OPERATION_ID`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `MBL_OPERATION_PROPERTY` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `MBL_OPERATION_PROPERTY` ( - `OPERATION_PROPERTY_ID` INT NOT NULL AUTO_INCREMENT, - `OPERATION_ID` INT NULL, - `PROPERTY_ID` INT NULL, - `VALUE` TEXT NULL, - PRIMARY KEY (`OPERATION_PROPERTY_ID`), - INDEX `fk_MBL_OPERATION_PROPERTY_MBL_OPERATION1_idx` (`OPERATION_ID` ASC), - CONSTRAINT `fk_MBL_OPERATION_PROPERTY_MBL_OPERATION1` - FOREIGN KEY (`OPERATION_ID`) - REFERENCES `MBL_OPERATION` (`OPERATION_ID`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `MBL_FEATURE_PROPERTY` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `MBL_FEATURE_PROPERTY` ( - `PROPERTY_ID` INT NOT NULL AUTO_INCREMENT, - `PROPERTY` VARCHAR(100) NULL, - `FEATURE_ID` VARCHAR(45) NULL, - PRIMARY KEY (`PROPERTY_ID`), - INDEX `fk_MBL_FEATURE_PROPERTY_MBL_FEATURE1_idx` (`FEATURE_ID` ASC), - CONSTRAINT `fk_MBL_FEATURE_PROPERTY_MBL_FEATURE1` - FOREIGN KEY (`FEATURE_ID`) - REFERENCES `MBL_FEATURE` (`FEATURE_ID`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - - From 306646c51de3b000e0f3827a2e5def2ebfe79a73 Mon Sep 17 00:00:00 2001 From: charithag Date: Thu, 22 Oct 2015 06:50:55 +0530 Subject: [PATCH 2/5] Change virtual device "Download" button text to "Create a Device". --- modules/samples/virtual_firealarm/artifact/deviceType.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/samples/virtual_firealarm/artifact/deviceType.json b/modules/samples/virtual_firealarm/artifact/deviceType.json index c9176222..0b63d563 100644 --- a/modules/samples/virtual_firealarm/artifact/deviceType.json +++ b/modules/samples/virtual_firealarm/artifact/deviceType.json @@ -9,13 +9,13 @@ "overview_name":"virtual_firealarm", "overview_url":"http://www.google.lk", "setupGuide_guideImage":"virtual_firealarm/guide.png", - "overview_actionLabel":"Download a virtual device", + "overview_actionLabel":"Create a virtual device", "sketches_Sketches":"virtual_firealarm", "ingredients_ingredients":[ "Virtual Agent that simulates an actual firealarm" ], "overview_description":"Download our Virtual Agent and try-it out for close to real simulation of the FireAlarm Device-Type", - "setupGuide_description":"sfd", + "setupGuide_description":"Extract the downloaded agent and run startservice.sh to start agent", "quickStartupSteps_stepDescription":["Download the Virtual Agent","Run the 'startservice.sh' script","Provide the push-interval and network-interface"], "quickStartupSteps_stepLabel":["1","2","3"], "images_thumbnail":"virtual_firealarm/virtual_firealarm_thumbnail.png", From 36bf7a529ab829fcd84095ca32d252cd4566d3b4 Mon Sep 17 00:00:00 2001 From: charithag Date: Thu, 22 Oct 2015 06:51:53 +0530 Subject: [PATCH 3/5] Redirect user to the login page upon successful registration --- modules/distribution/src/assembly/bin.xml | 18 +- .../src/sso/views/register_new_user.jag | 200 ++++++++++++++++++ 2 files changed, 211 insertions(+), 7 deletions(-) create mode 100644 modules/distribution/src/sso/views/register_new_user.jag diff --git a/modules/distribution/src/assembly/bin.xml b/modules/distribution/src/assembly/bin.xml index 6446dd26..90800748 100644 --- a/modules/distribution/src/assembly/bin.xml +++ b/modules/distribution/src/assembly/bin.xml @@ -80,6 +80,7 @@ **/sso-idp-config.xml **/application-authentication.xml **/sso/jaggery.conf + **/sso/views/register_new_user.jag @@ -330,6 +331,7 @@ **/publisher/config/publisher-tenant.json **/sso/jaggery.conf + **/sso/views/register_new_user.jag @@ -574,6 +576,15 @@ + + src/sso + + ${pom.artifactId}-${pom.version}/repository/deployment/server/jaggeryapps/sso + + + **/* + + @@ -1119,12 +1130,5 @@ ${pom.artifactId}-${pom.version}/repository/deployment/server/jaggeryapps/publisher/config 644 - - - src/sso/jaggery.conf - ${pom.artifactId}-${pom.version}/repository/deployment/server/jaggeryapps/sso - true - - diff --git a/modules/distribution/src/sso/views/register_new_user.jag b/modules/distribution/src/sso/views/register_new_user.jag new file mode 100644 index 00000000..1a146890 --- /dev/null +++ b/modules/distribution/src/sso/views/register_new_user.jag @@ -0,0 +1,200 @@ +<% +/* + * Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ +var configs = require('/config/sso.js').config(); +var e = request.getParameter('authFailure'); + +var log = new Log(); +var relyingParty = request.getParameter('relyingParty'); + +if(!request.isSecure()){ + response.content = { 'authFailure' : e , 'relyingParty' : relyingParty }; + response.sendRedirect(configs.server.https + request.getRequestURI()); +} + +//TODO: this should be fixed properly +if (relyingParty instanceof Array) { + relyingParty = relyingParty.pop(); +} +var signInUrl; + +if (relyingParty == 'publisher') { + signInUrl = configs.urls.publisher; +} else { + signInUrl = configs.urls.store + '/login?ignoreReferer=true'; +} + +var recoveryModule = require('account-management').recovery; +var challengeSet = recoveryModule.getChallengeQuestionSet(); +var isPasswordRecoveryEnabled = recoveryModule.isPasswordRecoveryEnabled(); +var themeModule = require('/modules/theme.js'); +%> + + + + + Sign in or Register | <% include(themeModule.getThemedUrl('includes/title.jag')); %> + + + + <% include(themeModule.getThemedUrl('includes/header_file_imports.jag')); %> + + +
+ <% include(themeModule.getThemedUrl('includes/header.jag')); %> +
+ + +
+
+ + <% include(themeModule.getThemedUrl('includes/footer_file_imports.jag')); %> + + + \ No newline at end of file From 928dd66ae3c5a6b0596165c578bcabebd309dda0 Mon Sep 17 00:00:00 2001 From: charithag Date: Thu, 22 Oct 2015 07:52:19 +0530 Subject: [PATCH 4/5] License updated --- modules/distribution/src/assembly/bin.xml | 17 +++++++++++++++++ modules/distribution/src/assembly/dist.xml | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/modules/distribution/src/assembly/bin.xml b/modules/distribution/src/assembly/bin.xml index 90800748..c1ec4aeb 100644 --- a/modules/distribution/src/assembly/bin.xml +++ b/modules/distribution/src/assembly/bin.xml @@ -1,3 +1,20 @@ + bin diff --git a/modules/distribution/src/assembly/dist.xml b/modules/distribution/src/assembly/dist.xml index 5d2be5cb..f41020e5 100644 --- a/modules/distribution/src/assembly/dist.xml +++ b/modules/distribution/src/assembly/dist.xml @@ -1,5 +1,5 @@ - 4.4.1 + 4.4.2 [4.4.1, 4.5.0) - 4.4.1 + 4.4.2 1.5.4