Skip to content

Commit

Permalink
Seal on v1
Browse files Browse the repository at this point in the history
  • Loading branch information
Surgbc committed Sep 26, 2017
1 parent 77a059d commit 74093bc
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 201 deletions.
200 changes: 4 additions & 196 deletions config/config.example.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ const config = {
siteuser:"skin-blue",
},
database:{
name:"csybere"
name:process.env.MONGODB,
uri:process.env.MONGODB_URI,
},
author:"Brian Onang'o",
adminemail:"postmaster@gospelsounders.org",
Expand All @@ -63,202 +64,9 @@ const config = {
{
keywords:"keywords go here",
description:"Descrition goes here",
defaultapp: false,
// defaultapp: 'csyma',//'construction',
defaultapp: 'csymaconstruction',//'construction',
// defaultapp: false,
dashboards:
{
class: "fa fa-desktop",
user:{
"home":{ //add more dashboards here
name: "Home",
url: "#",
default: true
},
}
}
},
sidemenuitems: {
apps: {
class: "fa fa-desktop",
apps: {
/* "administration":{
name: "Administration",
url: "admin/dashboard",
},
Vipimo:{
name: "Vipimo",
url: "admin/dashboard",
},
Farmbot:{
name: "Farmbot",
url: "siteadmin/dashboard",
},
"Systematic Benelovence":{ //add more dashboards here
name: "Systematic Benelovence",
url: "dashboards/flowerwatch",
},
Traceme:{ //add more dashboards here
name: "Traceme",
url: "dashboards/flowerwatch",
},
"Open-Aquarium":{ //add more dashboards here
name: "Open-Aquarium",
url: "dashboards/flowerwatch",
},
Treasury:{ //add more dashboards here
name: "Tracker",
url: "dashboards/flowerwatch",
}*/
"home":{ //add more dashboards here
name: "Home",
url: "#",
default: true
},
"settings":{ //add more dashboards here
name: "Settings",
url: "#settings",
default: true
},
"help":{ //add more dashboards here
name: "Help",
url: "#help",
default: true
},
"applications":{ //add more dashboards here
name: "applications",
url: "#application",
default: false
},
Surveyor:{ //add more dashboards here
name: "Surveyor",
url: "dashboards/surveyor",
default: false
},
flowerwatch:{ //add more dashboards here
name: "flowerwatch",
url: "dashboards/flowerwatch",
default: false
},
farmbot:{ //add more dashboards here
name: "farmbot",
url: "#farmbot",
default: true
},
ssb:{ //add more dashboards here
name: "ssb",
url: "#ssb",
default: true
},
projector:{ //add more dashboards here
name: "Projector",
url: "#projector",
default: true
},
csweeper:{ //add more dashboards here
name: "Csweeper",
url: "#csweeper",
default: true
},
hymnal:{ //add more dashboards here
name: "hymnal",
url: "#hymnal",
default: true
},
cskul:{ //add more dashboards here
name: "cskul",
url: "#cskul",
default: true
},
kamoo:{ //add more dashboards here
name: "kamoo",
url: "#kamoo",
default: true
},
csenergy:{ //add more dashboards here
name: "Csenergy",
url: "#csenergy",
default: true
},
},
},
dashboards: {
class: "fa fa-dashboard",
dashboards: {
home:{
name: "Home",
url: "#home/dashboards/home",
application:"home"
},
siteadmindashboard:{
name: "Site-Admin Dashboard",
url: "siteadmin/dashboard",
application:"nothome"
},
devicesdashboard1:{ //add more dashboards here
name: "Flowerwatch",
url: "dashboards/flowerwatch",
application:"nothome"
},
farmbot:{ //add more dashboards here
name: "Farmbot",
url: "dashboards/flowerwatch",
application:"nothome"
},
tracker:{ //add more dashboards here
name: "Tracker",
url: "dashboards/flowerwatch",
application:"nothome"
},
treasury:{ //add more dashboards here
name: "Tracker",
url: "dashboards/flowerwatch",
application:"nothome"
}
},
},
others:{
roles:{
name: "Roles",
class: "fa fa-drivers-license fa-fw",
url: 'admin/roles',
default:false
},
users:{
name: "Users",
class: "fa fa-user",
url: 'admin/roles',
default:false
},
alerts:{
name: "Alerts",
class: "fa fa-bell-o",
url: 'admin/roles',
default:false
},
profile:{
name: "profile",
class: "fa fa-user",
url: 'admin/roles',
default:true
}
/*,
moreroles:{
name: "More Roles",
class: "fa fa-dashboard",
url: 'admin/roles',
children: {
admindashboard:{
name: "Admin Dashboard..",
url: "admin/dashboard",
},
siteadmindashboard:{
name: "Site-Admin Dashboard..",
url: "siteadmin/dashboard",
}
}
}*/
}
// defaultapp: 'csymaconstruction',//'construction',

},
port: {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"bcrypt-nodejs": "^0.0.3",
"bluebird": "^3.4.7",
"body-parser": "^1.15.2",
"bower": "^1.8.2",
"chalk": "^1.1.3",
"cheerio": "^0.22.0",
"clockwork": "^0.1.4",
Expand Down
3 changes: 3 additions & 0 deletions setup/.env_sample
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@ LOB_KEY=test_814e892b199d65ef6dbb3e4ad24689559ca
PINTEREST_ID=4819282851912494691
PINTEREST_SECRET=b32f578ad83d94c058c6682329220feda7e5817e043a1cc4a5a1e28f51c70301
PINTEREST_REDIRECT_URL=https://localhost:3000/auth/pinterest/callback


ENV=development
16 changes: 11 additions & 5 deletions setup/first-time-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ const csyberUser = require('../apps/csystem/models/csyberuser');

mongoose.Promise = global.Promise;

var Schema = mongoose.Schema,
let email = "surgbcx@gmail.com";

let Schema = mongoose.Schema,
ObjectId = Schema.ObjectId;
Async.auto({
testMongo: (done) => {
Expand All @@ -41,7 +43,11 @@ Async.auto({
});
},
rootEmail: ['testMongo', (results, done) => {
done(null ,"surgbcx@gmail.com")
if(process.env.ENV === "development")
{
console.log("Setting up using: "+ email)
return done(null ,email)
}
Promptly.prompt('Root user email:', function(err,docs)
{
if (validator.isEmail(docs) === false) {
Expand All @@ -52,7 +58,7 @@ Async.auto({
});
}],
rootPassword: ['rootEmail', (results, done) => {
done(null ,"surgbcx@gmail.com")
return done(null ,email)
Promptly.password('Root user password(atleast 5 characters):', function(err,docs){
if(err)done(err);
else if(docs.length < 5){done("Password must be atleast 5 characters")}
Expand All @@ -61,7 +67,7 @@ Async.auto({

}],
confirmrootPassword: ['rootPassword', (results, done) => {
done(null ,"surgbcx@gmail.com")
return done(null ,email)
Promptly.password('confirm password:', function(err,docs){
if(err)done(err);
else if(results.rootPassword != docs){done("Passwords don't match")}
Expand Down Expand Up @@ -175,6 +181,6 @@ Async.auto({
return process.exit(1);
}

// console.log('Setup complete.');
console.log('Setup complete.');
process.exit(0);
});
3 changes: 3 additions & 0 deletions setup/first-time-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ main()
cp .env_sample ../.env
echo "..."
fi

cp ../config/config.example.js ../config/config.js

oldname="vipimo"
echo "Todo: still not looking recursively in files..."

Expand Down
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,10 @@ boom@3.x.x:
dependencies:
hoek "4.x.x"

bower@^1.8.2:
version "1.8.2"
resolved "https://registry.yarnpkg.com/bower/-/bower-1.8.2.tgz#adf53529c8d4af02ef24fb8d5341c1419d33e2f7"

brace-expansion@^1.0.0:
version "1.1.7"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59"
Expand Down

0 comments on commit 74093bc

Please sign in to comment.