amida-tech / greyscale Goto Github PK
View Code? Open in Web Editor NEWIndaba - Turn knowledge into data :earth_africa: :earth_asia: :earth_americas:
Home Page: http://indaba.amida-tech.com
License: Other
Indaba - Turn knowledge into data :earth_africa: :earth_asia: :earth_americas:
Home Page: http://indaba.amida-tech.com
License: Other
We need to avoid doing this as it changes the NODE_PATH globally on the system. This is super dangerous and can cause inexplainable consequences.
Let's refactor dependencies so that they are properly calling local modules with a relative reference in require()
.
You can see the code in question here https://github.com/amida-tech/greyscale/blob/current/backend/app.js at line 16.
I get the following when I run jshint on the ntrlab
branch. Are these the result of incomplete code?
app/controllers/surveys.js
line 258 col 31 'question' used out of scope.
line 259 col 21 'question' used out of scope.
line 264 col 66 'question' used out of scope.
line 268 col 27 'q' is already defined.
line 272 col 66 'question' used out of scope.
line 277 col 34 'q' used out of scope.
app/controllers/tasks.js
line 126 col 1 A generator function shall contain a yield statement.
Running psql indaba < indaba3012.backup
results in the following:
RROR: syntax error at or near "PGDMP"
LINE 1: PGDMP
REVOKE ALL ON SCHEMA public FROM postgres;
^
GRANT
GRANT
ERROR: syntax error at or near ""
LINE 1: 'New',
^
ERROR: syntax error at or near ""
LINE 1: 'New',
^
ERROR: syntax error at or near ""
LINE 1: 'New',
^
ERROR: syntax error at or near ""
LINE 1: 'New',
^
ERROR: syntax error at or near ""
LINE 1: LANGUAGE plpgsql
^
ERROR: syntax error at or near ""
LINE 1: LANGUAGE plpgsql
^
ERROR: syntax error at or near ""
LINE 1: LANGUAGE plpgsql
^
ERROR: syntax error at or near ""
LINE 1: LANGUAGE plpgsql
^
ERROR: syntax error at or near ""
LINE 1: LANGUAGE plpgsql
^
ERROR: syntax error at or near ""
LINE 1: LANGUAGE plpgsql
^
ERROR: syntax error at or near ""
LINE 1: LANGUAGE plpgsql
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: "matrixId" integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: START WITH 240
^
ERROR: syntax error at or near ""
LINE 1: id integer DEFAULT nextval('country_id_seq'::regclass)...
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer DEFAULT nextval('role_id_seq'::regclass) NO...
^
ERROR: syntax error at or near ""
LINE 1: "roleID" bigint NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: "userID" integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: "essenceId" integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer DEFAULT nextval('"UnitOfAnalysis_id_seq"'::...
^
ERROR: syntax error at or near ""
LINE 1: START WITH 9
^
ERROR: syntax error at or near ""
LINE 1: id smallint DEFAULT nextval('"UnitOfAnalysisClassType_...
^
ERROR: syntax error at or near ""
LINE 1: id smallint NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 9
^
ERROR: syntax error at or near ""
LINE 1: START WITH 9
^
ERROR: syntax error at or near ""
LINE 1: id smallint DEFAULT nextval('"UnitOfAnalysisType_id_se...
^
ERROR: syntax error at or near ""
LINE 1: "userID" bigint NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: "roleID" integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "AccessMatr...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "AccessPermissions_accessMatrixId_roleI...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "AccessPermissoins_pkey" PRIMARY KEY (i...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "Countries_pkey" PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "EntityRoles_pkey" PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "Entity_pkey" PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "EssenceRoles_essenceId_entityId_userId...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "Essences_fileName_key" UNIQUE ("fileNa...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "Essences_tableName_key" UNIQUE ("table...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "JSON_pkey" PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "Languages_code_key" UNIQUE (code);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "Languages_pkey" PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "Organizations_adminUserId_key" UNIQUE ...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "Organizations_pkey" PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "Product_pkey" PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "Projects_codeName_key" UNIQUE ("codeNa...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "Projects_pkey" PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "Rights_pkey" PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "SurveyAnswers_pkey" PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "SurveyAnswers_surveyId_userId_key" UNI...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "Translations_pkey" PRIMARY KEY ("essen...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "UnitOfAnalysisClassType_pkey" PRIMARY ...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "UnitOfAnalysisTag_pkey" PRIMARY KEY (i...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "UnitOfAnalysisType_pkey" PRIMARY KEY (...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "UnitOfAnalysis_pkey" PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "Users_email_key" UNIQUE (email);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT id PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "roleRight_pkey" PRIMARY KEY ("roleID",...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "userID" PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "userRights_pkey" PRIMARY KEY ("userID"...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "Organizations_adminUserId_...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "Products_originalLangId_fkey" FOREIGN ...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "Projects_accessMatrixId_fkey" FOREIGN ...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "Projects_adminUserId_fkey" FOREIGN KEY...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "Projects_organizationId_fkey" FOREIGN ...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "Rights_essence_id_fkey" FOREIGN KEY ("...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "RolesRights_roleID_fkey" FOREIGN KEY (...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "SurveyAnswers_surveyId_fkey" FOREIGN K...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "SurveyAnswers_userId_fkey" FOREIGN KEY...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "Translations_essence_id_fkey" FOREIGN ...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "Translations_lang_id_fkey" FOREIGN KEY...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "UnitOfAnalysisClassType_langId_fkey" F...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "UnitOfAnalysisTag_classTypeId_fkey" FO...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "UnitOfAnalysisTag_langId_fkey" FOREIGN...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "UnitOfAnalysisType_langId_fkey" FOREIG...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "UnitOfAnalysis_creatorId_fkey" FOREIGN...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "UnitOfAnalysis_langId_fkey" FOREIGN KE...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "UnitOfAnalysis_ownerId_fkey" FOREIGN K...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "UnitOfAnalysis_unitOfAnalysisType_fkey...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "Users_organizationId_fkey" FOREIGN KEY...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "Users_roleID_fkey" FOREIGN KEY ("roleI...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT essence_fkey FOREIGN KEY ("essenceId") ...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT role_fkey FOREIGN KEY ("roleId") REFERE...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT "rolesrights_rightID" FOREIGN KEY ("rig...
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT user_fkey FOREIGN KEY ("userId") REFERE...
^
invalid command \F���
invalid command \�
invalid command \��,�{l$`��VjG''M�33,ۼ$���v�
invalid command \�
oL�g��#e��"�%�p��l�l�"?
invalid command \�FO�Xx&�ej�J�/VYH��
ERROR: invalid byte sequence for encoding "UTF8": 0xb9
Any time I attempt to run Karma, I get the error thrown from greyscale-i18n.js
, which is Expected global I18N object!
. Because of how the I18N info is injected at the top of the file, this will not work with karma tests. Can you please either reconfigure the source file to allow client testing, or create the scaffolding for client tests in a way that does not throw errors?
Feel free to refer to my js-client-test-framework
branch for reference.
if (test) {
args = ['test/bootstrap.js'];
stdio = [process.stdin, process.stdout, process.stderr];
} else {
args = _.union(process.execArgv, ['app/bootstrap.js']);
stdio = [process.stdin, process.stdout, process.stderr];
}
Lines 11 to 17 in c74b249
When using bower install
locally, there is a version mismatch on the required version of font-awesome
. When you run grunt build
, this results in font-awesome
being removed from the build.
Several queries in the user controller reference the Order model. This model is specified in the tech specs, but does not exist.
Running "jshint:all" (jshint) task
app/scripts/directives/activation-form.js
line 14 col 42 'attr' is defined but never used.
line 14 col 36 'elem' is defined but never used.
line 24 col 41 'resp' is defined but never used.
app/scripts/directives/form-builder.js
line 32 col 5 Unreachable 'a' after 'return'.
line 37 col 6 Missing semicolon.
line 20 col 35 'Formbuilder' is not defined.
line 32 col 5 'a' is not defined.
line 28 col 50 'value' is defined but never used.
app/scripts/directives/modal-form-field.js
line 95 col 27 Missing semicolon.
⚠ 9 warnings
At forms for adding and editing indexes and subindexes (for projects) does not disabled "Save" button if user have not filled all required fields.
Therefore, when save, API return errors like:
{ '!': 0, e: 403, message: 'title, divisor, weights fields are required' }
branch: launch_demo
module.js:338
throw err;
^
Error: Cannot find module 'app/models/user'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/Users/Jacob/Documents/dev/greyscale/backend/test/factories/user.js:1:74)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
At line 20 of the profile.js
controller, there is the following check:
if (user.roleID === greyscaleGlobals.userRoles.admin.id)
However, in greyscale-globals.js
, it looks like the storage of user role IDs was changed and not updated in the controllers. Am I correct in thinking this is a bug?
As an aside, will NTR be writing any client unit tests? I discovered this issue by writing some sample tests.
Given that this application will be deployed remotely and as part of an automated build pipeline, it would make sense to have the application check for a table structure and bootstrap the models if necessary.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.