Merge "Bug 46 fixedgit status"
diff --git a/skyquake/plugins/about/CMakeLists.txt b/skyquake/plugins/about/CMakeLists.txt
index bc69175..d4233d3 100644
--- a/skyquake/plugins/about/CMakeLists.txt
+++ b/skyquake/plugins/about/CMakeLists.txt
@@ -36,6 +36,7 @@
rift_externalproject_add(
about
+ DEPENDS skyquake
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
CONFIGURE_COMMAND echo
BUILD_COMMAND
diff --git a/skyquake/plugins/about/scripts/install.sh b/skyquake/plugins/about/scripts/install.sh
index da5936d..7936913 100755
--- a/skyquake/plugins/about/scripts/install.sh
+++ b/skyquake/plugins/about/scripts/install.sh
@@ -37,7 +37,7 @@
cp -Lrf $source_dir/config.json $dest_dir/plugins/$plugin/.
cp -Lrf $source_dir/routes.js $dest_dir/plugins/$plugin/.
cp -Lrp $source_dir/api $dest_dir/plugins/$plugin/.
-tar -cf $dest_dir/plugins/$plugin/node_modules.tar $source_dir/node_modules $source_dir/package.json
+tar -cf $dest_dir/plugins/$plugin/node_modules.tar node_modules package.json -C $source_dir
#cp -Lrp $source_dir/node_modules $dest_dir/plugins/$plugin/.
mkdir -p $bcache_dir/plugins/$plugin
cp -Lrf $source_dir/public $bcache_dir/plugins/$plugin/.
diff --git a/skyquake/plugins/accounts/CMakeLists.txt b/skyquake/plugins/accounts/CMakeLists.txt
index 4caa157..aaf6ad9 100644
--- a/skyquake/plugins/accounts/CMakeLists.txt
+++ b/skyquake/plugins/accounts/CMakeLists.txt
@@ -36,6 +36,7 @@
rift_externalproject_add(
accounts
+ DEPENDS skyquake
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
CONFIGURE_COMMAND echo
BUILD_COMMAND
diff --git a/skyquake/plugins/accounts/scripts/install.sh b/skyquake/plugins/accounts/scripts/install.sh
index 2b5fdb1..846dad7 100755
--- a/skyquake/plugins/accounts/scripts/install.sh
+++ b/skyquake/plugins/accounts/scripts/install.sh
@@ -37,7 +37,7 @@
cp -Lrf $source_dir/config.json $dest_dir/plugins/$plugin/.
cp -Lrf $source_dir/routes.js $dest_dir/plugins/$plugin/.
cp -Lrp $source_dir/api $dest_dir/plugins/$plugin/.
-tar -cf $dest_dir/plugins/$plugin/node_modules.tar $source_dir/node_modules $source_dir/package.json
+tar -cf $dest_dir/plugins/$plugin/node_modules.tar node_modules package.json -C $source_dir
#cp -Lrp $source_dir/node_modules $dest_dir/plugins/$plugin/.
mkdir -p $bcache_dir/plugins/$plugin
cp -Lrf $source_dir/public $bcache_dir/plugins/$plugin/.
diff --git a/skyquake/plugins/composer/CMakeLists.txt b/skyquake/plugins/composer/CMakeLists.txt
index 9db080f..d9277b7 100644
--- a/skyquake/plugins/composer/CMakeLists.txt
+++ b/skyquake/plugins/composer/CMakeLists.txt
@@ -36,6 +36,7 @@
rift_externalproject_add(
composer
+ DEPENDS skyquake
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
CONFIGURE_COMMAND echo
BUILD_COMMAND
diff --git a/skyquake/plugins/composer/scripts/install.sh b/skyquake/plugins/composer/scripts/install.sh
index abba7f5..76e5e75 100755
--- a/skyquake/plugins/composer/scripts/install.sh
+++ b/skyquake/plugins/composer/scripts/install.sh
@@ -37,12 +37,12 @@
cp -Lrf $source_dir/config.json $dest_dir/plugins/$plugin/.
cp -Lrf $source_dir/routes.js $dest_dir/plugins/$plugin/.
cp -Lrp $source_dir/api $dest_dir/plugins/$plugin/.
-tar -cf $dest_dir/plugins/$plugin/node_modules.tar $source_dir/node_modules $source_dir/package.json
+tar -cf $dest_dir/plugins/$plugin/node_modules.tar node_modules package.json -C $source_dir
#cp -Lrp $source_dir/node_modules $dest_dir/plugins/$plugin/.
mkdir -p $bcache_dir/plugins/$plugin
cp -Lrf $source_dir/public $bcache_dir/plugins/$plugin/.
cp -Lrf $source_dir/config.json $bcache_dir/plugins/$plugin/.
cp -Lrf $source_dir/routes.js $bcache_dir/plugins/$plugin/.
cp -Lrp $source_dir/api $bcache_dir/plugins/$plugin/.
-tar -cf $bcache_dir/plugins/$plugin/node_modules.tar $source_dir/node_modules $source_dir/package.json
+tar -cf $bcache_dir/plugins/$plugin/node_modules.tar node_modules package.json -C $source_dir
#cp -Lrp $source_dir/node_modules $bcache_dir/plugins/$plugin/.
diff --git a/skyquake/plugins/config/CMakeLists.txt b/skyquake/plugins/config/CMakeLists.txt
index 9e1fe30..e12d4fd 100644
--- a/skyquake/plugins/config/CMakeLists.txt
+++ b/skyquake/plugins/config/CMakeLists.txt
@@ -22,6 +22,7 @@
rift_externalproject_add(
config
+ DEPENDS skyquake
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
CONFIGURE_COMMAND echo
BUILD_COMMAND
diff --git a/skyquake/plugins/config/scripts/install.sh b/skyquake/plugins/config/scripts/install.sh
index 9e6c59e..ca3d9ca 100755
--- a/skyquake/plugins/config/scripts/install.sh
+++ b/skyquake/plugins/config/scripts/install.sh
@@ -23,7 +23,7 @@
cp -Lrf $source_dir/config.json $dest_dir/plugins/$plugin/.
cp -Lrf $source_dir/routes.js $dest_dir/plugins/$plugin/.
cp -Lrp $source_dir/api $dest_dir/plugins/$plugin/.
-tar -cf $dest_dir/plugins/$plugin/node_modules.tar $source_dir/node_modules $source_dir/package.json
+tar -cf $dest_dir/plugins/$plugin/node_modules.tar node_modules package.json -C $source_dir
#cp -Lrp $source_dir/node_modules $dest_dir/plugins/$plugin/.
mkdir -p $bcache_dir/plugins/$plugin
cp -Lrf $source_dir/public $bcache_dir/plugins/$plugin/.
diff --git a/skyquake/plugins/debug/CMakeLists.txt b/skyquake/plugins/debug/CMakeLists.txt
index 6d2e56d..20ff171 100644
--- a/skyquake/plugins/debug/CMakeLists.txt
+++ b/skyquake/plugins/debug/CMakeLists.txt
@@ -36,6 +36,7 @@
rift_externalproject_add(
debug
+ DEPENDS skyquake
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
CONFIGURE_COMMAND echo
BUILD_COMMAND
diff --git a/skyquake/plugins/debug/scripts/install.sh b/skyquake/plugins/debug/scripts/install.sh
index a14b9bd..6e27c86 100755
--- a/skyquake/plugins/debug/scripts/install.sh
+++ b/skyquake/plugins/debug/scripts/install.sh
@@ -37,7 +37,7 @@
cp -Lrf $source_dir/config.json $dest_dir/plugins/$plugin/.
cp -Lrf $source_dir/routes.js $dest_dir/plugins/$plugin/.
cp -Lrp $source_dir/api $dest_dir/plugins/$plugin/.
-tar -cf $dest_dir/plugins/$plugin/node_modules.tar $source_dir/node_modules $source_dir/package.json
+tar -cf $dest_dir/plugins/$plugin/node_modules.tar node_modules package.json -C $source_dir
#cp -Lrp $source_dir/node_modules $dest_dir/plugins/$plugin/.
mkdir -p $bcache_dir/plugins/$plugin
cp -Lrf $source_dir/public $bcache_dir/plugins/$plugin/.
diff --git a/skyquake/plugins/goodbyeworld/CMakeLists.txt b/skyquake/plugins/goodbyeworld/CMakeLists.txt
index 773e1bd..414bed0 100644
--- a/skyquake/plugins/goodbyeworld/CMakeLists.txt
+++ b/skyquake/plugins/goodbyeworld/CMakeLists.txt
@@ -36,6 +36,7 @@
rift_externalproject_add(
goodbyeworld
+ DEPENDS skyquake
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
CONFIGURE_COMMAND echo
BUILD_COMMAND
diff --git a/skyquake/plugins/helloworld/CMakeLists.txt b/skyquake/plugins/helloworld/CMakeLists.txt
index 921c1aa..b78f22e 100644
--- a/skyquake/plugins/helloworld/CMakeLists.txt
+++ b/skyquake/plugins/helloworld/CMakeLists.txt
@@ -36,6 +36,7 @@
rift_externalproject_add(
helloworld
+ DEPENDS skyquake
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
CONFIGURE_COMMAND echo
BUILD_COMMAND
diff --git a/skyquake/plugins/launchpad/CMakeLists.txt b/skyquake/plugins/launchpad/CMakeLists.txt
index 2917c8d..e9026e9 100644
--- a/skyquake/plugins/launchpad/CMakeLists.txt
+++ b/skyquake/plugins/launchpad/CMakeLists.txt
@@ -36,6 +36,7 @@
rift_externalproject_add(
launchpad
+ DEPENDS skyquake
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
CONFIGURE_COMMAND echo
BUILD_COMMAND
diff --git a/skyquake/plugins/launchpad/scripts/install.sh b/skyquake/plugins/launchpad/scripts/install.sh
index 79fb26b..ac8bff8 100755
--- a/skyquake/plugins/launchpad/scripts/install.sh
+++ b/skyquake/plugins/launchpad/scripts/install.sh
@@ -37,7 +37,7 @@
cp -Lrf $source_dir/config.json $dest_dir/plugins/$plugin/.
cp -Lrf $source_dir/routes.js $dest_dir/plugins/$plugin/.
cp -Lrp $source_dir/api $dest_dir/plugins/$plugin/.
-tar -cf $dest_dir/plugins/$plugin/node_modules.tar $source_dir/node_modules $source_dir/package.json
+tar -cf $dest_dir/plugins/$plugin/node_modules.tar node_modules package.json -C $source_dir
#cp -Lrp $source_dir/node_modules $dest_dir/plugins/$plugin/.
mkdir -p $bcache_dir/plugins/$plugin
cp -Lrf $source_dir/public $bcache_dir/plugins/$plugin/.
diff --git a/skyquake/plugins/launchpad/src/instantiate/instantiateInputParams.jsx b/skyquake/plugins/launchpad/src/instantiate/instantiateInputParams.jsx
index 4db4a63..ec40ccf 100644
--- a/skyquake/plugins/launchpad/src/instantiate/instantiateInputParams.jsx
+++ b/skyquake/plugins/launchpad/src/instantiate/instantiateInputParams.jsx
@@ -420,8 +420,9 @@
{
sshKeysRef.map(function(ref, i) {
+ let keyref = JSON.stringify(ref)
return (
- <div key={i} className="inputControls inputControls-sshkeys">
+ <div key={keyref.name + '-' + i} className="inputControls inputControls-sshkeys">
<label>
<div>
<SelectOption
@@ -434,13 +435,13 @@
})}
ref="keyPairSelection"
initial={false}
- defaultValue={sshKeysList[0].name}
- onChange={self.props.updateSshKeyRef(i)}>
+ defaultValue={keyref.name || sshKeysList[0].name}
+ onChange={props.sshFn.updateKeyRef(i)}>
</SelectOption>
</div>
</label>
<label>
- <span onClick={self.props.updateSshKeyRef(i, true)} className="removeInput">
+ <span onClick={props.sshFn.updateKeyRef(i, true)} className="removeInput">
<img src={imgRemove} />
Remove
</span>
@@ -452,7 +453,7 @@
<div className="inputControls inputControls-sshkeys ">
<label style={{display: 'flex', 'flexDirection': 'row'}}>
SSH KEY PAIR
- <span onClick={self.props.updateSshKeyRef().bind(null, {target:{value: JSON.stringify(sshKeysList[0])}})} className="addInput">
+ <span onClick={props.sshFn.updateKeyRef().bind(null, {target:{value: JSON.stringify(sshKeysList[0])}})} className="addInput">
<img src={imgAdd} />
ADD
</span>
diff --git a/skyquake/plugins/launchpad/src/instantiate/instantiateParameters.jsx b/skyquake/plugins/launchpad/src/instantiate/instantiateParameters.jsx
index 5546b25..0e5fa1f 100644
--- a/skyquake/plugins/launchpad/src/instantiate/instantiateParameters.jsx
+++ b/skyquake/plugins/launchpad/src/instantiate/instantiateParameters.jsx
@@ -78,6 +78,9 @@
ipProfileList={this.props.ipProfiles}
+ sshKeysList={this.props.sshKeysList}
+ sshKeysRef={this.props.sshKeysRef}
+
dnsServers={this.props.dnsServers}
usersList = {this.props.usersList}
diff --git a/skyquake/plugins/launchpad/src/ssh_keys/sshKeyStore.js b/skyquake/plugins/launchpad/src/ssh_keys/sshKeyStore.js
index 400c096..7ae421b 100644
--- a/skyquake/plugins/launchpad/src/ssh_keys/sshKeyStore.js
+++ b/skyquake/plugins/launchpad/src/ssh_keys/sshKeyStore.js
@@ -1,5 +1,5 @@
/*
- *
+ *
* Copyright 2016 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -174,10 +174,8 @@
return {key: payload.key, name: payload.name};
}
validate(data) {
- for (let k in data) {
- if((data[k].trim() == '') || ((/[^\w _-]/).test(data[k]))) {
- return false;
- }
+ if((data['name'].trim() == '') || ((/[^\w _-]/).test(data['name']))) {
+ return false;
}
return true;
}
diff --git a/skyquake/plugins/logging/CMakeLists.txt b/skyquake/plugins/logging/CMakeLists.txt
index 1bf2963..fafe777 100644
--- a/skyquake/plugins/logging/CMakeLists.txt
+++ b/skyquake/plugins/logging/CMakeLists.txt
@@ -36,6 +36,7 @@
rift_externalproject_add(
logging
+ DEPENDS skyquake
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
CONFIGURE_COMMAND echo
BUILD_COMMAND
diff --git a/skyquake/plugins/logging/scripts/install.sh b/skyquake/plugins/logging/scripts/install.sh
index 1eac1a1..e6fdb86 100755
--- a/skyquake/plugins/logging/scripts/install.sh
+++ b/skyquake/plugins/logging/scripts/install.sh
@@ -37,7 +37,7 @@
cp -Lrf $source_dir/config.json $dest_dir/plugins/$plugin/.
cp -Lrf $source_dir/routes.js $dest_dir/plugins/$plugin/.
cp -Lrp $source_dir/api $dest_dir/plugins/$plugin/.
-tar -cf $dest_dir/plugins/$plugin/node_modules.tar $source_dir/node_modules $source_dir/package.json
+tar -cf $dest_dir/plugins/$plugin/node_modules.tar node_modules package.json -C $source_dir
#cp -Lrp $source_dir/node_modules $dest_dir/plugins/$plugin/.
mkdir -p $bcache_dir/plugins/$plugin
cp -Lrf $source_dir/public $bcache_dir/plugins/$plugin/.