Giter Club home page Giter Club logo

greyscale's People

Contributors

16nwallace avatar au2 avatar bolak avatar cporter-amida avatar daeverin avatar dtseytlin avatar eawest2 avatar elijahamida avatar elijahgeorge avatar hrickards avatar igiware avatar jmfadeley avatar jsachs avatar kachok avatar kevmo avatar manhydra avatar mhiner avatar perry5 avatar sbabushkin avatar sirctseb avatar slathrop avatar snyk-bot avatar uglyeugen avatar unprofessional avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

greyscale's Issues

jshint isssues

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.

Postgres DB .backup files cause syntax issues

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

I18N changes prevent karma testing

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.

app.js references non-functioning test code

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];
}

greyscale/backend/app.js

Lines 11 to 17 in c74b249

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];
}

front end deps need stricter versioning

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.

jshint errors in client

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

Disable Save button for index and subindex forms

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

README gives incomplete and outdated instructions

  • The README suggests Mongo, but the config (and the code) seem to support Postgres
  • Mongoose is used in tests, but is not npm installed.
  • Additionally, trying to run the tests immediately yields this error:
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)

$scope.org not being set when an admin accesses the profile view

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.

backend code should bootstrap tables

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.