1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-01 00:08:27 +01:00

Merge branch 'master' of github.com:finn-no/unleash

This commit is contained in:
Ivar 2016-06-16 14:03:31 +02:00
commit 85ac1f4a91
9 changed files with 19 additions and 11 deletions

2
.gitignore vendored
View File

@ -29,7 +29,7 @@ unleash-db.jar
unleash-server.tar.gz unleash-server.tar.gz
# idea stuff: # idea stuff:
*.iml .idea/*
.vagrant/ .vagrant/

4
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,4 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.autoSave": "onFocusChange"
}

View File

@ -42,7 +42,10 @@ function createDbPool() {
return knex({ return knex({
client: 'pg', client: 'pg',
connection: isTestEnv() ? getTestDatabaseUrl() : getDatabaseUrl(), connection: isTestEnv() ? getTestDatabaseUrl() : getDatabaseUrl(),
pool: { min: 2, max: 20 } pool: {
min: 2,
max: 20
}
}); });
} }

View File

@ -10,7 +10,7 @@ util.inherits(EventStore, EventEmitter);
EventStore.prototype.create = function (event) { EventStore.prototype.create = function (event) {
var that = this; var that = this;
return eventDb.store(event).then(function() { return eventDb.store(event).then(function() {
that.emit(event.type, event); return that.emit(event.type, event);
}); });
}; };

View File

@ -65,11 +65,11 @@ function rowToFeature(row) {
function eventDataToRow(data) { function eventDataToRow(data) {
return { return {
name: data.name, name: data.name,
description: data.description, description: data.description || '',
enabled: data.enabled ? 1 : 0, enabled: data.enabled ? 1 : 0,
archived: data.archived ? 1 :0, archived: data.archived ? 1 :0,
strategy_name: data.strategy, // eslint-disable-line strategy_name: data.strategy || 'default', // eslint-disable-line
parameters: data.parameters parameters: data.parameters || {}
}; };
} }

View File

@ -50,7 +50,7 @@ function eventDataToRow(data) {
return { return {
name: data.name, name: data.name,
description: data.description, description: data.description,
parameters_template: data.parametersTemplate // eslint-disable-line parameters_template: data.parametersTemplate || {} // eslint-disable-line
}; };
} }

View File

@ -49,7 +49,7 @@
"ini": "1.3.3", "ini": "1.3.3",
"jsx-loader": "0.12.2", "jsx-loader": "0.12.2",
"jsxhint": "0.13.2", "jsxhint": "0.13.2",
"knex": "^0.10.0", "knex": "^0.11.0",
"lodash": "^3.5.0", "lodash": "^3.5.0",
"log4js": "0.6.22", "log4js": "0.6.22",
"moment": "^2.11.2", "moment": "^2.11.2",

View File

@ -1,7 +1,7 @@
.toggle-active { .toggle-active {
border: 1px solid black; border: 1px solid black;
display: inline-block; display: inline-block;
background-color: #3B7908; background-color: lawngreen;
border-radius: 50%; border-radius: 50%;
width: 20px; width: 20px;
height: 20px; height: 20px;
@ -9,7 +9,7 @@
.toggle-inactive { .toggle-inactive {
border: 1px solid black; border: 1px solid black;
display: inline-block; display: inline-block;
background-color: #E7384A; background-color: red;
border-radius: 50%; border-radius: 50%;
width: 20px; width: 20px;
height: 20px; height: 20px;

View File

@ -15,7 +15,8 @@ function createStrategies() {
return Promise.map([ return Promise.map([
{ {
name: "default", name: "default",
description: "Default on or off Strategy." description: "Default on or off Strategy.",
parametersTemplate: {}
}, },
{ {
name: "usersWithEmail", name: "usersWithEmail",