author
int64 658
755k
| date
stringlengths 19
19
| timezone
int64 -46,800
43.2k
| hash
stringlengths 40
40
| message
stringlengths 5
490
| mods
list | language
stringclasses 20
values | license
stringclasses 3
values | repo
stringlengths 5
68
| original_message
stringlengths 12
491
|
---|---|---|---|---|---|---|---|---|---|
288,376 | 17.03.2017 14:09:50 | 14,400 | 0a3b1f679c39354e2e9be94b1d9980dffb4c74f5 | Step 1 in entity setup
Remove the defaultRoute for SysAdmin | [
{
"change_type": "MODIFY",
"old_path": "app/mixins/user-roles.js",
"new_path": "app/mixins/user-roles.js",
"diff": "@@ -15,7 +15,7 @@ export const PREDEFINED_USER_ROLES = [\n{ name: 'Patient Administration', roles: ['Patient Administration', 'user'], defaultRoute: 'patients' },\n{ name: 'Pharmacist', roles: ['Pharmacist', 'user'], defaultRoute: 'medication.index' },\n{ name: 'Social Worker', roles: ['Social Worker', 'user'], defaultRoute: 'patients' },\n- { name: 'System Administrator', roles: ['System Administrator', 'admin', 'user'], defaultRoute: 'patients' },\n+ { name: 'System Administrator', roles: ['System Administrator', 'admin', 'user'] },\n{ name: 'User Administrator', roles: ['User Administrator', 'admin', 'user'], defaultRoute: 'users' }\n];\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Step 1 in entity setup
Remove the defaultRoute for SysAdmin |
288,284 | 17.03.2017 14:46:58 | 14,400 | 9cdf477b8f40be42c11cabae1d136f8c943e7096 | Update user adapter for use with pouchdb-users | [
{
"change_type": "MODIFY",
"old_path": "app/adapters/application.js",
"new_path": "app/adapters/application.js",
"diff": "+import CheckForErrors from 'hospitalrun/mixins/check-for-errors';\nimport Ember from 'ember';\n-import { Adapter } from 'ember-pouch';\nimport uuid from 'npm:uuid';\n+import { Adapter } from 'ember-pouch';\nconst {\nget,\n@@ -9,7 +10,7 @@ const {\n}\n} = Ember;\n-export default Adapter.extend({\n+export default Adapter.extend(CheckForErrors, {\ndatabase: Ember.inject.service(),\ndb: Ember.computed.reads('database.mainDB'),\n@@ -261,15 +262,6 @@ export default Adapter.extend({\ndeleteRecord(store, type, record) {\nreturn this._checkForErrors(this._super(store, type, record));\n- },\n-\n- _checkForErrors(callPromise) {\n- return new Ember.RSVP.Promise((resolve, reject) => {\n- callPromise.then(resolve, (err) => {\n- let database = get(this, 'database');\n- reject(database.handleErrorResponse(err));\n- });\n- });\n}\n});\n"
},
{
"change_type": "MODIFY",
"old_path": "app/adapters/user.js",
"new_path": "app/adapters/user.js",
"diff": "import Ember from 'ember';\n+import CheckForErrors from 'hospitalrun/mixins/check-for-errors';\nimport DS from 'ember-data';\nimport UserSession from 'hospitalrun/mixins/user-session';\n-const { get } = Ember;\n+const ENDPOINT = '/db/_users/';\n-export default DS.RESTAdapter.extend(UserSession, {\n- config: Ember.inject.service(),\n- database: Ember.inject.service(),\n- session: Ember.inject.service(),\n- endpoint: '/db/_users/',\n+const {\n+ RESTAdapter\n+} = DS;\n+\n+const {\n+ computed,\n+ computed: {\n+ alias\n+ },\n+ get,\n+ inject\n+} = Ember;\n+\n+export default RESTAdapter.extend(CheckForErrors, UserSession, {\ndefaultSerializer: 'couchdb',\n- oauthHeaders: Ember.computed.alias('database.oauthHeaders'),\n+\n+ config: inject.service(),\n+ database: inject.service(),\n+ session: inject.service(),\n+\n+ oauthHeaders: alias('database.oauthHeaders'),\n+ standAlone: alias('config.standAlone'),\n+ usersDB: alias('database.usersDB'),\n+\n+ headers: computed('oauthHeaders', function() {\n+ let oauthHeaders = get(this, 'oauthHeaders');\n+ if (Ember.isEmpty(oauthHeaders)) {\n+ return {};\n+ } else {\n+ return oauthHeaders;\n+ }\n+ }),\najaxError(jqXHR) {\nlet error = this._super(jqXHR);\n@@ -40,30 +66,28 @@ export default DS.RESTAdapter.extend(UserSession, {\n/**\nCalled by the store when a newly created record is\nsaved via the `save` method on a model record instance.\n-\nThe `createRecord` method serializes the record and makes an Ajax (HTTP POST) request\nto a URL computed by `buildURL`.\n-\nSee `serialize` for information on how to customize the serialized form\nof a record.\n-\n@method createRecord\n@param {DS.Store} store\n- @param {subclass of DS.Model} type\n- @param {DS.Model} record\n- @returns {Promise} promise\n+ @param {DS.Model} type\n+ @param {DS.Snapshot} snapshot\n+ @return {Promise} promise\n*/\n- createRecord(store, type, record) {\n- return this.updateRecord(store, type, record);\n+ createRecord(store, type, snapshot) {\n+ return this.updateRecord(store, type, snapshot);\n},\n/**\nCalled by the store when a record is deleted.\n+ The `deleteRecord` method makes an Ajax (HTTP DELETE) request to a URL computed by `buildURL`.\n@method deleteRecord\n@param {DS.Store} store\n- @param {subclass of DS.Model} type\n- @param {DS.Snapshot} record\n- @returns {Promise} promise\n+ @param {DS.Model} type\n+ @param {DS.Snapshot} snapshot\n+ @return {Promise} promise\n*/\ndeleteRecord(store, type, snapshot) {\nreturn this.updateRecord(store, type, snapshot, true);\n@@ -72,58 +96,55 @@ export default DS.RESTAdapter.extend(UserSession, {\n/**\nCalled by the store in order to fetch the JSON for a given\ntype and ID.\n-\n- The `find` method makes an Ajax request to a URL computed by `buildURL`, and returns a\n- promise for the resulting payload.\n-\n+ The `findRecord` method makes an Ajax request to a URL computed by\n+ `buildURL`, and returns a promise for the resulting payload.\nThis method performs an HTTP `GET` request with the id provided as part of the query string.\n-\n- @method find\n+ @since 1.13.0\n+ @method findRecord\n@param {DS.Store} store\n- @param {subclass of DS.Model} type\n+ @param {DS.Model} type\n@param {String} id\n- @returns {Promise} promise\n+ @param {DS.Snapshot} snapshot\n+ @return {Promise} promise\n*/\n- find(store, type, id) {\n- if (this.get('config.standAlone') === true) {\n- let userKey = 'org.couchdb.user:' + id;\n- return this._offlineFind(userKey);\n+ findRecord(store, type, id, snapshot) {\n+ if (get(this, 'standAlone') === true) {\n+ return this._offlineFind(id);\n} else {\n- let findUrl = this.endpoint + id;\n- return new Ember.RSVP.Promise((resolve, reject) => {\n- this.ajax(findUrl, 'GET').then(resolve, (error) => {\n- let database = get(this, 'database');\n- reject(database.handleErrorResponse(error));\n- });\n- });\n+ return this._checkForErrors(this._super(store, type, id, snapshot));\n}\n},\n/**\n- Called by find in we're in standAlone mode.\n-\n- @method private\n- @param {String} id - document id we are retrieving\n- @returns {Promise} promise\n+ Called by the store in order to fetch a JSON array for all\n+ of the records for a given type.\n+ The `findAll` method makes an Ajax (HTTP GET) request to a URL computed by `buildURL`, and returns a\n+ promise for the resulting payload.\n+ @method findAll\n+ @param {DS.Store} store\n+ @param {DS.Model} type\n+ @param {String} sinceToken\n+ @param {DS.SnapshotRecordArray} snapshotRecordArray\n+ @return {Promise} promise\n*/\n- _offlineFind(id) {\n- let usersDB = get(this, 'database.usersDB');\n- return new Ember.RSVP.Promise((resolve, reject) => {\n- usersDB.get(id).then(resolve).catch((err) => {\n- let database = get(this, 'database');\n- reject(database.handleErrorResponse(err));\n- });\n- });\n- },\n-\n- headers: function() {\n- let oauthHeaders = this.get('oauthHeaders');\n- if (Ember.isEmpty(oauthHeaders)) {\n- return {};\n+ findAll(store, type, sinceToken, snapshotRecordArray) {\n+ let ajaxData = {\n+ data: {\n+ include_docs: true,\n+ startkey: '\"org.couchdb.user\"'\n+ }\n+ };\n+ if (get(this, 'standAlone') === true) {\n+ return this._offlineFindAll(ajaxData);\n} else {\n- return oauthHeaders;\n+ let url = this.buildURL(type.modelName, null, snapshotRecordArray, 'findAll');\n+ return this._checkForErrors(this.ajax(url, 'GET', ajaxData));\n}\n- }.property('oauthHeaders'),\n+ },\n+\n+ shouldReloadAll() {\n+ return true;\n+ },\n/**\nCalled by the store when an existing record is saved\n@@ -156,82 +177,55 @@ export default DS.RESTAdapter.extend(UserSession, {\ndelete data._rev;\n}\ndata = this._cleanPasswordAttrs(data);\n- if (this.get('config.standAlone') === true) {\n+ if (get(this, 'standAlone') === true) {\nreturn this._offlineUpdateRecord(data);\n} else {\n- let putURL = `${this.endpoint}${Ember.get(record, 'id')}`;\n- return new Ember.RSVP.Promise((resolve, reject) => {\n- this.ajax(putURL, 'PUT', {\n+ let putURL = this._buildURL('user', get(record, 'id'));\n+ return this._checkForErrors(this.ajax(putURL, 'PUT', {\ndata\n- }).then(resolve, (error) => {\n- let database = get(this, 'database');\n- reject(database.handleErrorResponse(error));\n- });\n- });\n+ }));\n}\n},\n-\n/**\n- Called by updateRecord in we're in standAlone mode.\n-\n- @method private\n- @param {POJO} data - the data we're going to store in Pouch\n- @returns {Promise} promise\n- */\n- _offlineUpdateRecord(data) {\n- let usersDB = get(this, 'database.usersDB');\n- return new Ember.RSVP.Promise((resolve, reject) => {\n- usersDB.put(data).then(resolve).catch((err) => {\n- let database = get(this, 'database');\n- reject(database.handleErrorResponse(err));\n- });\n+ Builds a URL for a `store.findAll(type)` call.\n+ Example:\n+ ```app/adapters/comment.js\n+ import DS from 'ember-data';\n+ export default DS.JSONAPIAdapter.extend({\n+ urlForFindAll(id, modelName, snapshot) {\n+ return 'data/comments.json';\n+ }\n});\n+ ```\n+ @method urlForFindAll\n+ @param {String} modelName\n+ @param {DS.SnapshotRecordArray} snapshot\n+ @return {String} url\n+ */\n+ urlForFindAll(/* modelName, snapshot */) {\n+ return `${ENDPOINT}_all_docs`;\n},\n/**\n- Called by the store in order to fetch a JSON array for all\n- of the records for a given type.\n-\n- The `findAll` method makes an Ajax (HTTP GET) request to a URL computed by `buildURL`, and returns a\n- promise for the resulting payload.\n-\n+ @method urlPrefix\n@private\n- @method findAll\n- @param {DS.Store} store //currently unused\n- @param {subclass of DS.Model} type //currently unused\n- @param {String} sinceToken //currently unused\n- @returns {Promise} promise\n+ @param {String} path\n+ @param {String} parentURL\n+ @return {String} urlPrefix\n*/\n- findAll() {\n- let ajaxData = {\n- data: {\n- include_docs: true,\n- startkey: '\"org.couchdb.user\"'\n- }\n- };\n- if (this.get('config.standAlone') === true) {\n- return this._offlineFindAll(ajaxData);\n- } else {\n- let allURL = `${this.endpoint}_all_docs`;\n- return new Ember.RSVP.Promise((resolve, reject) => {\n- this.ajax(allURL, 'GET', ajaxData).then(resolve, (error) => {\n- let database = get(this, 'database');\n- reject(database.handleErrorResponse(error));\n- });\n- });\n- }\n+ urlPrefix(/* path, parentURL */) {\n+ return ENDPOINT;\n},\n/**\n- Called by updateRecord in we're in standAlone mode.\n-\n- @method private\n- @param {POJO} data - the data we're going to search for in Pouch\n- @returns {Promise} promise\n+ @method _buildURL\n+ @private\n+ @param {String} modelName\n+ @param {String} id\n+ @return {String} url\n*/\n- _offlineFindAll(data) {\n- let usersDB = get(this, 'database.usersDB');\n- return usersDB.allDocs(data);\n+ _buildURL(modelName, id) {\n+ return `${ENDPOINT}${id}`;\n},\n/**\n@@ -254,8 +248,44 @@ export default DS.RESTAdapter.extend(UserSession, {\nreturn data;\n},\n- shouldReloadAll() {\n- return true;\n+ /**\n+ Called by find in we're in standAlone mode.\n+ @method private\n+ @param {String} id - document id we are retrieving\n+ @returns {Promise} promise\n+ */\n+ _offlineFind(id) {\n+ let usersDB = get(this, 'database.usersDB');\n+ return new Ember.RSVP.Promise((resolve, reject) => {\n+ usersDB.get(id).then(resolve).catch((err) => {\n+ let database = get(this, 'database');\n+ reject(database.handleErrorResponse(err));\n+ });\n+ });\n+ },\n+\n+ /**\n+ Called by updateRecord in we're in standAlone mode.\n+\n+ @method private\n+ @param {POJO} data - the data we're going to search for in Pouch\n+ @returns {Promise} promise\n+ */\n+ _offlineFindAll(data) {\n+ let usersDB = get(this, 'database.usersDB');\n+ return usersDB.allDocs(data);\n+ },\n+\n+ /**\n+ Called by updateRecord in we're in standAlone mode.\n+\n+ @method private\n+ @param {POJO} data - the data we're going to store in Pouch\n+ @returns {Promise} promise\n+ */\n+ _offlineUpdateRecord(data) {\n+ let usersDB = get(this, 'usersDB');\n+ return usersDB.put(data);\n}\n});\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "app/mixins/check-for-errors.js",
"diff": "+import Ember from 'ember';\n+\n+const {\n+ get,\n+ Mixin,\n+ RSVP\n+} = Ember;\n+\n+export default Mixin.create({\n+ _checkForErrors(callPromise) {\n+ return new RSVP.Promise((resolve, reject) => {\n+ callPromise.then(resolve, (err) => {\n+ let database = get(this, 'database');\n+ reject(database.handleErrorResponse(err));\n+ });\n+ });\n+ }\n+});\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Update user adapter for use with pouchdb-users |
288,376 | 19.03.2017 15:08:17 | 14,400 | 9937f90da95ae904bebe9e8db1d1cb158d39c85f | increment work on initial user creation for empty set | [
{
"change_type": "MODIFY",
"old_path": "app/controllers/index.js",
"new_path": "app/controllers/index.js",
"diff": "import Ember from 'ember';\nimport UserSession from 'hospitalrun/mixins/user-session';\nexport default Ember.Controller.extend(UserSession, {\n- indexLinks: [\n- 'Appointments',\n- 'Labs',\n- 'Imaging',\n- 'Inventory',\n- 'Medication',\n- 'Patients',\n- 'Users'\n- ],\n-\n- setupPermissions: Ember.on('init', function() {\n- let permissions = this.get('defaultCapabilities');\n- for (let capability in permissions) {\n- if (this.currentUserCan(capability)) {\n- this.set(`userCan_${capability}`, true);\n+ actions: {\n+ newUser() {\n+ this.send('createNewUser');\n}\n}\n- }),\n-\n- activeLinks: Ember.computed('indexLinks', function() {\n- let activeLinks = [];\n- let indexLinks = this.get('indexLinks');\n- indexLinks.forEach(function(link) {\n- let action = link.toLowerCase();\n- if (this.currentUserCan(action)) {\n- activeLinks.push({\n- action,\n- text: link\n- });\n- }\n- }.bind(this));\n- return activeLinks;\n- })\n-\n});\n"
},
{
"change_type": "MODIFY",
"old_path": "app/locales/en/translations.js",
"new_path": "app/locales/en/translations.js",
"diff": "export default {\ndashboard: {\n- title: 'What would you like to do?'\n+ title: 'Welcome to HospitalRun!',\n+ setup: 'You need to setup a User.'\n},\nerrors: {\ninclusion: 'is not included in the list',\n"
},
{
"change_type": "MODIFY",
"old_path": "app/routes/index.js",
"new_path": "app/routes/index.js",
"diff": "@@ -5,6 +5,7 @@ import Ember from 'ember';\nconst { inject, isEmpty } = Ember;\nexport default Ember.Route.extend(AuthenticatedRouteMixin, Navigation, UserRoles, {\n+ config: inject.service(),\nsession: inject.service(),\nbeforeModel() {\nlet session = this.get('session');\n@@ -24,7 +25,17 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, Navigation, UserRoles\nreturn this._super(...arguments);\n},\n+ model() {\n+ return this.get('config');\n+ },\n+\nafterModel() {\nthis.controllerFor('navigation').set('allowSearch', false);\n+ },\n+\n+ actions: {\n+ createNewUser() {\n+ return this.transitionTo('users.edit', 'new');\n+ }\n}\n});\n"
},
{
"change_type": "MODIFY",
"old_path": "app/services/config.js",
"new_path": "app/services/config.js",
"diff": "@@ -8,6 +8,15 @@ export default Ember.Service.extend({\nsession: inject.service(),\nsessionData: Ember.computed.alias('session.data'),\nstandAlone: false,\n+ userSetupFlag: true,\n+\n+ needsSetup() {\n+ return this.get('userSetupFlag');\n+ },\n+\n+ markSetupComplete() {\n+ this.set('userSetupFlag', false);\n+ },\nsetup() {\nlet replicateConfigDB = this.replicateConfigDB.bind(this);\n"
},
{
"change_type": "MODIFY",
"old_path": "app/templates/index.hbs",
"new_path": "app/templates/index.hbs",
"diff": "<div class=\"view-top-bar\">\n<h1 class=\"view-current-title\">{{t \"dashboard.title\" }}</h1>\n</div>\n-\n+ {{#if model.userSetupFlag}}\n+ <div class=\"panel-body\">\n+ <p>{{t \"dashboard.setup\"}}</p>\n+ <button type=\"button\" class=\"btn btn-primary align-left\" {{action \"newUser\" }}>\n+ <span class=\"octicon octicon-plus\"></span> {{t 'buttons.newUser'}}\n+ </button>\n+ </div>\n+ {{/if}}\n</section>\n"
},
{
"change_type": "MODIFY",
"old_path": "app/users/edit/controller.js",
"new_path": "app/users/edit/controller.js",
"diff": "@@ -8,6 +8,7 @@ const {\n} = Ember;\nexport default AbstractEditController.extend(UserRoles, {\n+ config: Ember.inject.service(),\nusersController: Ember.inject.controller('users/index'),\nupdateCapability: 'add_user',\n@@ -43,6 +44,7 @@ export default AbstractEditController.extend(UserRoles, {\nupdateModel.set('userPrefix', prefix);\n}\nupdateModel.save().then(() => {\n+ this.get('config').markSetupComplete();\nthis.displayAlert(get(this, 'i18n').t('messages.userSaved'), get(this, 'i18n').t('messages.userHasBeenSaved'));\nlet editTitle = get(this, 'i18n').t('labels.editUser');\nlet sectionDetails = {};\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | increment work on initial user creation for empty set |
288,392 | 20.03.2017 07:59:10 | 25,200 | 88808cf0c56829dbcc4b976fe521e9e2e7bd1ca7 | add admitted patient test | [
{
"change_type": "MODIFY",
"old_path": "tests/acceptance/patients-test.js",
"new_path": "tests/acceptance/patients-test.js",
"diff": "@@ -76,6 +76,35 @@ test('View reports tab | Patient Status', function(assert) {\n});\n});\n+test('Testing admitted patient', function(assert) {\n+ runWithPouchDump('patient', function() {\n+ authenticateUser();\n+ visit('/patients/admitted');\n+ andThen(function() {\n+ assert.equal(currentURL(), '/patients/admitted');\n+ assert.equal(find('.clickable').length, 1, 'One patient is listed');\n+ });\n+\n+ click('button:contains(Discharge)');\n+ waitToAppear('.view-current-title:contains(Edit Visit)');\n+ andThen(function() {\n+ assert.equal(currentURL(), '/visits/edit/03C7BF8B-04E0-DD9E-9469-96A5604F5340', 'should return visits/edit instead');\n+ });\n+ click('.panel-footer button:contains(Discharge)');\n+ waitToAppear('.modal-dialog');\n+ andThen(() => {\n+ assert.equal(find('.modal-title').text(), 'Patient Discharged', 'Patient has been discharged');\n+ });\n+\n+ click('button:contains(Ok)');\n+ visit('/patients/admitted');\n+ waitToAppear('.view-current-title:contains(Admitted Patients)');\n+ andThen(() => {\n+ assert.equal(find('.clickable').length, 0, 'No patient is listed');\n+ });\n+ });\n+});\n+\ntest('Adding a new patient record', function(assert) {\nrunWithPouchDump('default', function() {\nauthenticateUser();\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | add admitted patient test (#993) |
288,392 | 21.03.2017 05:33:47 | 25,200 | 324154437ae2ed3ad412b52f3d869343ebcb5f5f | add medication completed test | [
{
"change_type": "MODIFY",
"old_path": "tests/acceptance/medication-test.js",
"new_path": "tests/acceptance/medication-test.js",
"diff": "@@ -92,6 +92,35 @@ test('fulfilling a medication request', function(assert) {\n});\n});\n+test('complete a medication request', function(assert) {\n+ runWithPouchDump('medication', function() {\n+ authenticateUser();\n+ visit('/medication/completed');\n+ assert.equal(find('.clickable').length, 0, 'Should have 0 completed request');\n+ visit('/medication');\n+ click('button:contains(Fulfill)');\n+\n+ andThen(function() {\n+ assert.equal(find('.patient-summary').length, 1, 'Patient summary is displayed');\n+ });\n+ waitToAppear('.inventory-location option:contains(No Location)');\n+ andThen(() => {\n+ click('button:contains(Fulfill)');\n+ waitToAppear('.modal-dialog');\n+ });\n+ andThen(() => {\n+ assert.equal(find('.modal-title').text().trim(), 'Medication Request Fulfilled', 'Medication Request has been Fulfilled');\n+ });\n+\n+ click('button:contains(Ok)');\n+ visit('/medication/completed');\n+ andThen(() => {\n+ assert.equal(currentURL(), '/medication/completed');\n+ assert.equal(find('.clickable').length, 1, 'Should have 1 completed request');\n+ });\n+ });\n+});\n+\ntest('returning medication', function(assert) {\nrunWithPouchDump('medication', function() {\nauthenticateUser();\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | add medication completed test (#1008) |
288,376 | 21.03.2017 13:14:28 | 25,200 | 26718e26e2038671d31e246653f43799890ec493 | configure the electron build better | [
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "\"stylelint-scss\": \"1.4.1\",\n\"uuid\": \"^3.0.0\"\n},\n+ \"dependencies\": {\n+ \"ember-electron\": \"1.12.7\"\n+ },\n\"ember-addon\": {\n\"paths\": [\n\"lib/pouch-fixtures\"\n\"electron.js\",\n\"package.json\"\n],\n- \"name\": null,\n+ \"name\": \"HospitalRun\",\n\"platform\": null,\n\"arch\": null,\n\"version\": null,\n\"extend-info\": null,\n\"extra-resource\": null,\n\"helper-bundle-id\": null,\n- \"icon\": null,\n+ \"icon\": \"public/assets/icon.icns\",\n\"ignore\": null,\n\"out\": null,\n\"osx-sign\": {\n\"prune\": null,\n\"strict-ssl\": null,\n\"win32metadata\": {\n- \"CompanyName\": null,\n+ \"CompanyName\": \"HospitalRun\",\n\"FileDescription\": null,\n\"OriginalFilename\": null,\n- \"ProductName\": null,\n+ \"ProductName\": \"HospitalRun\",\n\"InternalName\": null\n}\n}\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | configure the electron build better |
288,392 | 22.03.2017 06:40:04 | 25,200 | 35e77cdedc59e6d0603e27b201957ceddf167382 | add appointment today test | [
{
"change_type": "MODIFY",
"old_path": "tests/acceptance/appointments-test.js",
"new_path": "tests/acceptance/appointments-test.js",
"diff": "@@ -49,6 +49,28 @@ test('visiting /appointments/missed', function(assert) {\n});\n});\n+test('test appointment for today', function(assert) {\n+ runWithPouchDump('appointments', function() {\n+ authenticateUser();\n+ visit('/appointments/today');\n+ assert.equal(find('.appointment-date').length, 0, 'should have 0 appointment today');\n+ visit('/appointments/edit/new');\n+ andThen(function() {\n+ assert.equal(currentURL(), '/appointments/edit/new');\n+ findWithAssert('button:contains(Cancel)');\n+ findWithAssert('button:contains(Add)');\n+ });\n+\n+ createAppointment(assert);\n+\n+ visit('/appointments/today');\n+ andThen(() => {\n+ assert.equal(currentURL(), '/appointments/today');\n+ assert.equal(find('.appointment-status').text(), 'Scheduled', 'should have 1 appointment today');\n+ });\n+ });\n+});\n+\ntest('Creating a new appointment', function(assert) {\nrunWithPouchDump('appointments', function() {\nauthenticateUser();\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | add appointment today test (#1012) |
288,235 | 23.03.2017 19:28:34 | -19,080 | 7af8df17f221f061143383a067d2cc9b320181c0 | Add docker-compose.yml
Fixes | [
{
"change_type": "ADD",
"old_path": null,
"new_path": ".dockerignore",
"diff": "+dist\n+tmp\n+node_modules\n+bower_components\n+.git\n+\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "docker-compose.yml",
"diff": "+version: '2'\n+services:\n+ web:\n+ build: .\n+ ports:\n+ - \"4200:4200\"\n+ couchdb:\n+ image: \"couchdb:1.6\"\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Add docker-compose.yml (#1015)
Fixes #980 |
288,284 | 23.03.2017 16:46:31 | 14,400 | 3acc5a676092ecba83812af80c76a2db28b26663 | Upgrading to hospitalrun-server-routes 0.9.11
Fixes
Fixes
Work in process for | [
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "\"express\": \"^4.8.5\",\n\"glob\": \"^7.1.0\",\n\"hospitalrun-dblisteners\": \"0.9.6\",\n- \"hospitalrun-server-routes\": \"0.9.10\",\n+ \"hospitalrun-server-routes\": \"0.9.11\",\n\"loader.js\": \"^4.0.11\",\n\"nano\": \"6.2.0\",\n\"pouchdb\": \"5.4.5\",\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Upgrading to hospitalrun-server-routes 0.9.11
Fixes #153
Fixes #1011
Work in process for #631 |
288,284 | 24.03.2017 16:58:11 | 14,400 | 65a749da488fe94dba4aec63be7bb594507dc288 | Got search working
Using pouchdb-find to perform search. | [
{
"change_type": "MODIFY",
"old_path": "app/adapters/application.js",
"new_path": "app/adapters/application.js",
"diff": "@@ -4,6 +4,9 @@ import uuid from 'npm:uuid';\nimport { Adapter } from 'ember-pouch';\nconst {\n+ computed: {\n+ reads\n+ },\nget,\nrun: {\nbind\n@@ -11,8 +14,10 @@ const {\n} = Ember;\nexport default Adapter.extend(CheckForErrors, {\n+ config: Ember.inject.service(),\ndatabase: Ember.inject.service(),\n- db: Ember.computed.reads('database.mainDB'),\n+ db: reads('database.mainDB'),\n+ standAlone: reads('config.standAlone'),\n_specialQueries: [\n'containsValue',\n@@ -22,6 +27,10 @@ export default Adapter.extend(CheckForErrors, {\n_esDefaultSize: 25,\n_executeContainsSearch(store, type, query) {\n+ let standAlone = get(this, 'standAlone');\n+ if (standAlone) {\n+ return this._executePouchDBFind(store, type, query);\n+ }\nreturn new Ember.RSVP.Promise((resolve, reject) => {\nlet typeName = this.getRecordTypeName(type);\nlet searchUrl = `/search/hrdb/${typeName}/_search`;\n@@ -80,6 +89,29 @@ export default Adapter.extend(CheckForErrors, {\n});\n},\n+ _executePouchDBFind(store, type, query) {\n+ this._init(store, type);\n+ let db = this.get('db');\n+ let recordTypeName = this.getRecordTypeName(type);\n+ let queryParams = {\n+ selector: {\n+ $or: []\n+ }\n+ };\n+ if (query.containsValue && query.containsValue.value) {\n+ let regexp = new RegExp(query.containsValue.value, 'i');\n+ query.containsValue.keys.forEach((key) => {\n+ let subQuery = {};\n+ subQuery[`data.${key.name}`] = { $regex: regexp };\n+ queryParams.selector.$or.push(subQuery);\n+ });\n+ }\n+\n+ return db.find(queryParams).then((pouchRes) => {\n+ return db.rel.parseRelDocs(recordTypeName, pouchRes.docs);\n+ });\n+ },\n+\n_handleQueryResponse(response, store, type) {\nlet database = this.get('database');\nreturn new Ember.RSVP.Promise((resolve, reject) => {\n"
},
{
"change_type": "MODIFY",
"old_path": "app/services/database.js",
"new_path": "app/services/database.js",
"diff": "+/* global buildPouchFindIndexes */\nimport Ember from 'ember';\nimport createPouchViews from 'hospitalrun/utils/pouch-views';\nimport List from 'npm:pouchdb-list';\n@@ -30,7 +31,10 @@ export default Service.extend({\ncreateDB(configs, pouchOptions) {\nlet standAlone = get(this, 'standAlone');\nif (standAlone) {\n- return this._createLocalDB('localMainDB', pouchOptions);\n+ return this._createLocalDB('localMainDB', pouchOptions).then((localDb) => {\n+ buildPouchFindIndexes(localDb);\n+ return localDb;\n+ });\n}\nreturn new RSVP.Promise((resolve, reject) => {\nlet url = `${document.location.protocol}//${document.location.host}/db/main`;\n"
},
{
"change_type": "MODIFY",
"old_path": "ember-cli-build.js",
"new_path": "ember-cli-build.js",
"diff": "@@ -31,6 +31,7 @@ module.exports = function(defaults) {\napp.import('vendor/octicons/octicons/octicons.css');\napp.import('bower_components/pouchdb-load/dist/pouchdb.load.js');\napp.import('bower_components/webrtc-adapter/release/adapter.js');\n+ app.import('vendor/pouch-find-indexes.js');\nif (EmberApp.env() !== 'production') {\napp.import('bower_components/timekeeper/lib/timekeeper.js', { type: 'test' });\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "vendor/pouch-find-indexes.js",
"diff": "+\n+function buildPouchFindIndexes(db) {\n+ var indexesToBuild = [{\n+ name: 'inventory',\n+ fields: [\n+ 'data.crossReference',\n+ 'data.description',\n+ 'data.friendlyId',\n+ 'data.name'\n+ ]\n+ }, {\n+ name: 'invoices',\n+ fields: [\n+ 'data.externalInvoiceNumber',\n+ 'data.patientInfo'\n+ ]\n+ }, {\n+ name: 'patient',\n+ fields: [\n+ 'data.externalPatientId',\n+ 'data.firstName',\n+ 'data.friendlyId',\n+ 'data.lastName',\n+ 'data.phone'\n+ ]\n+ }, {\n+ name: 'medication',\n+ fields: [\n+ 'data.prescription'\n+ ]\n+ }, {\n+ name: 'pricing',\n+ fields: [\n+ 'data.name'\n+ ]\n+ }];\n+ indexesToBuild.forEach(function(index) {\n+ db.createIndex({\n+ index: {\n+ fields: index.fields,\n+ name: index.name\n+ }\n+ });\n+ });\n+}\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Got search working
Using pouchdb-find to perform search. |
288,325 | 27.03.2017 15:45:51 | -3,600 | db469da9a5eed20f74e7f139ab0b785a2af55abb | fix: fixed edit operative plan title bug | [
{
"change_type": "MODIFY",
"old_path": "app/patients/operative-plan/controller.js",
"new_path": "app/patients/operative-plan/controller.js",
"diff": "@@ -66,7 +66,12 @@ export default AbstractEditController.extend(OperativePlanStatuses, PatientSubmo\nlet newPlan = get(this, 'newPlan');\nif (newPlan) {\nlet patient = get(this, 'model.patient');\n- patient.save().then(this._finishAfterUpdate.bind(this));\n+ patient.save().then(this._finishAfterUpdate.bind(this)).then(()=> {\n+ let editTitle = get(this, 'i18n').t('operativePlan.titles.editTitle');\n+ let sectionDetails = {};\n+ sectionDetails.currentScreenTitle = editTitle;\n+ this.send('setSectionHeader', sectionDetails);\n+ });\n} else {\nthis._finishAfterUpdate();\n}\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | fix: fixed edit operative plan title bug |
288,325 | 27.03.2017 15:58:42 | -3,600 | 51a6c3ecca1b80edecd5d5b887abc60885cf6c35 | fix: fixed edit operative plan title test | [
{
"change_type": "MODIFY",
"old_path": "tests/acceptance/operative-test.js",
"new_path": "tests/acceptance/operative-test.js",
"diff": "@@ -77,6 +77,7 @@ test('Plan and report creation', function(assert) {\nclick('.modal-footer button:contains(Ok)');\n});\nandThen(() => {\n+ assert.equal(find('.view-current-title').text(), 'Edit Operative Plan', 'Edit operative plan title is correct');\nassert.equal(find(`.procedure-listing td.procedure-description:contains(${PROCEDURE_FIX_ARM})`).length, 1, 'Procedure from typeahead gets added to procedure list on save');\nclick('button:contains(Return)');\n});\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | fix: fixed edit operative plan title test |
288,343 | 27.03.2017 12:28:44 | 14,400 | 164f78cf8be5f629022cdbdc39f171aad6773884 | add clarification for clone vs fork | [
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -22,7 +22,7 @@ To install the frontend please do the following:\n3. Install [ember-cli latest](https://www.npmjs.org/package/ember-cli): `npm install -g ember-cli@latest`.\nDepending on your [npm permissions](https://docs.npmjs.com/getting-started/fixing-npm-permissions) you might need root access to install ember-cli.\n4. Install [bower](https://www.npmjs.org/package/bower): `npm install -g bower`\n-5. Clone this repo with `git clone https://github.com/HospitalRun/hospitalrun-frontend`, go to the cloned folder and run `script/bootstrap`. (*Note: Depending on your [npm permissions](https://docs.npmjs.com/getting-started/fixing-npm-permissions) you might need root access to install PhantomJS2; also, Windows users must run with [Cygwin](http://cygwin.org/)*).\n+5. Clone this repo with `git clone https://github.com/HospitalRun/hospitalrun-frontend`, go to the cloned folder and run `script/bootstrap`. (*Note: Depending on your [npm permissions](https://docs.npmjs.com/getting-started/fixing-npm-permissions) you might need root access to install PhantomJS2; also, Windows users must run with [Cygwin](http://cygwin.org/)*). **Note:** *if you just want to use the project, cloning is the best option. However, if you wish to contribute to the project, you will need to fork the project first, and then clone your `hospitalrun-frontend` fork and make your contributions via a branch on your fork.*\n6. Install and configure [CouchDB](http://couchdb.apache.org/)\n1. Download and install CouchDB from http://couchdb.apache.org/#download\n2. Start CouchDB\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | add clarification for clone vs fork |
288,343 | 27.03.2017 12:34:20 | 14,400 | 2878d63493f13cebc5929750e49afa5511d70ab0 | moar formatting... | [
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -23,8 +23,8 @@ To install the frontend please do the following:\nDepending on your [npm permissions](https://docs.npmjs.com/getting-started/fixing-npm-permissions) you might need root access to install ember-cli.\n4. Install [bower](https://www.npmjs.org/package/bower): `npm install -g bower`\n5. Clone this repo with `git clone https://github.com/HospitalRun/hospitalrun-frontend`, go to the cloned folder and run `script/bootstrap`.\n- - **Note:** Depending on your [npm permissions](https://docs.npmjs.com/getting-started/fixing-npm-permissions) you might need root access to install PhantomJS2; also, Windows users must run with [Cygwin](http://cygwin.org/)).\n- - **Note:** If you just want to use the project, cloning is the best option. However, if you wish to contribute to the project, you will need to fork the project first, and then clone your `hospitalrun-frontend` fork and make your contributions via a branch on your fork.\n+ - **Note:** *Depending on your [npm permissions](https://docs.npmjs.com/getting-started/fixing-npm-permissions) you might need root access to install PhantomJS2; also, Windows users must run with [Cygwin](http://cygwin.org/)).*\n+ - **Note:** *If you just want to use the project, cloning is the best option. However, if you wish to contribute to the project, you will need to fork the project first, and then clone your `hospitalrun-frontend` fork and make your contributions via a branch on your fork.*\n6. Install and configure [CouchDB](http://couchdb.apache.org/)\n1. Download and install CouchDB from http://couchdb.apache.org/#download\n2. Start CouchDB\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | moar formatting... |
288,376 | 22.03.2017 22:12:41 | 25,200 | 9fab9a495c8d8bb93c895d89cb8db9739e315b51 | The label for pricing was confusing
Listed as department when it is really the lookup list of departments /
categories to assign an expense. | [
{
"change_type": "MODIFY",
"old_path": "app/pricing/edit/template.hbs",
"new_path": "app/pricing/edit/template.hbs",
"diff": "{{em-input label=(t 'labels.name') property=\"name\" class=\"required price-name\"}}\n<div class=\"row\">\n{{number-input label=(t 'labels.price') property=\"price\" class=\"required col-xs-2 price-amount\"}}\n- {{select-or-typeahead property=\"expenseAccount\" label=(t 'labels.department') list=expenseAccountList selection=model.expenseAccount className=\"col-xs-4 price-department\"}}\n+ {{select-or-typeahead property=\"expenseAccount\" label=(t 'labels.expenseTo') list=expenseAccountList selection=model.expenseAccount className=\"col-xs-4 price-department\"}}\n</div>\n<div class=\"row\">\n<div class=\"required col-xs-4 price-category form-input-group\">\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | The label for pricing was confusing
Listed as department when it is really the lookup list of departments /
categories to assign an expense. |
288,376 | 27.03.2017 09:38:22 | 25,200 | b308dbdca39ff2e09d94acc9fd42b0cfd97c1e12 | resize the window and look to the website for an update file. | [
{
"change_type": "MODIFY",
"old_path": "electron.js",
"new_path": "electron.js",
"diff": "/* eslint-env node */\n'use strict';\n+const updater = require('electron-simple-updater');\n+updater.init('http://hospitalrun.io/releases/updates.js');\n+\nconst electron = require('electron');\nconst path = require('path');\nconst { app, BrowserWindow } = electron;\n@@ -28,8 +31,8 @@ app.on('window-all-closed', function onWindowAllClosed() {\napp.on('ready', function onReady() {\nmainWindow = new BrowserWindow({\n- width: 800,\n- height: 600\n+ width: 1000,\n+ height: 750\n});\ndelete mainWindow.module;\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | resize the window and look to the website for an update file. |
288,343 | 27.03.2017 12:42:10 | 14,400 | 48af93a099f0cdc3c8fc4955beee332baa344793 | one p too many | [
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -11,7 +11,7 @@ To run the development environment for this frontend you will need to have [Git]\n- [Contributing](#contributing)\n- [Installation](#installation)\n-- [Running the appplication](#running-the-application)\n+- [Running the application](#running-the-application)\n- [Running with Docker](#running-with-docker)\n- [Accessing HospitalRun with Docker Toolbox](#accessing-hospitalRun-with-docker-toolbox)\n- [Accessing HospitalRun with Docker](#accessing-hospitalRun-with-docker)\n@@ -61,7 +61,7 @@ To install the frontend please do the following:\n2. Or start the application from your applications folder.\n-## Running the appplication\n+## Running the application\nTo start the frontend please do the following:\n- Start the server by running `npm start` in the repo folder. If `npm start` doesn't work for you, try `ember serve` as an alternative.\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | one p too many |
288,343 | 27.03.2017 12:43:52 | 14,400 | 1715aae7c16c8e33b31692942417d5eaa4cbb726 | builds on one line | [
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -3,9 +3,7 @@ HospitalRun frontend\n_Ember frontend for HospitalRun_\n-[](https://travis-ci.org/HospitalRun/hospitalrun-frontend)\n-\n-[](http://couchdb.apache.org/)\n+[](https://travis-ci.org/HospitalRun/hospitalrun-frontend) [](http://couchdb.apache.org/)\nTo run the development environment for this frontend you will need to have [Git](https://git-scm.com/), [Node.js](https://nodejs.org), [Ember CLI](http://ember-cli.com/), [Bower](http://bower.io/), and [CouchDB](http://couchdb.apache.org/) installed.\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | builds on one line |
288,343 | 27.03.2017 12:44:47 | 14,400 | 8db6a94bcc3f902a3bc085fc37341dc919f9bba0 | a heading is helpful... | [
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -7,6 +7,8 @@ _Ember frontend for HospitalRun_\nTo run the development environment for this frontend you will need to have [Git](https://git-scm.com/), [Node.js](https://nodejs.org), [Ember CLI](http://ember-cli.com/), [Bower](http://bower.io/), and [CouchDB](http://couchdb.apache.org/) installed.\n+## Table of contents\n+\n- [Contributing](#contributing)\n- [Installation](#installation)\n- [Running the application](#running-the-application)\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | a heading is helpful... |
288,275 | 29.03.2017 15:05:10 | -3,600 | 2ea2fe245c45dccfd7fa4034ebc93c64995355ed | Display Vitals Taken By on visit page
Fixes | [
{
"change_type": "MODIFY",
"old_path": "app/locales/en/translations.js",
"new_path": "app/locales/en/translations.js",
"diff": "@@ -370,6 +370,7 @@ export default {\nprescriber: 'Prescriber',\nquantity: 'Quantity',\nrequestedOn: 'Requested On',\n+ takenBy: 'Taken By',\ndate: 'Date',\ndateOfBirth: 'Date of Birth',\ndateOfBirthShort: 'DoB',\n"
},
{
"change_type": "MODIFY",
"old_path": "app/visits/edit/template.hbs",
"new_path": "app/visits/edit/template.hbs",
"diff": "<div class=\"panel-body\">\n<table class=\"table\">\n<tr class=\"table-header\">\n+ <th>{{t \"labels.takenBy\"}}</th>\n<th>{{t \"labels.date\"}}</th>\n<th>{{t \"vitals.labels.temperature\"}}</th>\n<th>{{t \"vitals.labels.weight\"}}</th>\n</tr>\n{{#each model.vitals as |vital|}}\n<tr>\n+ <td>{{vital.modifiedBy}}</td>\n<td>{{date-format vital.dateRecorded format=\"l h:mm A\"}}</td>\n<td>{{vital.temperature}}</td>\n<td>{{vital.weight}}</td>\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Display Vitals Taken By on visit page
Fixes #1016 |
288,284 | 31.03.2017 14:37:12 | 14,400 | 6918824f75d9a736ce5dcf5b0e01ac4a00899dab | Fix user listing screen for Electron | [
{
"change_type": "MODIFY",
"old_path": "app/adapters/user.js",
"new_path": "app/adapters/user.js",
"diff": "@@ -135,7 +135,7 @@ export default RESTAdapter.extend(CheckForErrors, UserSession, {\n}\n};\nif (get(this, 'standAlone') === true) {\n- return this._offlineFindAll(ajaxData);\n+ return this._offlineFindAll(ajaxData.data);\n} else {\nlet url = this.buildURL(type.modelName, null, snapshotRecordArray, 'findAll');\nreturn this._checkForErrors(this.ajax(url, 'GET', ajaxData));\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Fix user listing screen for Electron |
288,275 | 31.03.2017 21:21:57 | -3,600 | 7d961ec153c0df3d8200c9918e2b04a891325f1b | Fix allergies bug | [
{
"change_type": "ADD",
"old_path": null,
"new_path": "app/allergy/edit/controller.js",
"diff": "+import Ember from 'ember';\n+import AbstractEditController from 'hospitalrun/controllers/abstract-edit-controller';\n+\n+const {\n+ computed,\n+ computed: {\n+ alias\n+ },\n+ get,\n+ inject,\n+ set\n+} = Ember;\n+\n+export default AbstractEditController.extend({\n+ i18n: inject.service(),\n+ editController: alias('model.editController'),\n+ newAllergy: false,\n+\n+ additionalButtons: computed('model.isNew', function() {\n+ let model = get(this, 'model');\n+ let btn = get(this, 'i18n').t('buttons.delete');\n+ let isNew = get(model, 'isNew');\n+ if (!isNew) {\n+ return [{\n+ class: 'btn btn-default warning',\n+ buttonAction: 'deleteAllergy',\n+ buttonIcon: 'octicon octicon-x',\n+ buttonText: btn\n+ }];\n+ }\n+ }),\n+\n+ title: Ember.computed('model', function() {\n+ let model = get(this, 'model');\n+ let i18n = get(this, 'i18n');\n+ let isNew = get(model, 'isNew');\n+ if (!isNew) {\n+ return i18n.t('allergies.titles.editAllergy');\n+ } else {\n+ return i18n.t('allergies.titles.addAllergy');\n+ }\n+ }),\n+\n+ beforeUpdate() {\n+ let allergy = get(this, 'model');\n+ set(this, 'newAllergy', get(allergy, 'isNew'));\n+ return Ember.RSVP.Promise.resolve();\n+ },\n+\n+ afterUpdate(allergy) {\n+ let newAllergy = get(this, 'newAllergy');\n+ if (newAllergy) {\n+ get(this, 'editController').send('addAllergy', allergy);\n+ set(this, 'name', '');\n+ } else {\n+ this.send('closeModal');\n+ }\n+ },\n+\n+ actions: {\n+ cancel() {\n+ this.send('closeModal');\n+ },\n+\n+ deleteAllergy() {\n+ let allergy = get(this, 'model');\n+ get(this, 'editController').send('deleteAllergy', allergy);\n+ }\n+ }\n+});\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "app/allergy/edit/template.hbs",
"diff": "+{{#modal-dialog\n+ title=title\n+ updateButtonText=updateButtonText\n+ hideCancelButton=true\n+ isUpdateDisabled=isUpdateDisabled\n+ updateButtonAction=updateButtonAction\n+ additionalButtons=additionalButtons\n+}}\n+\n+ {{#em-form model=model submitButton=false }}\n+ <div class=\"row\">\n+ {{em-input class=\"col-xs-12 form-group required test-allergy\" label=(t 'allergies.labels.allergyName') property=\"name\"}}\n+ </div>\n+ {{/em-form}}\n+\n+{{/modal-dialog}}\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "app/components/medication-allergy.js",
"new_path": "app/components/medication-allergy.js",
"diff": "@@ -8,34 +8,11 @@ const {\nexport default Ember.Component.extend({\nclassNames: 'ps-info-group long-form',\n- store: Ember.inject.service(),\n- i18n: Ember.inject.service(),\n- patient: null,\n- displayModal: false,\n- currentAllergy: false,\n-\n- buttonConfirmText: computed('currentAllergy', function() {\n- let i18n = this.get('i18n');\n- let currentAllergy = this.get('currentAllergy');\n- if (currentAllergy) {\n- return i18n.t('buttons.update');\n- } else {\n- return i18n.t('buttons.add');\n- }\n- }),\n- additionalButtons: computed('currentAllergy', function() {\n- let currentAllergy = this.get('currentAllergy');\n- let btn = this.get('i18n').t('buttons.delete');\n- if (currentAllergy) {\n- return [{\n- class: 'btn btn-default warning',\n- buttonAction: 'deleteAllergy',\n- buttonIcon: 'octicon octicon-x',\n- buttonText: btn\n- }];\n- }\n- }),\n+ canAddAllergy: null,\n+ patient: null,\n+ editAllergyAction: 'editAllergy',\n+ showAddAllergyAction: 'showAddAllergy',\nshowAllergies: computed('canAddAllergy', 'patient.allergies.[]', {\nget() {\n@@ -45,70 +22,13 @@ export default Ember.Component.extend({\n}\n}),\n- modalTitle: Ember.computed('currentAllergy', function() {\n- let currentAllergy = this.get('currentAllergy');\n- let i18n = this.get('i18n');\n- if (currentAllergy) {\n- return i18n.t('allergies.titles.editAllergy');\n- } else {\n- return i18n.t('allergies.titles.addAllergy');\n- }\n- }),\n-\n- closeAllergyModal() {\n- this.set('currentAllergy', false);\n- this.set('displayModal', false);\n- },\n-\nactions: {\n-\n- cancel() {\n- this.closeAllergyModal();\n- },\n-\n- closeModal() {\n- this.closeAllergyModal();\n- },\n-\neditAllergy(allergy) {\n- this.set('currentAllergy', allergy);\n- this.set('displayModal', true);\n+ this.sendAction('editAllergyAction', allergy);\n},\ncreateNewAllergy() {\n- this.set('displayModal', true);\n- },\n-\n- updateAllergy() {\n- let model = this.get('patient');\n- let allergyModel = this.get('currentAllergy');\n- if (!allergyModel) {\n- allergyModel = this.get('store').createRecord('allergy', {\n- name: this.get('name')\n- });\n- allergyModel.save().then(() => {\n- model.get('allergies').pushObject(allergyModel);\n- model.save().then(() => {\n- this.set('name', '');\n- this.closeAllergyModal();\n- });\n- });\n- } else {\n- allergyModel.save().then(() => {\n- this.closeAllergyModal();\n- });\n- }\n- },\n- deleteAllergy() {\n- let allergy = this.get('currentAllergy');\n- let patient = this.get('patient');\n- let patientAllergies = patient.get('allergies');\n- allergy.destroyRecord().then(() => {\n- patientAllergies.removeObject(allergy);\n- patient.save().then(() => {\n- this.closeAllergyModal();\n- });\n- });\n+ this.sendAction('showAddAllergyAction');\n}\n}\n});\n"
},
{
"change_type": "MODIFY",
"old_path": "app/components/patient-summary.js",
"new_path": "app/components/patient-summary.js",
"diff": "@@ -16,6 +16,7 @@ export default Ember.Component.extend(UserSession, {\ndiagnosisContainer: null,\ndiagnosisList: null,\ndisablePatientLink: false,\n+ editAllergyAction: 'editAllergy',\neditDiagnosisAction: 'editDiagnosis',\neditOperativePlanAction: 'editOperativePlan',\neditOperationReportAction: 'editOperationReport',\n@@ -23,6 +24,7 @@ export default Ember.Component.extend(UserSession, {\nhideInActiveDiagnoses: true,\npatient: null,\npatientProcedures: null,\n+ showAddAllergyAction: 'showAddAllergy',\nshowAddDiagnosisAction: 'showAddDiagnosis',\nshowPatientAction: 'showPatient',\n@@ -86,6 +88,10 @@ export default Ember.Component.extend(UserSession, {\n}\n},\n+ editAllergy(allergy) {\n+ this.sendAction('editAllergyAction', allergy);\n+ },\n+\neditDiagnosis(diagnosis) {\nthis.sendAction('editDiagnosisAction', diagnosis);\n},\n@@ -99,6 +105,10 @@ export default Ember.Component.extend(UserSession, {\n}\n},\n+ showAddAllergy() {\n+ this.sendAction('showAddAllergyAction');\n+ },\n+\nshowAddDiagnosis() {\nthis.sendAction('showAddDiagnosisAction');\n}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "app/mixins/allergy-actions.js",
"diff": "+import Ember from 'ember';\n+\n+const {\n+ get,\n+ set\n+} = Ember;\n+\n+export default Ember.Mixin.create({\n+ openAllergyModal(allergy) {\n+ set(allergy, 'editController', this);\n+ this.send('openModal', 'allergy.edit', allergy);\n+ },\n+\n+ savePatientAllergy(patient, allergy) {\n+ get(patient, 'allergies').pushObject(allergy);\n+ patient.save().then(() => {\n+ this.silentUpdate('closeModal');\n+ });\n+ },\n+\n+ deletePatientAllergy(patient, allergy) {\n+ let patientAllergies = get(patient, 'allergies');\n+ allergy.destroyRecord().then(() => {\n+ patientAllergies.removeObject(allergy);\n+ patient.save().then(() => {\n+ this.send('closeModal');\n+ });\n+ });\n+ },\n+\n+ actions: {\n+ editAllergy(allergy) {\n+ this.openAllergyModal(allergy);\n+ },\n+\n+ showAddAllergy() {\n+ let newAllergy = get(this, 'store').createRecord('allergy');\n+ this.openAllergyModal(newAllergy);\n+ }\n+ }\n+});\n"
},
{
"change_type": "MODIFY",
"old_path": "app/models/allergy.js",
"new_path": "app/models/allergy.js",
"diff": "@@ -7,5 +7,11 @@ export default AbstractModel.extend({\nicd9CMCode: DS.attr('string'),\nicd10Code: DS.attr('string'),\n// Associations\n- patient: DS.belongsTo('patient')\n+ patient: DS.belongsTo('patient'),\n+\n+ validations: {\n+ name: {\n+ presence: true\n+ }\n+ }\n});\n"
},
{
"change_type": "MODIFY",
"old_path": "app/patients/edit/controller.js",
"new_path": "app/patients/edit/controller.js",
"diff": "import AbstractEditController from 'hospitalrun/controllers/abstract-edit-controller';\n+import AllergyActions from 'hospitalrun/mixins/allergy-actions';\nimport BloodTypes from 'hospitalrun/mixins/blood-types';\nimport DiagnosisActions from 'hospitalrun/mixins/diagnosis-actions';\nimport Ember from 'ember';\n@@ -15,7 +16,7 @@ const {\nisEmpty\n} = Ember;\n-export default AbstractEditController.extend(BloodTypes, DiagnosisActions, ReturnTo, UserSession, PatientId, PatientNotes, PatientVisits, {\n+export default AbstractEditController.extend(AllergyActions, BloodTypes, DiagnosisActions, ReturnTo, UserSession, PatientId, PatientNotes, PatientVisits, {\ncanAddAppointment: function() {\nreturn this.currentUserCan('add_appointment');\n@@ -182,6 +183,11 @@ export default AbstractEditController.extend(BloodTypes, DiagnosisActions, Retur\nupdateCapability: 'add_patient',\nactions: {\n+ addAllergy(newAllergy) {\n+ let patient = get(this, 'model');\n+ this.savePatientAllergy(patient, newAllergy);\n+ },\n+\naddContact(newContact) {\nlet additionalContacts = this.getWithDefault('model.additionalContacts', []);\nlet model = this.get('model');\n@@ -216,6 +222,11 @@ export default AbstractEditController.extend(BloodTypes, DiagnosisActions, Retur\nthis.send('closeModal');\n},\n+ deleteAllergy(allergy) {\n+ let patient = get(this, 'model');\n+ this.deletePatientAllergy(patient, allergy);\n+ },\n+\ndeleteContact(model) {\nlet contact = model.get('contactToDelete');\nlet additionalContacts = this.get('model.additionalContacts');\n"
},
{
"change_type": "MODIFY",
"old_path": "app/templates/components/medication-allergy.hbs",
"new_path": "app/templates/components/medication-allergy.hbs",
"diff": "<label class=\"ps-info-label wide\">{{t 'allergies.labels.patientAllergy'}}</label>\n{{#if canAddAllergy}}\n- <a class=\"clickable\" {{action \"createNewAllergy\"}}><span class=\"octicon octicon-plus\"></span> {{t 'allergies.buttons.addAllergy'}}</a>\n+ <a class=\"clickable\" {{action \"createNewAllergy\" bubbles=false }}><span class=\"octicon octicon-plus\"></span> {{t 'allergies.buttons.addAllergy'}}</a>\n{{/if}}\n<div class=\"ps-info-data-block allergy-list\">\n{{#each patient.allergies as |allergy index|}}\n{{#unless (eq index 0)}}, {{/unless}}\n{{#if canAddAllergy}}\n- <a class=\"clickable allergy-button\" {{action \"editAllergy\" allergy}}>{{allergy.name}}</a>\n+ <a class=\"clickable allergy-button\" {{action \"editAllergy\" allergy bubbles=false }}>{{allergy.name}}</a>\n{{else}}\n<span>{{allergy.name}}</span>\n{{/if}}\n{{/each}}\n</div>\n{{/if}}\n-\n-{{#if displayModal}}\n- {{#modal-dialog\n- title=modalTitle\n- updateButtonText=buttonConfirmText\n- hideCancelButton=true\n- updateButtonAction='updateAllergy'\n- additionalButtons=additionalButtons\n- }}\n- <div class=\"row\">\n- <div class=\"col-xs-12 form-group\">\n- <label>{{t \"allergies.labels.allergyName\"}}</label>\n- {{#if currentAllergy}}\n- {{input class=\"form-control\" value=currentAllergy.name}}\n- {{else}}\n- {{input class=\"form-control\" value=name}}\n- {{/if}}\n- </div>\n- </div>\n- {{/modal-dialog}}\n-{{/if}}\n"
},
{
"change_type": "MODIFY",
"old_path": "app/visits/edit/controller.js",
"new_path": "app/visits/edit/controller.js",
"diff": "import AbstractEditController from 'hospitalrun/controllers/abstract-edit-controller';\nimport AddNewPatient from 'hospitalrun/mixins/add-new-patient';\n+import AllergyActions from 'hospitalrun/mixins/allergy-actions';\nimport ChargeActions from 'hospitalrun/mixins/charge-actions';\nimport DiagnosisActions from 'hospitalrun/mixins/diagnosis-actions';\nimport Ember from 'ember';\n@@ -17,7 +18,7 @@ const {\nset\n} = Ember;\n-export default AbstractEditController.extend(AddNewPatient, ChargeActions, DiagnosisActions, PatientSubmodule, PatientNotes, UserSession, VisitTypes, {\n+export default AbstractEditController.extend(AddNewPatient, AllergyActions, ChargeActions, DiagnosisActions, PatientSubmodule, PatientNotes, UserSession, VisitTypes, {\nvisitsController: Ember.inject.controller('visits'),\nadditionalButtons: computed('model.status', function() {\nlet buttonProps = {\n@@ -340,6 +341,11 @@ export default AbstractEditController.extend(AddNewPatient, ChargeActions, Diagn\n},\nactions: {\n+ addAllergy(newAllergy) {\n+ let patient = get(this, 'model.patient');\n+ this.savePatientAllergy(patient, newAllergy);\n+ },\n+\naddDiagnosis(newDiagnosis) {\nthis.addDiagnosisToModelAndPatient(newDiagnosis);\n},\n@@ -362,6 +368,11 @@ export default AbstractEditController.extend(AddNewPatient, ChargeActions, Diagn\nthis.checkoutPatient(VisitStatus.CHECKED_OUT);\n},\n+ deleteAllergy(allergy) {\n+ let patient = get(this, 'model.patient');\n+ this.deletePatientAllergy(patient, allergy);\n+ },\n+\ndeleteProcedure(procedure) {\nthis.updateList('procedures', procedure, true);\n},\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/acceptance/visit-test.js",
"new_path": "tests/acceptance/visit-test.js",
"diff": "@@ -80,6 +80,17 @@ test('Edit visit', function(assert) {\n});\nandThen(function() {\nassert.equal(currentURL(), '/visits/edit/03C7BF8B-04E0-DD9E-9469-96A5604F5340', 'Visit url is correct');\n+ click('a:contains(Add Allergy)');\n+ waitToAppear('.modal-dialog');\n+ });\n+ andThen(function() {\n+ assert.equal(find('.modal-title').text(), 'Add Allergy', 'Add Allergy dialog displays');\n+ fillIn('.test-allergy input', 'Oatmeal');\n+ click('.modal-footer button:contains(Add)');\n+ waitToDisappear('.modal-dialog');\n+ });\n+ andThen(function() {\n+ assert.equal(find('a.allergy-button:contains(Oatmeal)').length, 1, 'New allergy appears');\nclick('a:contains(Add Diagnosis)');\nwaitToAppear('.modal-dialog');\n});\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Fix allergies bug (#1040) |
288,275 | 03.04.2017 15:45:19 | -3,600 | 507c8211a8025d8ed86e3f5325d147111657f744 | Fix 1023 | [
{
"change_type": "MODIFY",
"old_path": "app/admin/print-header/template.hbs",
"new_path": "app/admin/print-header/template.hbs",
"diff": "<div class=\"panel-body\">\n{{#em-form model=model submitButton=false }}\n{{em-input label=(t 'admin.header.facilityName') property=\"value.facilityName\"}}\n- {{em-checkbox label=(t 'admin.header.includeFacilityName') property=\"value.facilityNameInclude\"}}\n{{em-input label=(t 'admin.header.headerLine1') property=\"value.headerLine1\"}}\n- {{em-checkbox label=(t 'admin.header.includeHeaderLine1') property=\"value.headerLine1Include\"}}\n{{em-input label=(t 'admin.header.headerLine2') property=\"value.headerLine2\"}}\n- {{em-checkbox label=(t 'admin.header.includeHeaderLine2') property=\"value.headerLine2Include\"}}\n{{em-input label=(t 'admin.header.headerLine3') property=\"value.headerLine3\"}}\n- {{em-checkbox label=(t 'admin.header.includeHeaderLine3') property=\"value.headerLine3Include\"}}\n{{em-input label=(t 'admin.header.logoURL') property=\"value.logoURL\"}}\n- {{em-checkbox label=(t 'admin.header.includeLogoURL') property=\"value.logoURLInclude\"}}\n{{/em-form}}\n</div>\n</div>\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Fix 1023 (#1039) |
288,284 | 03.04.2017 10:53:07 | 14,400 | 1d1bf2d54d579f2e5dc0150a24b36305f5cfc199 | Removed unused labels
Cleanup for | [
{
"change_type": "MODIFY",
"old_path": "app/locales/en/translations.js",
"new_path": "app/locales/en/translations.js",
"diff": "@@ -70,11 +70,6 @@ export default {\nheaderLine1: 'Header Line 1',\nheaderLine2: 'Header Line 2',\nheaderLine3: 'Header Line 3',\n- includeFacilityName: 'Include Facility Name',\n- includeHeaderLine1: 'Include Header Line 1',\n- includeHeaderLine2: 'Include Header Line 2',\n- includeHeaderLine3: 'Include Header Line 3',\n- includeLogoURL: 'Include Logo URL',\nlogoURL: 'Logo URL',\nmessages: { headerSaved: 'The header options have been saved' },\nnewTitle: 'Header Options',\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Removed unused labels
Cleanup for #1039 |
288,284 | 03.04.2017 10:54:21 | 14,400 | cbc07fd698ff2f0beee4f74cde8b3eea279aadd4 | Fixes Ember Inspector error
See for more
details | [
{
"change_type": "MODIFY",
"old_path": "app/routes/application.js",
"new_path": "app/routes/application.js",
"diff": "@@ -16,9 +16,9 @@ let ApplicationRoute = Route.extend(ApplicationRouteMixin, ModalHelper, SetupUse\nactions: {\ncloseModal() {\n- this.disconnectOutlet({\n- parentView: 'application',\n- outlet: 'modal'\n+ this.render('empty', {\n+ outlet: 'modal',\n+ into: 'application'\n});\n},\n"
},
{
"change_type": "ADD",
"old_path": "app/templates/empty.hbs",
"new_path": "app/templates/empty.hbs",
"diff": ""
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Fixes Ember Inspector error
See https://github.com/emberjs/ember-inspector/issues/625 for more
details |
288,284 | 03.04.2017 11:16:02 | 14,400 | aebd7f4d52865ff11b9c89df1e7840855f7f3ef4 | Make sure config db is read only | [
{
"change_type": "MODIFY",
"old_path": "script/initcouch.sh",
"new_path": "script/initcouch.sh",
"diff": "@@ -13,6 +13,7 @@ fi\ncurl -X PUT $SECUREHOST/_users/_security -d '{ \"admins\": { \"names\": [], \"roles\": [\"admin\"]}, \"members\": { \"names\": [], \"roles\": []}}'\ncurl -X PUT $SECUREHOST/config\ncurl -X PUT $SECUREHOST/config/_security -d '{ \"admins\": { \"names\": [], \"roles\": [\"admin\"]}, \"members\": { \"names\": [], \"roles\": []}}'\n+curl -X PUT $SECUREHOST/config/_design/auth -d \"{ \\\"validate_doc_update\\\": \\\"function(newDoc, oldDoc, userCtx) {if(userCtx.roles.indexOf('_admin')!== -1) {return;} else {throw({forbidden: 'This DB is read-only'});}}\\\"}\"\ncurl -X PUT $SECUREHOST/main\ncurl -X PUT $SECUREHOST/main/_security -d '{ \"admins\": { \"names\": [], \"roles\": [\"admin\"]}, \"members\": { \"names\": [], \"roles\": [\"user\"]}}'\ncurl -X PUT $SECUREHOST/_config/http/authentication_handlers -d '\"{couch_httpd_oauth, oauth_authentication_handler}, {couch_httpd_auth, proxy_authentification_handler}, {couch_httpd_auth, cookie_authentication_handler}, {couch_httpd_auth, default_authentication_handler}\"'\n"
},
{
"change_type": "MODIFY",
"old_path": "script/initcouch2.sh",
"new_path": "script/initcouch2.sh",
"diff": "@@ -18,6 +18,7 @@ curl -X PUT $SECUREHOST/_users/_security -d '{ \"admins\": { \"names\": [], \"roles\":\necho \"Setting up HospitalRun config DB\"\ncurl -X PUT $SECUREHOST/config\ncurl -X PUT $SECUREHOST/config/_security -d '{ \"admins\": { \"names\": [], \"roles\": [\"admin\"]}, \"members\": { \"names\": [], \"roles\": []}}'\n+curl -X PUT $SECUREHOST/config/_design/auth -d \"{ \\\"validate_doc_update\\\": \\\"function(newDoc, oldDoc, userCtx) {if(userCtx.roles.indexOf('_admin')!== -1) {return;} else {throw({forbidden: 'This DB is read-only'});}}\\\"}\"\necho \"Setting up HospitalRun main DB\"\ncurl -X PUT $SECUREHOST/main\ncurl -X PUT $SECUREHOST/main/_security -d '{ \"admins\": { \"names\": [], \"roles\": [\"admin\"]}, \"members\": { \"names\": [], \"roles\": [\"user\"]}}'\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Make sure config db is read only |
288,284 | 03.04.2017 13:46:19 | 14,400 | 5b068caaed2b76e1980b5d7420d7981b7c94b022 | Updated to use Node.js 6.x | [
{
"change_type": "MODIFY",
"old_path": "Dockerfile",
"new_path": "Dockerfile",
"diff": "@@ -4,7 +4,7 @@ FROM ubuntu:14.04\nRUN apt-get update && apt-get install curl sudo git wget -y\n# install hospital run\n-RUN curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -\n+RUN curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -\nRUN apt-get update && apt-get install nodejs -y\nRUN mkdir -p /usr/src/app\nWORKDIR /usr/src/app\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Updated to use Node.js 6.x |
288,284 | 04.04.2017 11:49:03 | 14,400 | 43c150bb2f00b8250e323b3d5ccc5c007121e479 | Hardening security for couchdb | [
{
"change_type": "MODIFY",
"old_path": "script/initcouch.sh",
"new_path": "script/initcouch.sh",
"diff": "@@ -10,12 +10,13 @@ if [ -z \"${1}\" ] || [ -z \"${2}\" ]; then\nelse\nSECUREHOST=\"http://$1:$2@$URL:$PORT\"\nfi\n-curl -X PUT $SECUREHOST/_users/_security -d '{ \"admins\": { \"names\": [], \"roles\": [\"admin\"]}, \"members\": { \"names\": [], \"roles\": []}}'\n+curl -X PUT $SECUREHOST/_users/_security -d '{ \"admins\": { \"names\": [], \"roles\": [\"admin\"]}, \"members\": { \"names\": [], \"roles\": [admin]}}'\ncurl -X PUT $SECUREHOST/config\ncurl -X PUT $SECUREHOST/config/_security -d '{ \"admins\": { \"names\": [], \"roles\": [\"admin\"]}, \"members\": { \"names\": [], \"roles\": []}}'\ncurl -X PUT $SECUREHOST/config/_design/auth -d \"{ \\\"validate_doc_update\\\": \\\"function(newDoc, oldDoc, userCtx) {if(userCtx.roles.indexOf('_admin')!== -1) {return;} else {throw({forbidden: 'This DB is read-only'});}}\\\"}\"\ncurl -X PUT $SECUREHOST/main\ncurl -X PUT $SECUREHOST/main/_security -d '{ \"admins\": { \"names\": [], \"roles\": [\"admin\"]}, \"members\": { \"names\": [], \"roles\": [\"user\"]}}'\n+curl -X PUT $SECUREHOST/main/_design/auth -d \"{\\\"validate_doc_update\\\": \\\"function(newDoc, oldDoc, userCtx) { if(userCtx.roles.indexOf('_admin')!== -1 || userCtx.roles.indexOf('admin')!== -1){ if (newDoc._id.indexOf('_design') === 0) { return; }}if (newDoc._id.indexOf('_') !== -1) {var idParts=newDoc._id.split('_');if (idParts.length >= 3) { var allowedTypes=['allergy','appointment','attachment','billingLineItem','customForm','diagnosis','imaging','incCategory','incidentNote','incident','invLocation','invPurchase','invRequest','inventory','invoice','lab','lineItemDetail','lookup','medication','operationReport','operativePlan','option','overridePrice','patientNote','patient','payment','photo','priceProfile','pricing','procCharge','procedure','report','sequence','userRole','visit','vital'];if (allowedTypes.indexOf(idParts[0]) !== -1) {if (newDoc.data) {return;}}}}throw({forbidden: 'Invalid data'});}\\\"}\"\ncurl -X PUT $SECUREHOST/_config/http/authentication_handlers -d '\"{couch_httpd_oauth, oauth_authentication_handler}, {couch_httpd_auth, proxy_authentification_handler}, {couch_httpd_auth, cookie_authentication_handler}, {couch_httpd_auth, default_authentication_handler}\"'\ncurl -X PUT $SECUREHOST/_config/couch_httpd_oauth/use_users_db -d '\"true\"'\ncurl -X PUT $SECUREHOST/_users/org.couchdb.user:hradmin -d '{\"name\": \"hradmin\", \"password\": \"test\", \"roles\": [\"System Administrator\",\"admin\",\"user\"], \"type\": \"user\", \"userPrefix\": \"p1\"}'\n"
},
{
"change_type": "MODIFY",
"old_path": "script/initcouch2.sh",
"new_path": "script/initcouch2.sh",
"diff": "@@ -14,7 +14,7 @@ else\nfi\necho \"Setting up security on _users db\"\n-curl -X PUT $SECUREHOST/_users/_security -d '{ \"admins\": { \"names\": [], \"roles\": [\"admin\"]}, \"members\": { \"names\": [], \"roles\": []}}'\n+curl -X PUT $SECUREHOST/_users/_security -d '{ \"admins\": { \"names\": [], \"roles\": [\"admin\"]}, \"members\": { \"names\": [], \"roles\": [admin]}}'\necho \"Setting up HospitalRun config DB\"\ncurl -X PUT $SECUREHOST/config\ncurl -X PUT $SECUREHOST/config/_security -d '{ \"admins\": { \"names\": [], \"roles\": [\"admin\"]}, \"members\": { \"names\": [], \"roles\": []}}'\n@@ -23,6 +23,7 @@ echo \"Setting up HospitalRun main DB\"\ncurl -X PUT $SECUREHOST/main\ncurl -X PUT $SECUREHOST/main/_security -d '{ \"admins\": { \"names\": [], \"roles\": [\"admin\"]}, \"members\": { \"names\": [], \"roles\": [\"user\"]}}'\necho \"Configure CouchDB authentication\"\n+curl -X PUT $SECUREHOST/main/_design/auth -d \"{\\\"validate_doc_update\\\": \\\"function(newDoc, oldDoc, userCtx) { if(userCtx.roles.indexOf('_admin')!== -1 || userCtx.roles.indexOf('admin')!== -1){ if (newDoc._id.indexOf('_design') === 0) { return; }}if (newDoc._id.indexOf('_') !== -1) {var idParts=newDoc._id.split('_');if (idParts.length >= 3) { var allowedTypes=['allergy','appointment','attachment','billingLineItem','customForm','diagnosis','imaging','incCategory','incidentNote','incident','invLocation','invPurchase','invRequest','inventory','invoice','lab','lineItemDetail','lookup','medication','operationReport','operativePlan','option','overridePrice','patientNote','patient','payment','photo','priceProfile','pricing','procCharge','procedure','report','sequence','userRole','visit','vital'];if (allowedTypes.indexOf(idParts[0]) !== -1) {if (newDoc.data) {return;}}}}throw({forbidden: 'Invalid data'});}\\\"}\"\ncurl -X PUT $SECUREHOST/_node/couchdb@localhost/_config/http/authentication_handlers -d '\"{couch_httpd_oauth, oauth_authentication_handler}, {couch_httpd_auth, proxy_authentification_handler}, {couch_httpd_auth, cookie_authentication_handler}, {couch_httpd_auth, default_authentication_handler}\"'\ncurl -X PUT $SECUREHOST/_node/couchdb@localhost/_config/couch_httpd_oauth/use_users_db -d '\"true\"'\necho \"Add hradmin user for use in HospitalRun\"\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Hardening security for couchdb |
288,284 | 04.04.2017 16:59:18 | 14,400 | 2b2d50dddbde71c9906c27e81b30beedc9277db7 | Updated to use ember-concurrency for edit updates. | [
{
"change_type": "MODIFY",
"old_path": "app/controllers/abstract-edit-controller.js",
"new_path": "app/controllers/abstract-edit-controller.js",
"diff": "@@ -2,6 +2,7 @@ import Ember from 'ember';\nimport EditPanelProps from 'hospitalrun/mixins/edit-panel-props';\nimport IsUpdateDisabled from 'hospitalrun/mixins/is-update-disabled';\nimport ModalHelper from 'hospitalrun/mixins/modal-helper';\n+import { task } from 'ember-concurrency';\nimport UserSession from 'hospitalrun/mixins/user-session';\nconst { get, inject, isEmpty, RSVP, set } = Ember;\n@@ -64,13 +65,28 @@ export default Ember.Controller.extend(EditPanelProps, IsUpdateDisabled, ModalHe\n/* Silently update and then fire the specified action. */\nsilentUpdate(action, whereFrom) {\n- this.beforeUpdate().then(() => {\n- return this.saveModel(true);\n- }).then(() => {\n+ return this.get('updateTask').perform(true).then(() => {\nthis.send(action, whereFrom);\n});\n},\n+ /**\n+ * Task to update the model and perform the before update and after update\n+ * @param skipAfterUpdate boolean (optional) indicating whether or not\n+ * to skip the afterUpdate call.\n+ */\n+ updateTask: task(function* (skipAfterUpdate) {\n+ try {\n+ yield this.beforeUpdate().then(() => {\n+ return this.saveModel(skipAfterUpdate);\n+ }).catch((err) => {\n+ return this._handleError(err);\n+ });\n+ } catch(ex) {\n+ this._handleError(ex);\n+ }\n+ }).enqueue(),\n+\n/**\n* Add the specified value to the lookup list if it doesn't already exist in the list.\n* @param lookupList array the lookup list to add to.\n@@ -144,15 +160,7 @@ export default Ember.Controller.extend(EditPanelProps, IsUpdateDisabled, ModalHe\n* to skip the afterUpdate call.\n*/\nupdate(skipAfterUpdate) {\n- try {\n- this.beforeUpdate().then(() => {\n- this.saveModel(skipAfterUpdate);\n- }).catch((err) => {\n- this._handleError(err);\n- });\n- } catch(ex) {\n- this._handleError(ex);\n- }\n+ return this.get('updateTask').perform(skipAfterUpdate);\n}\n},\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/acceptance/outpatient-test.js",
"new_path": "tests/acceptance/outpatient-test.js",
"diff": "@@ -51,6 +51,7 @@ test('Check In/Check Out Existing outpatient', function(assert) {\nandThen(function() {\nassert.equal(find('.modal-title').text(), 'Patient Check Out', 'Patient checkout confirmation displays');\nclick('button:contains(Ok)');\n+ waitToAppear('.modal-title:contains(Patient Checked Out)');\n});\nandThen(function() {\nassert.equal(find('.modal-title').text(), 'Patient Checked Out', 'Patient has been checked out confirmation');\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/acceptance/patient-notes-test.js",
"new_path": "tests/acceptance/patient-notes-test.js",
"diff": "@@ -20,6 +20,8 @@ test('patient notes crud testing', function(assert) {\nassert.equal(currentURL(), '/patients/edit/new');\nfillIn('.test-first-name input', 'John');\nfillIn('.test-last-name input', 'Doe');\n+ });\n+ andThen(function() {\nclick('.panel-footer button:contains(Add)');\nwaitToAppear('.message:contains(The patient record for John Doe has been saved)');\n});\n@@ -56,9 +58,10 @@ test('patient notes crud testing', function(assert) {\nassert.equal(find('.modal-title').text(), 'New Note for John Doe', 'Notes modal appeared');\nfillIn('.test-note-content textarea', 'This is a note.');\nfillIn('.test-note-attribution input', 'Dr. Nick');\n- click('.modal-footer button:contains(Add)');\n});\nandThen(function() {\n+ click('.modal-footer button:contains(Add)');\n+ waitToDisappear('.modal-dialog');\nwaitToAppear('#visit-notes table tr td:contains(This is a note.)');\n});\nandThen(function() {\n@@ -68,7 +71,10 @@ test('patient notes crud testing', function(assert) {\n});\nandThen(function() {\nfillIn('.test-note-content textarea', 'This is an updated note.');\n+ });\n+ andThen(function() {\nclick('.modal-footer button:contains(Update)');\n+ waitToDisappear('.modal-dialog');\nwaitToAppear('#visit-notes table tr td:contains(This is an updated note.)');\n});\nandThen(function() {\n@@ -77,7 +83,9 @@ test('patient notes crud testing', function(assert) {\nwaitToAppear('.modal-dialog');\n});\nandThen(function() {\n+ assert.equal(find('.modal-title').text(), 'Delete Note', 'Delete Note modal appeared');\nclick('.modal-footer button:contains(Ok)');\n+ waitToDisappear('.modal-dialog');\n});\nandThen(function() {\nassert.equal(find('#visit-notes table tr td:contains(This is an updated note.)').length, 0, 'Successfully deleted note.');\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/unit/controllers/abstract-edit-controller-test.js",
"new_path": "tests/unit/controllers/abstract-edit-controller-test.js",
"diff": "@@ -121,10 +121,11 @@ test('actions.update exception message', function(assert) {\ncontroller.displayAlert = function stub(title, message) {\nalertTitle = title.toString();\nalertMessage = message.toString();\n+ assert.equal(alertTitle, 'Error!!!!');\n+ assert.equal(alertMessage, 'An error occurred while attempting to save: Test');\n};\n+ Ember.run(() => {\ncontroller.send('update');\n-\n- assert.equal(alertTitle, 'Error!!!!');\n- assert.equal(alertMessage, 'An error occurred while attempting to save: Test');\n+ });\n});\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Updated to use ember-concurrency for edit updates. |
288,284 | 04.04.2017 16:59:34 | 14,400 | a2a619bb46c1a18ca5364bddf9fe99fc76d62b66 | Make sure deletes are allowed. | [
{
"change_type": "MODIFY",
"old_path": "script/initcouch.sh",
"new_path": "script/initcouch.sh",
"diff": "@@ -16,7 +16,7 @@ curl -X PUT $SECUREHOST/config/_security -d '{ \"admins\": { \"names\": [], \"roles\":\ncurl -X PUT $SECUREHOST/config/_design/auth -d \"{ \\\"validate_doc_update\\\": \\\"function(newDoc, oldDoc, userCtx) {if(userCtx.roles.indexOf('_admin')!== -1) {return;} else {throw({forbidden: 'This DB is read-only'});}}\\\"}\"\ncurl -X PUT $SECUREHOST/main\ncurl -X PUT $SECUREHOST/main/_security -d '{ \"admins\": { \"names\": [], \"roles\": [\"admin\"]}, \"members\": { \"names\": [], \"roles\": [\"user\"]}}'\n-curl -X PUT $SECUREHOST/main/_design/auth -d \"{\\\"validate_doc_update\\\": \\\"function(newDoc, oldDoc, userCtx) { if(userCtx.roles.indexOf('_admin')!== -1 || userCtx.roles.indexOf('admin')!== -1){ if (newDoc._id.indexOf('_design') === 0) { return; }}if (newDoc._id.indexOf('_') !== -1) {var idParts=newDoc._id.split('_');if (idParts.length >= 3) { var allowedTypes=['allergy','appointment','attachment','billingLineItem','customForm','diagnosis','imaging','incCategory','incidentNote','incident','invLocation','invPurchase','invRequest','inventory','invoice','lab','lineItemDetail','lookup','medication','operationReport','operativePlan','option','overridePrice','patientNote','patient','payment','photo','priceProfile','pricing','procCharge','procedure','report','sequence','userRole','visit','vital'];if (allowedTypes.indexOf(idParts[0]) !== -1) {if (newDoc.data) {return;}}}}throw({forbidden: 'Invalid data'});}\\\"}\"\n+curl -X PUT $SECUREHOST/main/_design/auth -d \"{\\\"validate_doc_update\\\": \\\"function(newDoc, oldDoc, userCtx) { if(userCtx.roles.indexOf('_admin')!== -1 || userCtx.roles.indexOf('admin')!== -1){ if (newDoc._id.indexOf('_design') === 0) { return; }}if (newDoc._id.indexOf('_') !== -1) {var idParts=newDoc._id.split('_');if (idParts.length >= 3) { var allowedTypes=['allergy','appointment','attachment','billingLineItem','customForm','diagnosis','imaging','incCategory','incidentNote','incident','invLocation','invPurchase','invRequest','inventory','invoice','lab','lineItemDetail','lookup','medication','operationReport','operativePlan','option','overridePrice','patientNote','patient','payment','photo','priceProfile','pricing','procCharge','procedure','report','sequence','userRole','visit','vital'];if (allowedTypes.indexOf(idParts[0]) !== -1) {if(newDoc._deleted || newDoc.data) {return;}}}}throw({forbidden: 'Invalid data'});}\\\"}\"\ncurl -X PUT $SECUREHOST/_config/http/authentication_handlers -d '\"{couch_httpd_oauth, oauth_authentication_handler}, {couch_httpd_auth, proxy_authentification_handler}, {couch_httpd_auth, cookie_authentication_handler}, {couch_httpd_auth, default_authentication_handler}\"'\ncurl -X PUT $SECUREHOST/_config/couch_httpd_oauth/use_users_db -d '\"true\"'\ncurl -X PUT $SECUREHOST/_users/org.couchdb.user:hradmin -d '{\"name\": \"hradmin\", \"password\": \"test\", \"roles\": [\"System Administrator\",\"admin\",\"user\"], \"type\": \"user\", \"userPrefix\": \"p1\"}'\n"
},
{
"change_type": "MODIFY",
"old_path": "script/initcouch2.sh",
"new_path": "script/initcouch2.sh",
"diff": "@@ -23,7 +23,7 @@ echo \"Setting up HospitalRun main DB\"\ncurl -X PUT $SECUREHOST/main\ncurl -X PUT $SECUREHOST/main/_security -d '{ \"admins\": { \"names\": [], \"roles\": [\"admin\"]}, \"members\": { \"names\": [], \"roles\": [\"user\"]}}'\necho \"Configure CouchDB authentication\"\n-curl -X PUT $SECUREHOST/main/_design/auth -d \"{\\\"validate_doc_update\\\": \\\"function(newDoc, oldDoc, userCtx) { if(userCtx.roles.indexOf('_admin')!== -1 || userCtx.roles.indexOf('admin')!== -1){ if (newDoc._id.indexOf('_design') === 0) { return; }}if (newDoc._id.indexOf('_') !== -1) {var idParts=newDoc._id.split('_');if (idParts.length >= 3) { var allowedTypes=['allergy','appointment','attachment','billingLineItem','customForm','diagnosis','imaging','incCategory','incidentNote','incident','invLocation','invPurchase','invRequest','inventory','invoice','lab','lineItemDetail','lookup','medication','operationReport','operativePlan','option','overridePrice','patientNote','patient','payment','photo','priceProfile','pricing','procCharge','procedure','report','sequence','userRole','visit','vital'];if (allowedTypes.indexOf(idParts[0]) !== -1) {if (newDoc.data) {return;}}}}throw({forbidden: 'Invalid data'});}\\\"}\"\n+curl -X PUT $SECUREHOST/main/_design/auth -d \"{\\\"validate_doc_update\\\": \\\"function(newDoc, oldDoc, userCtx) { if(userCtx.roles.indexOf('_admin')!== -1 || userCtx.roles.indexOf('admin')!== -1){ if (newDoc._id.indexOf('_design') === 0) { return; }}if (newDoc._id.indexOf('_') !== -1) {var idParts=newDoc._id.split('_');if (idParts.length >= 3) { var allowedTypes=['allergy','appointment','attachment','billingLineItem','customForm','diagnosis','imaging','incCategory','incidentNote','incident','invLocation','invPurchase','invRequest','inventory','invoice','lab','lineItemDetail','lookup','medication','operationReport','operativePlan','option','overridePrice','patientNote','patient','payment','photo','priceProfile','pricing','procCharge','procedure','report','sequence','userRole','visit','vital'];if (allowedTypes.indexOf(idParts[0]) !== -1) {if(newDoc._deleted || newDoc.data) {return;}}}}throw({forbidden: 'Invalid data'});}\\\"}\"\ncurl -X PUT $SECUREHOST/_node/couchdb@localhost/_config/http/authentication_handlers -d '\"{couch_httpd_oauth, oauth_authentication_handler}, {couch_httpd_auth, proxy_authentification_handler}, {couch_httpd_auth, cookie_authentication_handler}, {couch_httpd_auth, default_authentication_handler}\"'\ncurl -X PUT $SECUREHOST/_node/couchdb@localhost/_config/couch_httpd_oauth/use_users_db -d '\"true\"'\necho \"Add hradmin user for use in HospitalRun\"\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Make sure deletes are allowed. |
288,235 | 05.04.2017 20:12:07 | -19,080 | 9f8e96e458c87bc56648aed25fa71a510effa615 | Documents for Docker-compose | [
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -68,6 +68,8 @@ To start the frontend please do the following:\n- Go to [http://localhost:4200/](http://localhost:4200/) in a browser and login with username `hradmin` and password `test`.\n## Running with Docker\n+\n+### Running With Docker Engine\nTo run HospitalRun with Docker please do the following:\n- Goto [https://docs.docker.com/engine/installation](https://docs.docker.com/engine/installation) to download and install Docker.\n- Clone the repository with the command `git clone https://github.com/HospitalRun/hospitalrun-frontend.git`.\n@@ -76,12 +78,17 @@ To run HospitalRun with Docker please do the following:\n- Execute `docker run -it --name couchdb -d couchdb` to create the couchdb container.\n- Execute `docker run -it --name hospitalrun-frontend -p 4200:4200 --link couchdb:couchdb -d hospitalrun-frontend` to create the HospitalRun container.\n+### Running with Docker Compose\n+To run HospitalRun with Docker-compose please do the following:\n+- Go to [https://docs.docker.com/compose/install](https://docs.docker.com/compose/install/) to install Docker-compose\n+- Execute 'docker-compose up' to reduce the steps to build and run the application.\n+\n### Accessing HospitalRun with Docker Toolbox\nIf you are running with Docker Toolbox you will have to run the following commands to get the IP of the docker machine where hospitalrun-frontend is running with the following:\n- Run the following command to get the ip of the docker machine that the image was created on `docker-machine ip default`.\n- Go to `http://<docker-machine ip>:4200` in a browser and login with username `hradmin` and password `test`.\n-### Accessing HospitalRun with Docker\n+### Accessing HospitalRun with Docker or Docker-compose\nIf you are not running with docker toolbox please do the following:\n- Go to `http://localhost:4200` in a browser and login with username `hradmin` and password `test`.\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Documents for Docker-compose (#1043) |
288,284 | 05.04.2017 13:18:42 | 14,400 | 3e0b0cbbcf6130b0b147fd19ed5bc14c30cf2c0b | Fix for system admin role test that was failing. | [
{
"change_type": "MODIFY",
"old_path": "tests/acceptance/role-test.js",
"new_path": "tests/acceptance/role-test.js",
"diff": "@@ -57,7 +57,7 @@ test('visiting /admin/roles', function(assert) {\n});\nPREDEFINED_USER_ROLES.forEach((role) => {\n- if (role.name !== 'User Administrator') {\n+ if (role.defaultRoute && role.name !== 'User Administrator') {\ntest(`Testing User Role homescreen for ${role.name}`, (assert) =>{\nrunWithPouchDump('default', () => {\nauthenticateUser({\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Fix for system admin role test that was failing. |
288,376 | 06.04.2017 16:37:23 | 14,400 | b2387b26ac0416bd79819f5fb5dec956c21c0824 | Change the dashboard to include a special welcome for electron app | [
{
"change_type": "MODIFY",
"old_path": "app/controllers/index.js",
"new_path": "app/controllers/index.js",
"diff": "import Ember from 'ember';\nimport UserSession from 'hospitalrun/mixins/user-session';\n+\n+const {\n+ computed,\n+ computed: {\n+ alias\n+ },\n+ get,\n+ inject\n+} = Ember;\nexport default Ember.Controller.extend(UserSession, {\n+ config: Ember.inject.service(),\n+ standAlone: alias('config.standAlone'),\n+\n+ needsUserSetup: computed(function() {\n+ return get(this, 'config').needsUserSetup();\n+ }).volatile(),\nactions: {\nnewUser() {\nthis.send('createNewUser');\n"
},
{
"change_type": "MODIFY",
"old_path": "app/locales/en/translations.js",
"new_path": "app/locales/en/translations.js",
"diff": "export default {\ndashboard: {\ntitle: 'Welcome to HospitalRun!',\n- setup: 'You need to setup a User.'\n+ needs_user_setup: 'We recommend that you setup a User account.',\n+ standalone_welcome: '<h4>Thanks for downloading HospitalRun</h4><p>You are running HospitalRun in stand alone mode. This mode allows you to support multiple users on a single, desktop/laptop instance of HospitalRun. This is ideal for:</p><ul><li>Evaluating HospitalRun for an eventual server deployment.</li><li>Using the platform to support a clinic / facility where a single instance is sufficient.</li></ul><p>If you\\'re considering a multi-device deployment of HospitalRun, we\\'re <a href=\"https://github.com/HospitalRun/hospitalrun-frontend/issues/1048\" target=\"_blank\">working on features</a> that will allow you to \"graduate\" from this single instance into a traditional cloud / server-based deployment.</p>'\n},\nerrors: {\ninclusion: 'is not included in the list',\n"
},
{
"change_type": "MODIFY",
"old_path": "app/routes/index.js",
"new_path": "app/routes/index.js",
"diff": "@@ -5,7 +5,6 @@ import Ember from 'ember';\nconst { inject, isEmpty } = Ember;\nexport default Ember.Route.extend(AuthenticatedRouteMixin, Navigation, UserRoles, {\n- config: inject.service(),\nsession: inject.service(),\nbeforeModel() {\nlet session = this.get('session');\n@@ -25,10 +24,6 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, Navigation, UserRoles\nreturn this._super(...arguments);\n},\n- model() {\n- return this.get('config');\n- },\n-\nafterModel() {\nthis.controllerFor('navigation').set('allowSearch', false);\n},\n"
},
{
"change_type": "MODIFY",
"old_path": "app/services/config.js",
"new_path": "app/services/config.js",
"diff": "@@ -8,16 +8,20 @@ export default Ember.Service.extend({\nsession: inject.service(),\nsessionData: Ember.computed.alias('session.data'),\nstandAlone: false,\n- userSetupFlag: true,\n-\n- needsSetup() {\n- return this.get('userSetupFlag');\n+ needsUserSetup() {\n+ return this.getConfigValue('user_setup_flag', true);\n},\n-\n- markSetupComplete() {\n- this.set('userSetupFlag', false);\n+ markUserSetupComplete() {\n+ let config = this.get('configDB');\n+ return new Ember.RSVP.Promise(function(resolve, reject) {\n+ config.put({ _id: 'config_user_setup_flag', value: false }, function(err, doc) {\n+ if (err) {\n+ reject(err);\n+ }\n+ resolve(doc);\n+ });\n+ });\n},\n-\nsetup() {\nlet replicateConfigDB = this.replicateConfigDB.bind(this);\nlet loadConfig = this.loadConfig.bind(this);\n@@ -33,7 +37,6 @@ export default Ember.Service.extend({\nreturn loadConfig();\n}\n},\n-\ncreateDB() {\nreturn new PouchDB('config');\n},\n"
},
{
"change_type": "MODIFY",
"old_path": "app/templates/index.hbs",
"new_path": "app/templates/index.hbs",
"diff": "<section class=\"view index\">\n-\n<div class=\"view-top-bar\">\n<h1 class=\"view-current-title\">{{t \"dashboard.title\" }}</h1>\n</div>\n- {{#if model.userSetupFlag}}\n+ {{#if standAlone }}\n<div class=\"panel-body\">\n- <p>{{t \"dashboard.setup\"}}</p>\n+ {{t \"dashboard.standalone_welcome\" }}\n+ {{#if needsUserSetup }}\n+ <p>{{t \"dashboard.needs_user_setup\"}}</p>\n<button type=\"button\" class=\"btn btn-primary align-left\" {{action \"newUser\" }}>\n<span class=\"octicon octicon-plus\"></span> {{t 'buttons.newUser'}}\n</button>\n+ {{/if}}\n</div>\n{{/if}}\n</section>\n"
},
{
"change_type": "MODIFY",
"old_path": "app/users/index/controller.js",
"new_path": "app/users/index/controller.js",
"diff": "import AbstractPagedController from 'hospitalrun/controllers/abstract-paged-controller';\nimport UserSession from 'hospitalrun/mixins/user-session';\n+import Ember from 'ember';\nexport default AbstractPagedController.extend(UserSession, {\naddPermission: 'add_user',\n+ config: Ember.inject.service(),\ndeletePermission: 'delete_user',\n+ init() {\n+ let user = this.get('model');\n+ if (!Ember.isEmpty(user)) {\n+ this.get('config').markUserSetupComplete();\n+ }\n+ },\nsortProperties: ['displayName']\n-\n});\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Change the dashboard to include a special welcome for electron app |
288,376 | 07.04.2017 12:03:07 | 14,400 | 7378b739e24718ff5d52664a01115eaa0de53eb9 | simplifying the controller | [
{
"change_type": "MODIFY",
"old_path": "app/controllers/index.js",
"new_path": "app/controllers/index.js",
"diff": "@@ -2,20 +2,15 @@ import Ember from 'ember';\nimport UserSession from 'hospitalrun/mixins/user-session';\nconst {\n- computed,\ncomputed: {\nalias\n},\n- get,\ninject\n} = Ember;\nexport default Ember.Controller.extend(UserSession, {\n- config: Ember.inject.service(),\n+ config: inject.service(),\nstandAlone: alias('config.standAlone'),\n-\n- needsUserSetup: computed(function() {\n- return get(this, 'config').needsUserSetup();\n- }).volatile(),\n+ needsUserSetup: alias('config.needsUserSetup'),\nactions: {\nnewUser() {\nthis.send('createNewUser');\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | simplifying the controller |
288,376 | 07.04.2017 13:44:21 | 14,400 | d31c164945520576281b9dcf6e6f18f6a8bc95ca | simplifying the route | [
{
"change_type": "MODIFY",
"old_path": "app/users/index/route.js",
"new_path": "app/users/index/route.js",
"diff": "import AbstractIndexRoute from 'hospitalrun/routes/abstract-index-route';\nimport UserSession from 'hospitalrun/mixins/user-session';\nimport { translationMacro as t } from 'ember-i18n';\n+import Ember from 'ember';\n+const {\n+ inject\n+} = Ember;\nexport default AbstractIndexRoute.extend(UserSession, {\n+ config: inject.service(),\nnewButtonAction: function() {\nif (this.currentUserCan('add_user')) {\nreturn 'newItem';\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | simplifying the route |
288,376 | 07.04.2017 13:44:36 | 14,400 | ca94cab666c3080a7b39a940bdb395e15aac6147 | simplify the controller | [
{
"change_type": "MODIFY",
"old_path": "app/users/index/controller.js",
"new_path": "app/users/index/controller.js",
"diff": "@@ -3,13 +3,6 @@ import UserSession from 'hospitalrun/mixins/user-session';\nimport Ember from 'ember';\nexport default AbstractPagedController.extend(UserSession, {\naddPermission: 'add_user',\n- config: Ember.inject.service(),\ndeletePermission: 'delete_user',\n- init() {\n- let user = this.get('model');\n- if (!Ember.isEmpty(user)) {\n- this.get('config').markUserSetupComplete();\n- }\n- },\nsortProperties: ['displayName']\n});\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | simplify the controller |
288,376 | 07.04.2017 13:45:00 | 14,400 | fc596d74051e20f509ca952660f87002678c460a | markUserSetupComplete on save | [
{
"change_type": "MODIFY",
"old_path": "app/users/edit/controller.js",
"new_path": "app/users/edit/controller.js",
"diff": "@@ -44,12 +44,13 @@ export default AbstractEditController.extend(UserRoles, {\nupdateModel.set('userPrefix', prefix);\n}\nupdateModel.save().then(() => {\n- this.get('config').markSetupComplete();\n+ this.get('config').markUserSetupComplete().then(() => {\nthis.displayAlert(get(this, 'i18n').t('messages.userSaved'), get(this, 'i18n').t('messages.userHasBeenSaved'));\nlet editTitle = get(this, 'i18n').t('labels.editUser');\nlet sectionDetails = {};\nsectionDetails.currentScreenTitle = editTitle;\nthis.send('setSectionHeader', sectionDetails);\n+ });\n}).catch((error) => {\nthis._handleError(error);\n});\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | markUserSetupComplete on save |
288,376 | 07.04.2017 13:45:28 | 14,400 | b84929c476549809c09abcadf131357244f5d73c | move the logic for needsUserSetup into the config load process | [
{
"change_type": "MODIFY",
"old_path": "app/services/config.js",
"new_path": "app/services/config.js",
"diff": "@@ -8,10 +8,9 @@ export default Ember.Service.extend({\nsession: inject.service(),\nsessionData: Ember.computed.alias('session.data'),\nstandAlone: false,\n- needsUserSetup() {\n- return this.getConfigValue('user_setup_flag', true);\n- },\n+ needsUserSetup: true,\nmarkUserSetupComplete() {\n+ this.set('needsUserSetup', false);\nlet config = this.get('configDB');\nreturn new Ember.RSVP.Promise(function(resolve, reject) {\nconfig.put({ _id: 'config_user_setup_flag', value: false }, function(err, doc) {\n@@ -34,7 +33,22 @@ export default Ember.Service.extend({\nif (this.get('standAlone') === false) {\nreturn replicateConfigDB(db).then(loadConfig);\n} else {\n- return loadConfig();\n+ return loadConfig().then(function(configObj) {\n+ if (configObj.config_user_setup_flag === false) {\n+ get(this, 'database').usersDB.allDocs().then((results) => {\n+ if (results.total_rows > 1) {\n+ this.set('needsUserSetup', false);\n+ }\n+ return new Ember.RSVP.Promise(function(resolve) {\n+ resolve(configObj);\n+ });\n+ });\n+ } else {\n+ return new Ember.RSVP.Promise(function(resolve) {\n+ resolve(configObj);\n+ });\n+ }\n+ });\n}\n},\ncreateDB() {\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | move the logic for needsUserSetup into the config load process |
288,284 | 07.04.2017 14:52:20 | 14,400 | 0dc0c2dd406883253f4c1f1c8343196eccec9127 | Removed nitrous file since that is no longer available | [
{
"change_type": "DELETE",
"old_path": "nitrous.json",
"new_path": null,
"diff": "-{\n- \"template\": \"ruby\",\n- \"ports\": [4200],\n- \"name\": \"HospitalRun\",\n- \"description\": \"Ember front end for HospitalRun\",\n- \"scripts\": {\n- \"post-create\": \"sudo apt-get install -y couchdb && echo 'running npm install - this might take awhile...' && npm install -g ember-cli@latest && npm install -g bower && bower install && script/bootstrap && ./script/initcouch.sh && cp server/config-example.js server/config.js\",\n- \"Start HospitalRun\": \"cd ~/code/hospitalrun-frontend && npm start\"\n- }\n-}\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Removed nitrous file since that is no longer available |
288,284 | 07.04.2017 15:00:04 | 14,400 | a90c2d062489cd549694ea6a11a67b7d431610c6 | Updated references to Node 6.x and CouchDB 2.x | [
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -3,7 +3,7 @@ HospitalRun frontend\n_Ember frontend for HospitalRun_\n-[](https://travis-ci.org/HospitalRun/hospitalrun-frontend) [](http://couchdb.apache.org/)\n+[](https://travis-ci.org/HospitalRun/hospitalrun-frontend) [](http://couchdb.apache.org/)\nTo run the development environment for this frontend you will need to have [Git](https://git-scm.com/), [Node.js](https://nodejs.org), [Ember CLI](http://ember-cli.com/), [Bower](http://bower.io/), and [CouchDB](http://couchdb.apache.org/) installed.\n@@ -31,8 +31,7 @@ Contributions are welcome via pull requests and issues. Please see our [contrib\nTo install the frontend please do the following:\n1. Make sure you have installed [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)\n-2. Make sure you have installed [Node.js](https://nodejs.org/en/download/). Versions after 0.10.0 should work, but please note if you encounter errors using 5.x it may be necessary to upgrade your npm version. Versions after 3.5.x should work:\n- 1. `npm install -g npm`\n+2. Make sure you have installed [Node.js](https://nodejs.org/en/download/). Versions 6.0.0 and higher should work\n3. Install [ember-cli latest](https://www.npmjs.org/package/ember-cli): `npm install -g ember-cli@latest`.\nDepending on your [npm permissions](https://docs.npmjs.com/getting-started/fixing-npm-permissions) you might need root access to install ember-cli.\n4. Install [bower](https://www.npmjs.org/package/bower): `npm install -g bower`\n@@ -50,9 +49,10 @@ To install the frontend please do the following:\n1. If you are running CouchDB 1.x\n1. If you have just installed CouchDB and have no admin user, please run `./script/initcouch.sh` in the folder you cloned the HospitalRun repo. A user `hradmin` will be created with password: `test`.\n2. If you already have a CouchDB admin user, please run `./script/initcouch.sh USER PASS` in the folder you cloned the HospitalRun repo. `USER` and `PASS` are the CouchDB admin user credentials.\n- 2. If you are running CouchDB 2.x\n- 1. If you have just installed CouchDB and have no admin user, please run `./script/initcouch2.sh` in the folder you cloned the HospitalRun repo. A user `hradmin` will be created with password: `test`.\n- 2. If you already have a CouchDB admin user, please run `./script/initcouch2.sh USER PASS` in the folder you cloned the HospitalRun repo. `USER` and `PASS` are the CouchDB admin user credentials.\n+ 2. If you are running CouchDB 2.x (experimental)\n+ 1. HospitalRun currently does not fully support CouchDB 2.x, but you are welcome to try using it. Most functionality should work but currently creating and/or editing users does not work in CouchDB 2.x. See https://github.com/HospitalRun/hospitalrun-frontend/issues/953 for more details.\n+ 2. If you have just installed CouchDB and have no admin user, please run `./script/initcouch2.sh` in the folder you cloned the HospitalRun repo. A user `hradmin` will be created with password: `test`.\n+ 3. If you already have a CouchDB admin user, please run `./script/initcouch2.sh USER PASS` in the folder you cloned the HospitalRun repo. `USER` and `PASS` are the CouchDB admin user credentials.\n7. Copy the `server/config-example.js` to `server/config.js` in the folder you cloned the HospitalRun repo. If you already had a CouchDB admin user that you passed into the couch script (`./script/initcouch.sh USER PASS`), then you will need to modify the `couchAdminUser` and `couchAdminPassword` values in `server/config.js` to reflect those credentials. (*Note: If on Mac, you need to make sure CouchDB can be run. See [How to open an app from a unidentified developer and exempt it from Gatekeeper](https://support.apple.com/en-us/HT202491).*)\n8. Verify that CouchDB is running by visiting: http://127.0.0.1:5984/_utils/#login\nand logging in with the with the credentials you just created from steps 6 and 7.\n"
},
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "\"url\": \"[email protected]:HospitalRun/hospitalrun-frontend\"\n},\n\"engines\": {\n- \"node\": \">= 4\"\n+ \"node\": \">= 6\"\n},\n\"author\": \"John Kleinschmidt\",\n\"contributors\": [\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Updated references to Node 6.x and CouchDB 2.x |
288,376 | 07.04.2017 16:20:51 | 14,400 | 13d9b40ef5265a341e3b08f1077750b006bef0d0 | Getting the config user setup logic working | [
{
"change_type": "MODIFY",
"old_path": "app/services/config.js",
"new_path": "app/services/config.js",
"diff": "import Ember from 'ember';\n-const { inject, run } = Ember;\n+const { inject, run, get, set } = Ember;\nexport default Ember.Service.extend({\nconfigDB: null,\n@@ -10,7 +10,8 @@ export default Ember.Service.extend({\nstandAlone: false,\nneedsUserSetup: true,\nmarkUserSetupComplete() {\n- this.set('needsUserSetup', false);\n+ if (get(this, 'needsUserSetup') === true) {\n+ set(this, 'needsUserSetup', false);\nlet config = this.get('configDB');\nreturn new Ember.RSVP.Promise(function(resolve, reject) {\nconfig.put({ _id: 'config_user_setup_flag', value: false }, function(err, doc) {\n@@ -20,6 +21,9 @@ export default Ember.Service.extend({\nresolve(doc);\n});\n});\n+ } else {\n+ return Promise.resolve(true);\n+ }\n},\nsetup() {\nlet replicateConfigDB = this.replicateConfigDB.bind(this);\n@@ -34,20 +38,14 @@ export default Ember.Service.extend({\nreturn replicateConfigDB(db).then(loadConfig);\n} else {\nreturn loadConfig().then(function(configObj) {\n- if (configObj.config_user_setup_flag === false) {\nget(this, 'database').usersDB.allDocs().then((results) => {\n- if (results.total_rows > 1) {\n- this.set('needsUserSetup', false);\n+ if (results.total_rows <= 1) {\n+ set(this, 'needsUserSetup', true);\n}\nreturn new Ember.RSVP.Promise(function(resolve) {\nresolve(configObj);\n});\n});\n- } else {\n- return new Ember.RSVP.Promise(function(resolve) {\n- resolve(configObj);\n- });\n- }\n});\n}\n},\n"
},
{
"change_type": "MODIFY",
"old_path": "app/users/edit/controller.js",
"new_path": "app/users/edit/controller.js",
"diff": "@@ -44,13 +44,12 @@ export default AbstractEditController.extend(UserRoles, {\nupdateModel.set('userPrefix', prefix);\n}\nupdateModel.save().then(() => {\n- this.get('config').markUserSetupComplete().then(() => {\nthis.displayAlert(get(this, 'i18n').t('messages.userSaved'), get(this, 'i18n').t('messages.userHasBeenSaved'));\nlet editTitle = get(this, 'i18n').t('labels.editUser');\nlet sectionDetails = {};\nsectionDetails.currentScreenTitle = editTitle;\nthis.send('setSectionHeader', sectionDetails);\n- });\n+ get(this, 'config').markUserSetupComplete();\n}).catch((error) => {\nthis._handleError(error);\n});\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Getting the config user setup logic working |
288,376 | 07.04.2017 16:39:19 | 14,400 | fae8ea2b0f0fb2c1bdb1d6326bcf84dca3b65620 | getting autoupdated stubbed out | [
{
"change_type": "MODIFY",
"old_path": "app/controllers/index.js",
"new_path": "app/controllers/index.js",
"diff": "import Ember from 'ember';\nimport UserSession from 'hospitalrun/mixins/user-session';\n-\nconst {\ncomputed: {\nalias\n},\n- inject\n+ inject,\n+ get,\n+ set\n} = Ember;\nexport default Ember.Controller.extend(UserSession, {\nconfig: inject.service(),\n+ database: inject.service(),\nstandAlone: alias('config.standAlone'),\nneedsUserSetup: alias('config.needsUserSetup'),\n+ // on init, look up the list of users and determine if there's a need for a needsUserSetup msg\n+ init() {\n+ get(this, 'database.usersDB').allDocs().then((results) => {\n+ if (results.total_rows <= 1) {\n+ set(this, 'config.needsUserSetup', true);\n+ }\n+ });\n+ },\nactions: {\nnewUser() {\nthis.send('createNewUser');\n"
},
{
"change_type": "MODIFY",
"old_path": "app/services/config.js",
"new_path": "app/services/config.js",
"diff": "@@ -8,7 +8,7 @@ export default Ember.Service.extend({\nsession: inject.service(),\nsessionData: Ember.computed.alias('session.data'),\nstandAlone: false,\n- needsUserSetup: true,\n+ needsUserSetup: false,\nmarkUserSetupComplete() {\nif (get(this, 'needsUserSetup') === true) {\nset(this, 'needsUserSetup', false);\n@@ -37,16 +37,7 @@ export default Ember.Service.extend({\nif (this.get('standAlone') === false) {\nreturn replicateConfigDB(db).then(loadConfig);\n} else {\n- return loadConfig().then(function(configObj) {\n- get(this, 'database').usersDB.allDocs().then((results) => {\n- if (results.total_rows <= 1) {\n- set(this, 'needsUserSetup', true);\n- }\n- return new Ember.RSVP.Promise(function(resolve) {\n- resolve(configObj);\n- });\n- });\n- });\n+ return loadConfig();\n}\n},\ncreateDB() {\n"
},
{
"change_type": "MODIFY",
"old_path": "app/users/index/controller.js",
"new_path": "app/users/index/controller.js",
"diff": "import AbstractPagedController from 'hospitalrun/controllers/abstract-paged-controller';\nimport UserSession from 'hospitalrun/mixins/user-session';\n-import Ember from 'ember';\nexport default AbstractPagedController.extend(UserSession, {\naddPermission: 'add_user',\ndeletePermission: 'delete_user',\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "auto-updater.js",
"diff": "+const app = require('electron').app;\n+const autoUpdater = require('electron').autoUpdater;\n+const ChildProcess = require('child_process');\n+const Menu = require('electron').Menu;\n+const path = require('path');\n+\n+var state = 'checking';\n+\n+exports.initialize = function () {\n+ if (process.mas) return;\n+\n+ autoUpdater.on('checking-for-update', function () {\n+ state = 'checking';\n+ exports.updateMenu();\n+ });\n+\n+ autoUpdater.on('update-available', function () {\n+ state = 'checking';\n+ exports.updateMenu();\n+ });\n+\n+ autoUpdater.on('update-downloaded', function () {\n+ state = 'installed';\n+ exports.updateMenu();\n+ });\n+\n+ autoUpdater.on('update-not-available', function () {\n+ state = 'no-update';\n+ exports.updateMenu();\n+ });\n+\n+ autoUpdater.on('error', function () {\n+ state = 'no-update';\n+ exports.updateMenu();\n+ });\n+\n+ //autoUpdater.setFeedURL(`https://release.hospitalrun.io/updates?version=${app.getVersion()}`);\n+ autoUpdater.setFeedURL(`http://localhost:5006/updates?version=${app.getVersion()}`);\n+ autoUpdater.checkForUpdates();\n+}\n+\n+exports.updateMenu = function () {\n+ if (process.mas) return;\n+\n+ var menu = Menu.getApplicationMenu();\n+ if (!menu) return;\n+\n+ menu.items.forEach(function (item) {\n+ if (item.submenu) {\n+ item.submenu.items.forEach(function (item) {\n+ switch (item.key) {\n+ case 'checkForUpdate':\n+ item.visible = state === 'no-update';\n+ break;\n+ case 'checkingForUpdate':\n+ item.visible = state === 'checking';\n+ break;\n+ case 'restartToUpdate':\n+ item.visible = state === 'installed';\n+ break;\n+ }\n+ })\n+ }\n+ });\n+}\n+\n+exports.createShortcut = function (callback) {\n+ spawnUpdate([\n+ '--createShortcut',\n+ path.basename(process.execPath),\n+ '--shortcut-locations',\n+ 'StartMenu'\n+ ], callback);\n+}\n+\n+exports.removeShortcut = function (callback) {\n+ spawnUpdate([\n+ '--removeShortcut',\n+ path.basename(process.execPath)\n+ ], callback);\n+}\n+\n+function spawnUpdate (args, callback) {\n+ var updateExe = path.resolve(path.dirname(process.execPath), '..', 'Update.exe');\n+ var stdout = '';\n+ var spawned = null;\n+\n+ try {\n+ spawned = ChildProcess.spawn(updateExe, args);\n+ } catch (error) {\n+ if (error && error.stdout == null) error.stdout = stdout\n+ process.nextTick(function () { callback(error) });\n+ return;\n+ }\n+\n+ var error = null;\n+\n+ spawned.stdout.on('data', function (data) { stdout += data });\n+\n+ spawned.on('error', function (processError) {\n+ if (!error) error = processError;\n+ });\n+\n+ spawned.on('close', function (code, signal) {\n+ if (!error && code !== 0) {\n+ error = new Error('Command failed: ' + code + ' ' + signal);\n+ }\n+ if (error && error.code == null) error.code = code;\n+ if (error && error.stdout == null) error.stdout = stdout;\n+ callback(error);\n+ });\n+}\n"
},
{
"change_type": "MODIFY",
"old_path": "electron.js",
"new_path": "electron.js",
"diff": "/* eslint-env node */\n'use strict';\n-const updater = require('electron-simple-updater');\n-updater.init('http://hospitalrun.io/releases/updates.js');\n-\nconst electron = require('electron');\nconst path = require('path');\nconst { app, BrowserWindow } = electron;\nconst dirname = __dirname || path.resolve(path.dirname());\nconst emberAppLocation = `file://${dirname}/dist/index.html`;\n+const autoUpdater = require('./auto-updater.js');\n+const debug = /--debug/.test(process.argv[2]);\nlet mainWindow = null;\n-// Uncomment the lines below to enable Electron's crash reporter\n-// For more information, see http://electron.atom.io/docs/api/crash-reporter/\n+function initialize () {\n+ var shouldQuit = makeSingleInstance();\n+ if (shouldQuit) return app.quit();\n-// electron.crashReporter.start({\n-// productName: 'YourName',\n-// companyName: 'YourCompany',\n-// submitURL: 'https://your-domain.com/url-to-submit',\n-// autoSubmit: true\n-// });\n+ function createWindow () {\n+ var windowOptions = {\n+ width: 1080,\n+ minWidth: 680,\n+ height: 840\n+ }\n-app.on('window-all-closed', function onWindowAllClosed() {\n- if (process.platform !== 'darwin') {\n- app.quit();\n+ if (process.platform === 'linux') {\n+ windowOptions.icon = path.join(__dirname, '/assets/app-icon/png/512.png')\n}\n-});\n-app.on('ready', function onReady() {\n- mainWindow = new BrowserWindow({\n- width: 1000,\n- height: 750\n- });\n+ mainWindow = new BrowserWindow(windowOptions);\n+ mainWindow.loadURL(emberAppLocation);\n- delete mainWindow.module;\n+ // Launch fullscreen with DevTools open, usage: npm run debug\n+ if (debug) {\n+ mainWindow.webContents.openDevTools();\n+ mainWindow.maximize();\n+ require('devtron').install();\n+ }\n- // If you want to open up dev tools programmatically, call\n- // mainWindow.openDevTools();\n+ mainWindow.on('closed', function () {\n+ mainWindow = null;\n+ });\n- // By default, we'll open the Ember App by directly going to the\n- // file system.\n- //\n- // Please ensure that you have set the locationType option in the\n- // config/environment.js file to 'hash'. For more information,\n- // please consult the ember-electron readme.\n- mainWindow.loadURL(emberAppLocation);\n+ // here\n// If a loading operation goes wrong, we'll send Electron back to\n// Ember App entry point\n@@ -67,10 +62,6 @@ app.on('ready', function onReady() {\nconsole.log('The main window has become responsive again.');\n});\n- mainWindow.on('closed', () => {\n- mainWindow = null;\n- });\n-\n// Handle an unhandled error in the main thread\n//\n// Note that 'uncaughtException' is a crude mechanism for exception handling intended to\n@@ -91,4 +82,56 @@ app.on('ready', function onReady() {\nconsole.log('This is a serious issue that needs to be handled and/or debugged.');\nconsole.log(`Exception: ${err}`);\n});\n+ }\n+\n+ app.on('ready', function () {\n+ createWindow();\n+ autoUpdater.initialize();\n});\n+\n+ app.on('window-all-closed', function () {\n+ if (process.platform !== 'darwin') {\n+ app.quit();\n+ }\n+ });\n+\n+ app.on('activate', function () {\n+ if (mainWindow === null) {\n+ createWindow();\n+ }\n+ });\n+}\n+\n+// Make this app a single instance app.\n+//\n+// The main window will be restored and focused instead of a second window\n+// opened when a person attempts to launch a second instance.\n+//\n+// Returns true if the current version of the app should quit instead of\n+// launching.\n+function makeSingleInstance () {\n+ if (process.mas) return false;\n+\n+ return app.makeSingleInstance(function () {\n+ if (mainWindow) {\n+ if (mainWindow.isMinimized()) mainWindow.restore();\n+ mainWindow.focus();\n+ }\n+ });\n+}\n+\n+// Handle Squirrel on Windows startup events\n+switch (process.argv[1]) {\n+ case '--squirrel-install':\n+ autoUpdater.createShortcut(function () { app.quit() });\n+ break\n+ case '--squirrel-uninstall':\n+ autoUpdater.removeShortcut(function () { app.quit() });\n+ break\n+ case '--squirrel-obsolete':\n+ case '--squirrel-updated':\n+ app.quit();\n+ break\n+ default:\n+ initialize();\n+}\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | getting autoupdated stubbed out |
288,376 | 07.04.2017 23:06:16 | 14,400 | e45b558f044c952f58bdb55950ace91203d684a9 | electron build auto-updater | [
{
"change_type": "MODIFY",
"old_path": "electron.js",
"new_path": "electron.js",
"diff": "@@ -7,7 +7,7 @@ const path = require('path');\nconst { app, BrowserWindow } = electron;\nconst dirname = __dirname || path.resolve(path.dirname());\nconst emberAppLocation = `file://${dirname}/dist/index.html`;\n-const autoUpdater = require('./auto-updater.js');\n+const autoUpdater = require('./auto-updater');\nconst debug = /--debug/.test(process.argv[2]);\nlet mainWindow = null;\n"
},
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "\"WHAT IS THIS?\": \"Please see the README.md\",\n\"copy-files\": [\n\"electron.js\",\n+ \"auto-updater.js\",\n\"package.json\"\n],\n\"name\": \"HospitalRun\",\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | electron build auto-updater |
288,376 | 08.04.2017 11:45:13 | 14,400 | 251ba966c51d0900417201684553c6a50071393c | updated listing rules
you cool with these? | [
{
"change_type": "MODIFY",
"old_path": ".eslintrc.js",
"new_path": ".eslintrc.js",
"diff": "@@ -29,8 +29,12 @@ module.exports = {\nrules: {\n'camelcase': 0,\n+ \"brace-style\": [ \"warn\", \"1tbs\", { \"allowSingleLine\": true } ],\n'ember-suave/no-direct-property-access': 0,\n'ember-suave/require-access-in-comments': 0,\n- 'no-console': 0\n+ 'max-statements-per-line': [\"error\", { \"max\": 3 }],\n+ 'no-console': 0,\n+ 'no-var': \"warn\",\n+ 'no-undef': \"warn\"\n}\n};\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | updated listing rules
@jkleinsc you cool with these? |
288,376 | 08.04.2017 13:27:39 | 14,400 | 6d57fe08bb78aa7b6afce9df9aaaaec1f4774d5c | listing corrections in the auto update code | [
{
"change_type": "MODIFY",
"old_path": "auto-updater.js",
"new_path": "auto-updater.js",
"diff": "-const app = require('electron').app;\n-const autoUpdater = require('electron').autoUpdater;\n+/* global exports, process, require */\n+/* env: \"node\" */\n+const electron = require('electron');\nconst ChildProcess = require('child_process');\n-const Menu = require('electron').Menu;\nconst path = require('path');\n+const { app, Menu, autoUpdater } = electron;\n-var state = 'checking';\n+let state = 'checking';\nexports.initialize = function() {\n- if (process.mas) return;\n+ if (process.mas) { return; }\nautoUpdater.on('checking-for-update', function() {\nstate = 'checking';\n@@ -35,15 +36,15 @@ exports.initialize = function () {\n});\n// autoUpdater.setFeedURL(`https://release.hospitalrun.io/updates?version=${app.getVersion()}`);\n- autoUpdater.setFeedURL(`http://localhost:5006/updates?version=${app.getVersion()}`);\n+ autoUpdater.setFeedURL(`https://releases.hospitalrun.io:5006/updates?version=${app.getVersion()}`);\nautoUpdater.checkForUpdates();\n-}\n+};\nexports.updateMenu = function() {\n- if (process.mas) return;\n+ if (process.mas) { return; }\n- var menu = Menu.getApplicationMenu();\n- if (!menu) return;\n+ let menu = Menu.getApplicationMenu();\n+ if (!menu) { return; }\nmenu.items.forEach(function(item) {\nif (item.submenu) {\n@@ -59,10 +60,10 @@ exports.updateMenu = function () {\nitem.visible = state === 'installed';\nbreak;\n}\n- })\n- }\n});\n}\n+ });\n+};\nexports.createShortcut = function(callback) {\nspawnUpdate([\n@@ -71,42 +72,44 @@ exports.createShortcut = function (callback) {\n'--shortcut-locations',\n'StartMenu'\n], callback);\n-}\n+};\nexports.removeShortcut = function(callback) {\nspawnUpdate([\n'--removeShortcut',\npath.basename(process.execPath)\n], callback);\n-}\n+};\nfunction spawnUpdate(args, callback) {\n- var updateExe = path.resolve(path.dirname(process.execPath), '..', 'Update.exe');\n- var stdout = '';\n- var spawned = null;\n+ let updateExe = path.resolve(path.dirname(process.execPath), '..', 'Update.exe');\n+ let stdout = '';\n+ let spawned = null;\ntry {\nspawned = ChildProcess.spawn(updateExe, args);\n} catch(error) {\n- if (error && error.stdout == null) error.stdout = stdout\n- process.nextTick(function () { callback(error) });\n+ if (error && error.stdout == null) { error.stdout = stdout; }\n+ process.nextTick(function() { callback(error); });\nreturn;\n}\n- var error = null;\n+ let error = null;\n- spawned.stdout.on('data', function (data) { stdout += data });\n+ spawned.stdout.on('data', function(data) { stdout += data; });\nspawned.on('error', function(processError) {\n- if (!error) error = processError;\n+ if (!error) {\n+ error = processError;\n+ }\n});\nspawned.on('close', function(code, signal) {\nif (!error && code !== 0) {\n- error = new Error('Command failed: ' + code + ' ' + signal);\n+ error = new Error(`Command failed: ${code} ${signal}`);\n}\n- if (error && error.code == null) error.code = code;\n- if (error && error.stdout == null) error.stdout = stdout;\n+ if (error && error.code == null) { error.code = code; }\n+ if (error && error.stdout == null) { error.stdout = stdout; }\ncallback(error);\n});\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "electron.js",
"new_path": "electron.js",
"diff": "@@ -13,18 +13,20 @@ const debug = /--debug/.test(process.argv[2]);\nlet mainWindow = null;\nfunction initialize() {\n- var shouldQuit = makeSingleInstance();\n- if (shouldQuit) return app.quit();\n+ let shouldQuit = makeSingleInstance();\n+ if (shouldQuit) {\n+ return app.quit();\n+ }\nfunction createWindow() {\n- var windowOptions = {\n+ let windowOptions = {\nwidth: 1080,\nminWidth: 680,\nheight: 840\n- }\n+ };\nif (process.platform === 'linux') {\n- windowOptions.icon = path.join(__dirname, '/assets/app-icon/png/512.png')\n+ windowOptions.icon = path.join(__dirname, '/assets/app-icon/png/512.png');\n}\nmainWindow = new BrowserWindow(windowOptions);\n@@ -110,11 +112,15 @@ function initialize () {\n// Returns true if the current version of the app should quit instead of\n// launching.\nfunction makeSingleInstance() {\n- if (process.mas) return false;\n+ if (process.mas) {\n+ return false;\n+ }\nreturn app.makeSingleInstance(function() {\nif (mainWindow) {\n- if (mainWindow.isMinimized()) mainWindow.restore();\n+ if (mainWindow.isMinimized()) {\n+ mainWindow.restore();\n+ }\nmainWindow.focus();\n}\n});\n@@ -123,15 +129,15 @@ function makeSingleInstance () {\n// Handle Squirrel on Windows startup events\nswitch (process.argv[1]) {\ncase '--squirrel-install':\n- autoUpdater.createShortcut(function () { app.quit() });\n- break\n+ autoUpdater.createShortcut(function() { app.quit(); });\n+ break;\ncase '--squirrel-uninstall':\n- autoUpdater.removeShortcut(function () { app.quit() });\n- break\n+ autoUpdater.removeShortcut(function() { app.quit(); });\n+ break;\ncase '--squirrel-obsolete':\ncase '--squirrel-updated':\napp.quit();\n- break\n+ break;\ndefault:\ninitialize();\n}\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | listing corrections in the auto update code |
288,376 | 09.04.2017 21:23:05 | 14,400 | c4e70bdaddb2304e4294b67d51606c4dad9079fc | using grunt to build the installers | [
{
"change_type": "ADD",
"old_path": null,
"new_path": "Gruntfile.js",
"diff": "+/* global module */\n+module.exports = function(grunt) {\n+ grunt.initConfig({\n+ pkg: grunt.file.readJSON('package.json'),\n+ appdmg: {\n+ options: {\n+ basepath: './electron-builds/HospitalRun-darwin-x64',\n+ title: 'HospitalRun Desktop',\n+ icon: '../../icons/favicon.icns',\n+ background: '../../icons/bg-img-patients.png',\n+ contents: [\n+ { x: 448, y: 344, type: 'link', path: '/Applications' },\n+ { x: 192, y: 344, type: 'file', path: 'HospitalRun.app' }\n+ ]\n+ },\n+ target: {\n+ dest: 'electron-builds/HospitalRun-darwin-x64/HospitalRun.dmg'\n+ }\n+ },\n+ 'create-windows-installer': {\n+ x64: {\n+ appDirectory: 'electron-builds/HospitalRun-win32-x64',\n+ outputDirectory: 'electron-builds/HospitalRun-win32-x64',\n+ authors: 'HospitalRun',\n+ exe: 'HospitalRun.exe'\n+ },\n+ ia32: {\n+ appDirectory: 'electron-builds/HospitalRun-win32-ia32',\n+ outputDirectory: 'electron-builds/HospitalRun-win32-ia32',\n+ authors: 'HospitalRun',\n+ exe: 'HospitalRun.exe'\n+ }\n+ }\n+ });\n+ grunt.loadNpmTasks('grunt-appdmg');\n+ grunt.loadNpmTasks('grunt-electron-installer');\n+ grunt.registerTask('default', ['appdmg', 'create-windows-installer']);\n+};\n"
},
{
"change_type": "ADD",
"old_path": "icons/bg-img-patients.png",
"new_path": "icons/bg-img-patients.png",
"diff": "Binary files /dev/null and b/icons/bg-img-patients.png differ\n"
},
{
"change_type": "ADD",
"old_path": "icons/favicon.icns",
"new_path": "icons/favicon.icns",
"diff": "Binary files /dev/null and b/icons/favicon.icns differ\n"
},
{
"change_type": "ADD",
"old_path": "icons/favicon.ico",
"new_path": "icons/favicon.ico",
"diff": "Binary files /dev/null and b/icons/favicon.ico differ\n"
},
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "{\n- \"name\": \"hospitalrun\",\n+ \"name\": \"HospitalRun\",\n\"version\": \"0.9.18\",\n\"description\": \"Ember front end for HospitalRun\",\n\"homepage\": \"http://hospitalrun.io\",\n\"eslint-plugin-ember-suave\": \"^1.0.0\",\n\"express\": \"^4.8.5\",\n\"glob\": \"^7.1.0\",\n+ \"grunt-appdmg\": \"^1.0.0\",\n+ \"grunt-electron-installer\": \"^2.1.0\",\n\"hospitalrun-dblisteners\": \"0.9.6\",\n\"hospitalrun-server-routes\": \"0.9.11\",\n\"loader.js\": \"^4.0.11\",\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | using grunt to build the installers |
288,376 | 09.04.2017 21:43:05 | 14,400 | 27c82d2090c9764a786ee3a21ddf918f5cdc2674 | write grunt output to installers directory | [
{
"change_type": "MODIFY",
"old_path": ".gitignore",
"new_path": ".gitignore",
"diff": "/dist\n/tmp\n/electron-builds\n+/installers\n# dependencies\n/node_modules\n"
},
{
"change_type": "MODIFY",
"old_path": "Gruntfile.js",
"new_path": "Gruntfile.js",
"diff": "/* global module */\n+/*\n+note: to execute the windows installers on MacOS, you must have both wine and mono installed\n+brew install mono\n+brew install wine\n+*/\nmodule.exports = function(grunt) {\ngrunt.initConfig({\npkg: grunt.file.readJSON('package.json'),\n@@ -14,20 +19,20 @@ module.exports = function(grunt) {\n]\n},\ntarget: {\n- dest: 'electron-builds/HospitalRun-darwin-x64/HospitalRun.dmg'\n+ dest: 'installers/HospitalRun-darwin-x64/HospitalRun.dmg'\n}\n},\n'create-windows-installer': {\nx64: {\nappDirectory: 'electron-builds/HospitalRun-win32-x64',\n- outputDirectory: 'electron-builds/HospitalRun-win32-x64',\n- authors: 'HospitalRun',\n+ outputDirectory: 'installers/HospitalRun-win32-x64',\n+ authors: 'HospitalRun Open Source Community',\nexe: 'HospitalRun.exe'\n},\nia32: {\nappDirectory: 'electron-builds/HospitalRun-win32-ia32',\n- outputDirectory: 'electron-builds/HospitalRun-win32-ia32',\n- authors: 'HospitalRun',\n+ outputDirectory: 'installers/HospitalRun-win32-ia32',\n+ authors: 'HospitalRun Open Source Community',\nexe: 'HospitalRun.exe'\n}\n}\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | write grunt output to installers directory |
288,376 | 09.04.2017 21:47:42 | 14,400 | 31618b15b8fd7a60c3fdd69e8208753741a9ac87 | by default, build only the mac installer | [
{
"change_type": "MODIFY",
"old_path": "Gruntfile.js",
"new_path": "Gruntfile.js",
"diff": "@@ -39,5 +39,5 @@ module.exports = function(grunt) {\n});\ngrunt.loadNpmTasks('grunt-appdmg');\ngrunt.loadNpmTasks('grunt-electron-installer');\n- grunt.registerTask('default', ['appdmg', 'create-windows-installer']);\n+ grunt.registerTask('default', ['appdmg']);\n};\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | by default, build only the mac installer |
288,376 | 09.04.2017 22:26:03 | 14,400 | c0ad9f0c7d3e434539957e468eb7609220b322bf | adding platform intelligence into the update request | [
{
"change_type": "MODIFY",
"old_path": "auto-updater.js",
"new_path": "auto-updater.js",
"diff": "@@ -36,7 +36,16 @@ exports.initialize = function() {\n});\n// autoUpdater.setFeedURL(`https://release.hospitalrun.io/updates?version=${app.getVersion()}`);\n- autoUpdater.setFeedURL(`https://releases.hospitalrun.io:5006/updates?version=${app.getVersion()}`);\n+ let platform = 'macos';\n+ if (process.platform === 'win32') {\n+ platform = 'win32';\n+ if (process.env.PROCESSOR_ARCHITECTURE === 'AMD64') {\n+ platform = 'win32x64';\n+ }\n+ } else if (process.platform != 'darwin') {\n+ platform = process.platform;\n+ }\n+ autoUpdater.setFeedURL(`https://releases.hospitalrun.io/updates?version=${app.getVersion()}&platform=${platform}`);\nautoUpdater.checkForUpdates();\n};\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | adding platform intelligence into the update request |
288,376 | 09.04.2017 23:24:04 | 14,400 | 264960d28495bced460ab6d567827557d35d0a08 | check for ember test | [
{
"change_type": "MODIFY",
"old_path": "auto-updater.js",
"new_path": "auto-updater.js",
"diff": "/* global exports, process, require */\n/* env: \"node\" */\n-const electron = require('electron');\nconst ChildProcess = require('child_process');\nconst path = require('path');\n-const { app, Menu, autoUpdater } = electron;\n+const { app, Menu, autoUpdater } = require('electron');\nlet state = 'checking';\nexports.initialize = function() {\n- if (process.mas) { return; }\n+ if (process.mas || process.env.EMBER_ENV === 'test') { return; }\nautoUpdater.on('checking-for-update', function() {\nstate = 'checking';\n@@ -42,7 +41,7 @@ exports.initialize = function() {\nif (process.env.PROCESSOR_ARCHITECTURE === 'AMD64') {\nplatform = 'win32x64';\n}\n- } else if (process.platform != 'darwin') {\n+ } else if (process.platform !== 'darwin') {\nplatform = process.platform;\n}\nautoUpdater.setFeedURL(`https://releases.hospitalrun.io/updates?version=${app.getVersion()}&platform=${platform}`);\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | check for ember test |
288,376 | 09.04.2017 23:24:33 | 14,400 | d360251e6e2e93a640aeeb39e86122d1b9fd837a | pairing down the file
If we need that other stuff, we can add it back later | [
{
"change_type": "MODIFY",
"old_path": "electron.js",
"new_path": "electron.js",
"diff": "/* eslint-env node */\n'use strict';\n-const electron = require('electron');\n-const path = require('path');\n-const { app, BrowserWindow } = electron;\n-const dirname = __dirname || path.resolve(path.dirname());\n-const emberAppLocation = `file://${dirname}/dist/index.html`;\n+const { app, BrowserWindow } = require('electron');\nconst autoUpdater = require('./auto-updater');\n-const debug = /--debug/.test(process.argv[2]);\nlet mainWindow = null;\n@@ -22,40 +17,24 @@ function initialize() {\nlet windowOptions = {\nwidth: 1080,\nminWidth: 680,\n- height: 840\n+ height: 840,\n+ backgroundThrottling: false\n};\n- if (process.platform === 'linux') {\n- windowOptions.icon = path.join(__dirname, '/assets/app-icon/png/512.png');\n- }\n-\nmainWindow = new BrowserWindow(windowOptions);\n- mainWindow.loadURL(emberAppLocation);\n- // Launch fullscreen with DevTools open, usage: npm run debug\n- if (debug) {\n- mainWindow.webContents.openDevTools();\n- mainWindow.maximize();\n- require('devtron').install();\n+ delete mainWindow.module;\n+\n+ if (process.env.EMBER_ENV === 'test') {\n+ mainWindow.loadURL(`file://${__dirname}/index.html`);\n+ } else {\n+ mainWindow.loadURL(`file://${__dirname}/dist/index.html`);\n}\nmainWindow.on('closed', function() {\nmainWindow = null;\n});\n- // here\n-\n- // If a loading operation goes wrong, we'll send Electron back to\n- // Ember App entry point\n- mainWindow.webContents.on('did-fail-load', () => {\n- mainWindow.loadURL(emberAppLocation);\n- });\n-\n- mainWindow.webContents.on('crashed', () => {\n- console.log('Your Ember app (or other code) in the main window has crashed.');\n- console.log('This is a serious issue that needs to be handled and/or debugged.');\n- });\n-\nmainWindow.on('unresponsive', () => {\nconsole.log('Your Ember app (or other code) has made the window unresponsive.');\n});\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | pairing down the file
If we need that other stuff, we can add it back later |
288,318 | 10.04.2017 12:12:12 | 14,400 | cdb7040a5a7de7d18a127a9d1af101ca51367d70 | Update readme to allow windows user run bootstrap script
* Update readme for windows script
Add a note to ensure windows user run the shell script correctly
* Fix typo on README.md | [
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -36,6 +36,10 @@ To install the frontend please do the following:\nDepending on your [npm permissions](https://docs.npmjs.com/getting-started/fixing-npm-permissions) you might need root access to install ember-cli.\n4. Install [bower](https://www.npmjs.org/package/bower): `npm install -g bower`\n5. Clone this repo with `git clone https://github.com/HospitalRun/hospitalrun-frontend`, go to the cloned folder and run `script/bootstrap`.\n+ - **Note:** *If you are using Windows with `cygwin` please run the script in the following way to remove trailing `\\r` characters:*\n+ ``` bash\n+ bash -o igncr script/bootstrap\n+ ```\n- **Note:** *Depending on your [npm permissions](https://docs.npmjs.com/getting-started/fixing-npm-permissions) you might need root access to install PhantomJS2; also, Windows users must run with [Cygwin](http://cygwin.org/)).*\n- **Note:** *If you just want to use the project, cloning is the best option. However, if you wish to contribute to the project, you will need to fork the project first, and then clone your `hospitalrun-frontend` fork and make your contributions via a branch on your fork.*\n6. Install and configure [CouchDB](http://couchdb.apache.org/)\n@@ -56,9 +60,9 @@ To install the frontend please do the following:\n7. Copy the `server/config-example.js` to `server/config.js` in the folder you cloned the HospitalRun repo. If you already had a CouchDB admin user that you passed into the couch script (`./script/initcouch.sh USER PASS`), then you will need to modify the `couchAdminUser` and `couchAdminPassword` values in `server/config.js` to reflect those credentials. (*Note: If on Mac, you need to make sure CouchDB can be run. See [How to open an app from a unidentified developer and exempt it from Gatekeeper](https://support.apple.com/en-us/HT202491).*)\n8. Verify that CouchDB is running by visiting: http://127.0.0.1:5984/_utils/#login\nand logging in with the with the credentials you just created from steps 6 and 7.\n- 1. If you the page returns an error or 404:\n- 1. Run `make serve`, it will start couchdb, install npm dependencies and start the server.\n- 2. Or start the application from your applications folder.\n+ - If the page returns an error or 404:\n+ - Run `make serve`, it will start couchdb, install npm dependencies and start the server.\n+ - Or start the application from your applications folder.\n## Running the application\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Update readme to allow windows user run bootstrap script (#1051)
* Update readme for windows script
Add a note to ensure windows user run the shell script correctly
Signed-off-by: ssh24 <[email protected]>
* Fix typo on README.md |
288,284 | 11.04.2017 13:07:31 | 14,400 | 279abd765e2c0f2e50e510d04ff64c8119b0848b | Fix patient deletion
Fixes | [
{
"change_type": "MODIFY",
"old_path": "app/patients/delete/controller.js",
"new_path": "app/patients/delete/controller.js",
"diff": "@@ -8,8 +8,6 @@ import Ember from 'ember';\nimport { translationMacro as t } from 'ember-i18n';\nimport { task, taskGroup, all } from 'ember-concurrency';\n-const MAX_CONCURRENCY = 5;\n-\nexport default AbstractDeleteController.extend(PatientVisitsMixin, PatientInvoicesMixin, PouchDbMixin, ProgressDialog, PatientAppointmentsMixin, {\ntitle: t('patients.titles.delete'),\nprogressTitle: t('patients.titles.deletePatientRecord'),\n@@ -31,9 +29,9 @@ export default AbstractDeleteController.extend(PatientVisitsMixin, PatientInvoic\n}\nlet deleteRecordTask = this.get('deleteRecordTask');\nlet archivePromises = [];\n- for (let recordToDelete of resolvedArray) {\n+ resolvedArray.forEach((recordToDelete) => {\narchivePromises.push(deleteRecordTask.perform(recordToDelete));\n- }\n+ });\nreturn yield all(archivePromises, 'async array deletion');\n}).group('deleting'),\n@@ -41,7 +39,7 @@ export default AbstractDeleteController.extend(PatientVisitsMixin, PatientInvoic\nrecordToDelete.set('archived', true);\nyield recordToDelete.save();\nreturn yield recordToDelete.unloadRecord();\n- }).maxConcurrency(MAX_CONCURRENCY).enqueue().group('deleting'),\n+ }).group('deleting'),\n// Override delete action on controller; we must delete\n// all related records before deleting patient record\n@@ -71,10 +69,10 @@ export default AbstractDeleteController.extend(PatientVisitsMixin, PatientInvoic\ndeleteVisitsTask: task(function* (visits) {\nlet pendingTasks = [];\n- for (let visit of visits) {\n- let labs = yield visit.get('labs');\n- let procedures = yield visit.get('procedures');\n- let imaging = yield visit.get('imaging');\n+ visits.forEach((visit) => {\n+ let labs = visit.get('labs');\n+ let procedures = visit.get('procedures');\n+ let imaging = visit.get('imaging');\nlet procCharges = procedures.get('charges');\nlet labCharges = labs.get('charges');\nlet imagingCharges = imaging.get('charges');\n@@ -89,7 +87,7 @@ export default AbstractDeleteController.extend(PatientVisitsMixin, PatientInvoic\npendingTasks.push(this.deleteMany(imaging));\npendingTasks.push(this.deleteMany(imagingCharges));\npendingTasks.push(this.deleteMany(visitCharges));\n- }\n+ });\nyield all(pendingTasks);\nreturn yield this.deleteMany(visits);\n}).group('deleting'),\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/acceptance/patients-test.js",
"new_path": "tests/acceptance/patients-test.js",
"diff": "@@ -133,6 +133,29 @@ test('Adding a new patient record', function(assert) {\n});\n});\n+test('Delete a patient record', function(assert) {\n+ runWithPouchDump('patient', function() {\n+ authenticateUser();\n+ visit('/patients');\n+ andThen(() =>{\n+ assert.equal(currentURL(), '/patients', 'Patient listing url is correct');\n+ assert.equal(find('tr.clickable td:contains(Joe)').length, 1, 'One patient exists to delete.');\n+ click('tr.clickable button:contains(Delete)');\n+ waitToAppear('.modal-dialog');\n+ });\n+ andThen(() =>{\n+ assert.equal(find('.modal-title').text(), 'Delete Patient', 'Delete Patient ');\n+ assert.equal(find('.modal-body').text().trim(), 'Are you sure you wish to delete Joe Bagadonuts?', 'Patient information appears in modal');\n+ click('.modal-footer button:contains(Delete)');\n+ waitToDisappear('.modal-dialog');\n+ waitToDisappear('tr.clickable td:contains(Joe)');\n+ });\n+ andThen(function() {\n+ assert.equal(find('tr.clickable td:contains(Joe)').length, 0, 'Patient has been successfully deleted.');\n+ });\n+ });\n+});\n+\nfunction testSimpleReportForm(reportName) {\ntest(`View reports tab | ${reportName} shows start and end dates`, function(assert) {\nrunWithPouchDump('default', function() {\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Fix patient deletion
Fixes #1049 |
288,284 | 11.04.2017 13:08:21 | 14,400 | 400314f2e582e785c6229f7b4a7d879363b07746 | Fix navigation errors during testing
Resolves issue encountered in during testing. | [
{
"change_type": "MODIFY",
"old_path": "app/components/nav-menu.js",
"new_path": "app/components/nav-menu.js",
"diff": "import Ember from 'ember';\nimport UserSession from 'hospitalrun/mixins/user-session';\n+const {\n+ computed,\n+ get,\n+ set\n+} = Ember;\n+\nexport default Ember.Component.extend(UserSession, {\n- tagName: 'div',\n+ callCloseSettings: 'closeSettings',\n+ callNavAction: 'navAction',\nclassNames: ['primary-nav-item'],\n+ isShowing: false,\nnav: null,\n+ tagName: 'div',\n- show: function() {\n+ show: computed('nav', 'session.data.authenticated.userCaps', function() {\nthis._setupSubNav();\n- return this.currentUserCan(this.get('nav').capability);\n- }.property('nav', 'session.data.authenticated.userCaps'),\n-\n- isShowing: false,\n+ return this.currentUserCan(get(this, 'nav').capability);\n+ }),\n_setup: function() {\n- let nav = this.get('nav');\n+ let nav = get(this, 'nav');\nnav.closeSubnav = function() {\n- this.set('isShowing', false);\n+ set(this, 'isShowing', false);\n}.bind(this);\nthis._setupSubNav();\n}.on('init'),\n_setupSubNav() {\n- let nav = this.get('nav');\n+ let nav = get(this, 'nav');\nnav.subnav.forEach((item) => {\n- item.show = this.currentUserCan(item.capability);\n+ set(item, 'show', this.currentUserCan(item.capability));\n});\n},\n- callNavAction: 'navAction',\n- callCloseSettings: 'closeSettings',\n-\nactions: {\n- toggleContent() {\n- this.set('isShowing', !this.get('isShowing'));\n- this.sendAction('callNavAction', this.nav);\n- },\n-\nresetNav() {\nthis.sendAction('callCloseSettings');\n+ },\n+\n+ toggleContent() {\n+ this.toggleProperty('isShowing');\n+ this.sendAction('callNavAction', this.nav);\n}\n}\n});\n"
},
{
"change_type": "MODIFY",
"old_path": "app/mixins/navigation.js",
"new_path": "app/mixins/navigation.js",
"diff": "import Ember from 'ember';\nconst { camelize } = Ember.String;\n-const { isEqual } = Ember;\n+const {\n+ get,\n+ isEqual,\n+ set\n+} = Ember;\nexport default Ember.Mixin.create({\nnavItems: [\n@@ -365,19 +369,20 @@ export default Ember.Mixin.create({\n// i18n will return a SafeString object, not a string\nreturn typeof translation === 'string' ? original : translation;\n};\n- return this.get('navItems').map((nav) => {\n+ let i18n = get(this, 'i18n');\n+ let navItems = get(this, 'navItems');\n+ return navItems.map((nav) => {\nlet sectionKey = localizationPrefix + camelize(nav.title).toLowerCase();\n- let navTranslated = this.get('i18n').t(sectionKey);\n+ let navTranslated = i18n.t(sectionKey);\n- Ember.set(nav, 'localizedTitle', translationOrOriginal(navTranslated, nav.title));\n+ set(nav, 'localizedTitle', translationOrOriginal(navTranslated, nav.title));\n// Map all of the sub navs, too\n- nav.subnav = nav.subnav.map((sub) => {\n+ set(nav, 'subnav', nav.subnav.map((sub) => {\nlet subItemKey = `${localizationPrefix}subnav.${camelize(sub.title)}`;\n- let subTranslated = this.get('i18n').t(subItemKey);\n-\n- sub.localizedTitle = translationOrOriginal(subTranslated, sub.title);\n+ let subTranslated = i18n.t(subItemKey);\n+ set(sub, 'localizedTitle', translationOrOriginal(subTranslated, sub.title));\nreturn sub;\n- });\n+ }));\nreturn nav;\n});\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Fix navigation errors during testing
Resolves issue encountered in #1027 during testing. |
288,376 | 11.04.2017 16:51:25 | 14,400 | 7ec760bc1986aa80630ea93c1a949021cf358d86 | rolling back eslint changes | [
{
"change_type": "MODIFY",
"old_path": ".eslintrc.js",
"new_path": ".eslintrc.js",
"diff": "@@ -29,12 +29,8 @@ module.exports = {\nrules: {\n'camelcase': 0,\n- \"brace-style\": [ \"warn\", \"1tbs\", { \"allowSingleLine\": true } ],\n'ember-suave/no-direct-property-access': 0,\n'ember-suave/require-access-in-comments': 0,\n- 'max-statements-per-line': [\"error\", { \"max\": 3 }],\n- 'no-console': 0,\n- 'no-var': \"warn\",\n- 'no-undef': \"warn\"\n+ 'no-console': 0\n}\n};\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | rolling back eslint changes |
288,376 | 12.04.2017 22:27:29 | 14,400 | 1f56db53e000cb4fcc420a05ab8e0b16a6a7df7d | fixing the upgrade path for ember-electron in devDependencies | [
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "\"ember-concurrency\": \"0.8.1\",\n\"ember-concurrency-test-waiter\": \"0.2.0\",\n\"ember-data\": \"^2.10.0\",\n- \"ember-electron\": \"2.0.1\",\n+ \"ember-electron\": \"^2.0.1\",\n\"ember-export-application-global\": \"^1.0.5\",\n\"ember-fullcalendar\": \"1.7.0\",\n\"ember-i18n\": \"4.4.0\",\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | fixing the upgrade path for ember-electron in devDependencies |
288,376 | 18.04.2017 15:26:47 | 14,400 | 928d4353590e78496891f28f14aae6cc89af46b4 | remove extra commas from electron test | [
{
"change_type": "MODIFY",
"old_path": "tests/ember-electron/main.js",
"new_path": "tests/ember-electron/main.js",
"diff": "@@ -12,7 +12,7 @@ let mainWindow = null;\nconst [, , indexUrl] = process.argv;\nconst {\npathname: indexPath,\n- search: indexQuery,\n+ search: indexQuery\n} = url.parse(indexUrl);\nconst emberAppLocation = `serve://dist${indexQuery}`;\n@@ -23,7 +23,7 @@ protocolServe({\ncwd: resolve(dirname(indexPath), '..'),\napp,\nprotocol,\n- indexPath,\n+ indexPath\n});\napp.on('window-all-closed', function onWindowAllClosed() {\n@@ -36,7 +36,7 @@ app.on('ready', function onReady() {\nmainWindow = new BrowserWindow({\nwidth: 800,\nheight: 600,\n- backgroundThrottling: false,\n+ backgroundThrottling: false\n});\ndelete mainWindow.module;\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | remove extra commas from electron test |
288,284 | 19.04.2017 15:53:30 | 14,400 | 03541e105e69f292f0da278d3856cbf228e621b0 | Fix error when running tests with PhantomJS | [
{
"change_type": "MODIFY",
"old_path": "app/services/config.js",
"new_path": "app/services/config.js",
"diff": "import Ember from 'ember';\n-const { inject, run, get, set } = Ember;\n+const {\n+ RSVP,\n+ get,\n+ inject,\n+ run,\n+ set\n+} = Ember;\nexport default Ember.Service.extend({\nconfigDB: null,\n@@ -13,7 +19,7 @@ export default Ember.Service.extend({\nif (get(this, 'needsUserSetup') === true) {\nset(this, 'needsUserSetup', false);\nlet config = this.get('configDB');\n- return new Ember.RSVP.Promise(function(resolve, reject) {\n+ return new RSVP.Promise(function(resolve, reject) {\nconfig.put({ _id: 'config_user_setup_flag', value: false }, function(err, doc) {\nif (err) {\nreject(err);\n@@ -22,7 +28,7 @@ export default Ember.Service.extend({\n});\n});\n} else {\n- return Promise.resolve(true);\n+ return RSVP.resolve(true);\n}\n},\nsetup() {\n@@ -44,7 +50,7 @@ export default Ember.Service.extend({\nreturn new PouchDB('config');\n},\nreplicateConfigDB(db) {\n- let promise = new Ember.RSVP.Promise((resolve) => {\n+ let promise = new RSVP.Promise((resolve) => {\nlet url = `${document.location.protocol}//${document.location.host}/db/config`;\ndb.replicate.from(url).then(resolve).catch(resolve);\n});\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Fix error when running tests with PhantomJS |
288,284 | 19.04.2017 15:53:46 | 14,400 | 3fdf8f9655c1119c599508421706bb48ea8dfbb3 | Snyk updates | [
{
"change_type": "MODIFY",
"old_path": ".snyk",
"new_path": ".snyk",
"diff": "-version: v1.5.2\n+# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.\n+version: v1.7.0\nfailThreshold: high\n-ignore: {}\n+# ignores vulnerabilities until expiry date; change duration by modifying expiry date\n+ignore:\n+ 'npm:concat-stream:20160901':\n+ - ember-electron > electron-forge > electron-packager > extract-zip > concat-stream:\n+ reason: None given\n+ expires: '2017-05-19T14:53:23.081Z'\n+# patches apply the minimum changes required to fix a vulnerability\npatch:\n'npm:minimatch:20160620':\n- ember-inflector > ember-cli-babel > broccoli-babel-transpiler > babel-core > minimatch:\npatched: '2016-07-06T20:50:31.952Z'\n- ember-rapid-forms > ember-cli-babel > broccoli-babel-transpiler > babel-core > minimatch:\n- patched: '2016-09-29T20:23:59.408Z'\n+ ember-electron > ember-cli-babel > broccoli-babel-transpiler > babel-core > minimatch:\n+ patched: '2017-04-19T14:48:55.772Z'\n- ember-inflector > ember-cli-babel > broccoli-babel-transpiler > babel-core > regenerator > commoner > glob > minimatch:\npatched: '2016-07-06T20:50:31.952Z'\n- ember-rapid-forms > ember-validations > ember-cli-babel > broccoli-babel-transpiler > babel-core > minimatch:\n+ ember-electron > ember-inspector > ember-new-computed > ember-cli-babel > broccoli-babel-transpiler > babel-core > minimatch:\n+ patched: '2017-04-19T14:48:55.772Z'\n+ - ember-rapid-forms > ember-cli-babel > broccoli-babel-transpiler > babel-core > minimatch:\n+ patched: '2016-09-29T20:23:59.408Z'\n+ ember-electron > electron-forge > zip-folder > archiver > glob > minimatch:\n+ patched: '2017-04-19T14:48:55.772Z'\n+ - ember-rapid-forms > ember-validations > ember-cli-babel > broccoli-babel-transpiler > babel-core > minimatch:\npatched: '2016-09-29T20:23:59.408Z'\n+ 'npm:qs:20170213':\n+ - ember-electron > npmi > npm > node-gyp > request > qs:\n+ patched: '2017-04-19T14:48:55.772Z'\n+ - ember-electron > npmi > npm > request > qs:\n+ patched: '2017-04-19T14:48:55.772Z'\n+ - ember-electron > npmi > npm > npm-registry-client > request > qs:\n+ patched: '2017-04-19T14:48:55.772Z'\n+ 'npm:semver:20150403':\n+ - ember-electron > electron-forge > electron-windows-store > flatten-packages > semver:\n+ patched: '2017-04-19T14:48:55.772Z'\n+ 'npm:ws:20160920':\n+ - ember-electron > testem > socket.io > engine.io > ws:\n+ patched: '2017-04-19T14:48:55.772Z'\n+ - ember-electron > testem > socket.io > socket.io-client > engine.io-client > ws:\n+ patched: '2017-04-19T14:48:55.772Z'\n"
},
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "\"dependencies\": {\n\"electron-compile\": \"^6.3.0\",\n\"electron-localshortcut\": \"^1.1.1\",\n- \"ember-electron\": \"^2.0.1\"\n+ \"ember-electron\": \"^2.1.0\"\n},\n\"ember-addon\": {\n\"paths\": [\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Snyk updates |
288,284 | 19.04.2017 15:54:19 | 14,400 | 6f8ff872a37090f770f80cf473cf5c6fa493c89f | Make sure login displays error message on incorrect credentials | [
{
"change_type": "MODIFY",
"old_path": "app/authenticators/custom.js",
"new_path": "app/authenticators/custom.js",
"diff": "@@ -169,7 +169,7 @@ export default BaseAuthenticator.extend({\nuser.role = this._getPrimaryRole(user);\nresolve(user);\n});\n- });\n+ }, reject);\n});\n},\n"
},
{
"change_type": "MODIFY",
"old_path": "app/controllers/login.js",
"new_path": "app/controllers/login.js",
"diff": "@@ -11,8 +11,8 @@ let LoginController = Ember.Controller.extend({\nthis.get('session').authenticate('authenticator:custom', {\nidentification,\npassword\n- }).catch((error) => {\n- this.set('errorMessage', error.reason);\n+ }).catch(() => {\n+ this.set('errorMessage', true);\n});\n}\n}\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Make sure login displays error message on incorrect credentials |
288,284 | 19.04.2017 15:54:38 | 14,400 | 1ed3a7d1463435f5f3c5aaedbed43d92777306eb | Close app when all windows are closed even on Mac | [
{
"change_type": "MODIFY",
"old_path": "ember-electron/main.js",
"new_path": "ember-electron/main.js",
"diff": "@@ -72,9 +72,7 @@ function initialize() {\n}\napp.on('window-all-closed', () => {\n- if (process.platform !== 'darwin') {\napp.quit();\n- }\nelectronLocalshortcut.unregisterAll(mainWindow);\n});\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Close app when all windows are closed even on Mac |
288,284 | 19.04.2017 15:55:20 | 14,400 | 8ef311fd2c5c179f51fb8bd4d1a81da1148cff9e | Get ember electron:test passing | [
{
"change_type": "MODIFY",
"old_path": "tests/acceptance/login-test.js",
"new_path": "tests/acceptance/login-test.js",
"diff": "@@ -15,7 +15,6 @@ module('Acceptance | login', {\n}\n});\n-if (!window.ELECTRON) {\ntest('visiting / redirects user to login', function(assert) {\nassert.expect(1);\nrunWithPouchDump('default', function() {\n@@ -36,7 +35,9 @@ if (!window.ELECTRON) {\n});\ntest('incorrect credentials shows an error message on the screen', function(assert) {\n+ if (!window.ELECTRON) {\nassert.expect(2);\n+ }\nrunWithPouchDump('default', function() {\nvisit('/');\n@@ -58,10 +59,11 @@ if (!window.ELECTRON) {\n});\n});\n-}\nfunction login(assert, spaceAroundUsername) {\n+ if (!window.ELECTRON) {\nassert.expect(3);\n+ }\nrunWithPouchDump('default', function() {\nvisit('/login');\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/acceptance/users-test.js",
"new_path": "tests/acceptance/users-test.js",
"diff": "import Ember from 'ember';\n-import { module, test } from 'qunit';\n-import startApp from 'hospitalrun/tests/helpers/start-app';\nimport FakeServer, { stubRequest } from 'ember-cli-fake-server';\n+import PouchDB from 'pouchdb';\n+import PouchAdapterMemory from 'npm:pouchdb-adapter-memory';\n+import startApp from 'hospitalrun/tests/helpers/start-app';\nimport { PREDEFINED_USER_ROLES } from 'hospitalrun/mixins/user-roles';\n+import { module, test } from 'qunit';\n-function addAllUsers(assert) {\n- stubRequest('get', '/db/_users/_all_docs', function(request) {\n- let expectedQuery = {\n- include_docs: 'true',\n- startkey: '\"org.couchdb.user\"'\n- };\n- assert.equal(JSON.stringify(request.queryParams), JSON.stringify(expectedQuery), 'All Users request sent to the server');\n- request.ok({\n- 'total_rows': 1,\n- 'offset': 1,\n- 'rows': [{\n+const MOCK_USER_DATA = [{\n'id': 'org.couchdb.user:hradmin',\n'key': 'org.couchdb.user:hradmin',\n'value': { 'rev': '1-242f3d5b5eb8596144f8a6300f9f5a2f' },\n@@ -52,8 +44,40 @@ function addAllUsers(assert) {\n'derived_key': 'derivedkeyhere',\n'salt': 'saltgoeshere'\n}\n- }]\n+}];\n+\n+const {\n+ RSVP\n+} = Ember;\n+\n+function addAllUsers(assert) {\n+ if (window.ELECTRON) {\n+ return _addOfflineUsers();\n+ }\n+ stubRequest('get', '/db/_users/_all_docs', function(request) {\n+ let expectedQuery = {\n+ include_docs: 'true',\n+ startkey: '\"org.couchdb.user\"'\n+ };\n+ assert.equal(JSON.stringify(request.queryParams), JSON.stringify(expectedQuery), 'All Users request sent to the server');\n+ request.ok({\n+ 'total_rows': 1,\n+ 'offset': 1,\n+ 'rows': MOCK_USER_DATA\n+ });\n});\n+ return RSVP.resolve();\n+}\n+\n+function _addOfflineUsers() {\n+ return wait().then(() => {\n+ PouchDB.plugin(PouchAdapterMemory);\n+ let usersDB = new PouchDB('_users', {\n+ adapter: 'memory'\n+ });\n+ let [, joeUser] = MOCK_USER_DATA; // hradmin already added by run-with-pouch-dump\n+ delete joeUser.doc._rev;\n+ return usersDB.put(joeUser.doc);\n});\n}\n@@ -80,6 +104,7 @@ test('visiting /admin/users', function(assert) {\n}\n});\naddAllUsers(assert);\n+ andThen(() => {\nvisit('/'); // Default home page for User Administrator is admin/users\nandThen(function() {\nassert.equal(currentURL(), '/admin/users', 'User Administrator initial page displays');\n@@ -90,11 +115,13 @@ test('visiting /admin/users', function(assert) {\n});\n});\n});\n+});\ntest('create new user', function(assert) {\nrunWithPouchDump('default', function() {\nauthenticateUser();\naddAllUsers(assert);\n+ andThen(() => {\nvisit('/admin/users');\nstubRequest('put', '/db/_users/org.couchdb.user:[email protected]', function(request) {\nlet expectedBody = {\n@@ -132,11 +159,13 @@ test('create new user', function(assert) {\n});\n});\n});\n+});\ntest('delete user', function(assert) {\nrunWithPouchDump('default', function() {\nauthenticateUser();\naddAllUsers(assert);\n+ andThen(() => {\nstubRequest('put', '/db/_users/org.couchdb.user:[email protected]', function(request) {\nlet expectedBody = {\n_id: 'org.couchdb.user:[email protected]',\n@@ -175,3 +204,4 @@ test('delete user', function(assert) {\n});\n});\n});\n+});\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/helpers/run-with-pouch-dump.js",
"new_path": "tests/helpers/run-with-pouch-dump.js",
"diff": "@@ -3,15 +3,20 @@ import createPouchViews from 'hospitalrun/utils/pouch-views';\nimport Ember from 'ember';\nimport PouchDB from 'pouchdb';\nimport PouchAdapterMemory from 'npm:pouchdb-adapter-memory';\n+import PouchDBUsers from 'npm:pouchdb-users';\nimport DatabaseService from 'hospitalrun/services/database';\nimport ConfigService from 'hospitalrun/services/config';\n-function cleanupDatabases(dbs) {\n+const {\n+ set\n+} = Ember;\n+\n+function cleanupDatabases(maindb, dbs) {\nreturn wait().then(function() {\nreturn new Ember.RSVP.Promise(function(resolve, reject) {\n- if (dbs.main.changesListener) {\n- dbs.main.changesListener.cancel();\n- dbs.main.changesListener.on('complete', function() {\n+ if (maindb.changesListener) {\n+ maindb.changesListener.cancel();\n+ maindb.changesListener.on('complete', function() {\ndestroyDatabases(dbs).then(resolve, reject);\n});\n} else {\n@@ -23,23 +28,29 @@ function cleanupDatabases(dbs) {\nfunction destroyDatabases(dbs) {\nlet destroyQueue = [];\n- destroyQueue.push(dbs.config.info().then(function() {\n- return dbs.config.destroy();\n- }));\n- destroyQueue.push(dbs.main.info().then(function() {\n- return dbs.main.destroy();\n+ dbs.forEach((db) => {\n+ destroyQueue.push(db.info().then(function() {\n+ return db.destroy();\n}));\n+ });\nreturn Ember.RSVP.all(destroyQueue);\n}\nfunction runWithPouchDumpAsyncHelper(app, dumpName, functionToRun) {\nPouchDB.plugin(PouchAdapterMemory);\n+ PouchDB.plugin(PouchDBUsers);\nlet db = new PouchDB('hospitalrun-test-database', {\nadapter: 'memory'\n});\nlet configDB = new PouchDB('hospitalrun-test-config-database', {\nadapter: 'memory'\n});\n+ let usersDB;\n+ if (window.ELECTRON) {\n+ usersDB = new PouchDB('_users', {\n+ adapter: 'memory'\n+ });\n+ }\nlet dump = require(`hospitalrun/tests/fixtures/${dumpName}`).default;\nlet promise = db.load(dump);\n@@ -48,6 +59,23 @@ function runWithPouchDumpAsyncHelper(app, dumpName, functionToRun) {\nreturn promise.then(function() {\nreturn db;\n});\n+ },\n+ _createUsersDB() {\n+ return usersDB.installUsersBehavior().then(() => {\n+ set(this, 'usersDB', usersDB);\n+ return usersDB.put({\n+ _id: 'org.couchdb.user:hradmin',\n+ displayName: 'HospitalRun Administrator',\n+ email: '[email protected]',\n+ type: 'user',\n+ name: 'hradmin',\n+ password: 'test',\n+ roles: ['System Administrator', 'admin', 'user'],\n+ userPrefix: 'p1'\n+ });\n+ }).catch((err) => {\n+ console.log('Error creating users db!!!', err);\n+ });\n}\n});\n@@ -79,15 +107,22 @@ function runWithPouchDumpAsyncHelper(app, dumpName, functionToRun) {\ncreatePouchViews(db, true, dumpName).then(function() {\nfunctionToRun();\nandThen(function() {\n- cleanupDatabases({\n- config: configDB,\n- main: db\n- }).then(function() {\n+ let databasesToClean = [\n+ configDB,\n+ db\n+ ];\n+ if (window.ELECTRON) {\n+ databasesToClean.push(usersDB);\n+ }\n+ cleanupDatabases(db, databasesToClean).then(function() {\nconfigDB = null;\ndb = null;\n+ if (window.ELECTRON) {\n+ usersDB = null;\n+ }\nresolve();\n}, function(err) {\n- console.log('error cleaning up dbs:', JSON.stringify(err, null, 2));\n+ console.log('error cleaning up dbs:', err);\n});\n});\n});\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Get ember electron:test passing |
288,284 | 19.04.2017 16:16:48 | 14,400 | d811d685afa6923747fe723dd5cc955231c024ba | Add Travis testing for Electron. | [
{
"change_type": "MODIFY",
"old_path": ".travis.yml",
"new_path": ".travis.yml",
"diff": "@@ -13,9 +13,9 @@ sudo: required\naddons:\napt:\nsources:\n- - google-chrome\n+ - ubuntu-toolchain-r-test\npackages:\n- - google-chrome-stable\n+ - g++-4.8\ncache:\ndirectories:\n@@ -23,18 +23,22 @@ cache:\n- $HOME/.cache # includes bowers cache\nbefore_install:\n- - \"export DISPLAY=:99.0\"\n- - \"sh -e /etc/init.d/xvfb start\"\n- npm config set spin false\n- npm install -g bower phantomjs-prebuilt\n- bower --version\n- phantomjs --version\n- - google-chrome --version\n-\ninstall:\n- npm install\n- bower install\n+ - export DISPLAY=':99.0'\n+ - Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &\nscript:\n- - travis_retry npm test\n+ - npm run $COMMAND\n+\n+env:\n+ - CXX=g++-4.8\n+ matrix:\n+ - COMMAND=test\n+ - COMMAND=electron-test\n"
},
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "\"build\": \"./script/build\",\n\"start\": \"./script/server\",\n\"test\": \"./script/test\",\n+ \"electron-test\": \"ember electron:test\",\n\"translation-sync\": \"babel-node script/translation/sync.js --presets es2015,stage-2; eslint --fix app/locales\"\n},\n\"repository\": {\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Add Travis testing for Electron. |
288,284 | 19.04.2017 16:27:55 | 14,400 | 932875b799417538fe8259a39f2dec6e5a7178f3 | Resolve deprecations. | [
{
"change_type": "MODIFY",
"old_path": "app/components/expand-text.js",
"new_path": "app/components/expand-text.js",
"diff": "import Ember from 'ember';\nimport textExpansion from '../utils/text-expansion';\n-export default Ember.Component.extend({\n- i18n: Ember.inject.service(),\n- store: Ember.inject.service(),\n+const {\n+ Component,\n+ String: {\n+ htmlSafe\n+ },\n+ computed,\n+ inject\n+} = Ember;\n+\n+export default Component.extend({\n+ i18n: inject.service(),\n+ store: inject.service(),\nuserText: '',\ndidInsertElement() {\n- try {\n+\nlet feedbackDiv = document.createElement('div');\nfeedbackDiv.style.position = 'absolute';\n- // let textarea = this.$()[0].getElementsByTagName('textarea')[0];\nlet [textarea] = this.$('textarea');\nthis.set('textarea', textarea);\nlet textPos = textarea.getBoundingClientRect();\n@@ -19,6 +27,7 @@ export default Ember.Component.extend({\nfbStyle.top = `${textPos.bottom}px`;\nfbStyle.left = `${textPos.left}px`;\nfbStyle.width = `${textarea.offsetWidth}px`;\n+ // THIS CODE NEEDS TO BE CHANGED -- INLINE STYLES ARE EVIL!\nfbStyle.backgroundColor = 'lightyellow';\nfbStyle.borderStyle = 'solid';\nfbStyle.borderWidth = '1px';\n@@ -34,7 +43,6 @@ export default Ember.Component.extend({\n.findAll('text-expansion')\n.then((expansions) => {\nreturn expansions.reduce((prev, curr) => {\n- // console.log(`curr ${JSON.stringify(prev)}`);\nprev[curr.get('from')] = curr.get('to');\nreturn prev;\n}, {});\n@@ -43,9 +51,6 @@ export default Ember.Component.extend({\nthis.set('expansions', expansions);\n});\n- } catch(e) {\n- // console.log(`didInsert {e}`);\n- }\n},\nkeyUp(k) {\n@@ -75,7 +80,7 @@ export default Ember.Component.extend({\n},\n// Find an expandable word that has the cursor within it\n- activeExpansionSite: Ember.computed('userText', 'cursorLocation', function() {\n+ activeExpansionSite: computed('userText', 'cursorLocation', function() {\nlet userText = this.get('userText');\nlet textarea = this.get('textarea');\n@@ -94,7 +99,7 @@ export default Ember.Component.extend({\n}),\n// If an expansion site is active, which possible swaps could occur there?\n- possibleSwaps: Ember.computed('activeExpansionSite', 'expansions', function() {\n+ possibleSwaps: computed('activeExpansionSite', 'expansions', function() {\nlet activeSite = this.get('activeExpansionSite');\nif (activeSite) {\n@@ -113,7 +118,7 @@ export default Ember.Component.extend({\n}\n}),\n- expansionText: Ember.computed('possibleSwaps', 'activeExpansionSite', 'userText', function() {\n+ expansionText: computed('possibleSwaps', 'activeExpansionSite', 'userText', function() {\nlet result = '';\nlet i18n = this.get('i18n');\n@@ -138,7 +143,7 @@ export default Ember.Component.extend({\nreturn result;\n}),\n- expansionDivStyle: Ember.computed('expansionText', function() {\n+ expansionDivStyle: computed('expansionText', function() {\nlet expansionText = this.get('expansionText');\nlet visiblility = expansionText ? 'visible' : 'hidden';\nlet textArea = this.get('textarea');\n@@ -149,6 +154,6 @@ export default Ember.Component.extend({\nlet textPos = textArea.getBoundingClientRect();\nstyleString += ` top: ${textPos.bottom}px; left: ${textPos.left}px; width: ${textArea.offsetWidth}px;`;\n}\n- return new Ember.Handlebars.SafeString(styleString);\n+ return htmlSafe(styleString);\n})\n});\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Resolve deprecations. |
288,376 | 19.04.2017 21:46:36 | 14,400 | 86c0b3862355206e9e99968d45d500417e2f5a82 | updated yarn file | [
{
"change_type": "MODIFY",
"old_path": "yarn.lock",
"new_path": "yarn.lock",
"diff": "@@ -113,7 +113,7 @@ [email protected]:\nversion \"0.8.1\"\nresolved \"https://registry.yarnpkg.com/after/-/after-0.8.1.tgz#ab5d4fb883f596816d3515f8f791c0af486dd627\"\[email protected], after@~0.8.1:\n+after@~0.8.1:\nversion \"0.8.2\"\nresolved \"https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f\"\n@@ -1402,10 +1402,6 @@ [email protected]:\nversion \"0.1.0\"\nresolved \"https://registry.yarnpkg.com/base64id/-/base64id-0.1.0.tgz#02ce0fdeee0cef4f40080e1e73e834f0b1bfce3f\"\[email protected]:\n- version \"1.0.0\"\n- resolved \"https://registry.yarnpkg.com/base64id/-/base64id-1.0.0.tgz#47688cb99bb6804f0e06d3e763b1c32e57d8e6b6\"\n-\nbasic-auth@~1.1.0:\nversion \"1.1.0\"\nresolved \"https://registry.yarnpkg.com/basic-auth/-/basic-auth-1.1.0.tgz#45221ee429f7ee1e5035be3f51533f1cdfd29884\"\n@@ -1878,6 +1874,13 @@ broccoli-merge-trees@^1.1.0, broccoli-merge-trees@^1.1.1, broccoli-merge-trees@^\nrimraf \"^2.4.3\"\nsymlink-or-copy \"^1.0.0\"\n+broccoli-merge-trees@^2.0.0:\n+ version \"2.0.0\"\n+ resolved \"https://registry.yarnpkg.com/broccoli-merge-trees/-/broccoli-merge-trees-2.0.0.tgz#10aea46dd5cebcc8b8f7d5a54f0a84a4f0bb90b9\"\n+ dependencies:\n+ broccoli-plugin \"^1.3.0\"\n+ merge-trees \"^1.0.1\"\n+\nbroccoli-merge-trees@~0.1.4:\nversion \"0.1.4\"\nresolved \"https://registry.yarnpkg.com/broccoli-merge-trees/-/broccoli-merge-trees-0.1.4.tgz#10adeee5e2b24027770a0fc36aaa4c4a17643a6b\"\n@@ -2308,7 +2311,7 @@ caniuse-db@^1.0.30000187, caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, ca\nversion \"1.0.30000649\"\nresolved \"https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000649.tgz#1ee1754a6df235450c8b7cd15e0ebf507221a86a\"\n-capture-exit@^1.0.4:\n+capture-exit@^1.0.4, capture-exit@^1.2.0:\nversion \"1.2.0\"\nresolved \"https://registry.yarnpkg.com/capture-exit/-/capture-exit-1.2.0.tgz#1c5fcc489fd0ab00d4f1ac7ae1072e3173fbab6f\"\ndependencies:\n@@ -2879,6 +2882,12 @@ core-object@^2.0.2:\ndependencies:\nchalk \"^1.1.3\"\n+core-object@^3.1.0:\n+ version \"3.1.0\"\n+ resolved \"https://registry.yarnpkg.com/core-object/-/core-object-3.1.0.tgz#f5219fec2a19c40956f1c723d121890c88c5f677\"\n+ dependencies:\n+ chalk \"^1.1.3\"\n+\ncore-util-is@~1.0.0:\nversion \"1.0.2\"\nresolved \"https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7\"\n@@ -3209,7 +3218,7 @@ de-indent@^1.0.2:\nversion \"1.0.2\"\nresolved \"https://registry.yarnpkg.com/de-indent/-/de-indent-1.0.2.tgz#b2038e846dc33baa5796128d0804b455b8c1e21d\"\n-debug@*, debug@2, [email protected], debug@^2.1.3, debug@^2.6.0, debug@^2.6.1, debug@^2.6.3:\n+debug@*, debug@2, [email protected], debug@^2.1.3, debug@^2.3.3, debug@^2.6.0, debug@^2.6.1, debug@^2.6.3:\nversion \"2.6.3\"\nresolved \"https://registry.yarnpkg.com/debug/-/debug-2.6.3.tgz#0f7eb8c30965ec08c72accfa0130c8b79984141d\"\ndependencies:\n@@ -3237,7 +3246,7 @@ [email protected]:\ndependencies:\nms \"0.7.2\"\[email protected], debug@^2.0.0, debug@^2.1.0, debug@^2.1.1, debug@^2.2.0, debug@^2.3.3, debug@^2.4.5, debug@^2.5.1:\[email protected], debug@^2.0.0, debug@^2.1.0, debug@^2.1.1, debug@^2.2.0, debug@^2.4.5, debug@^2.5.1:\nversion \"2.6.1\"\nresolved \"https://registry.yarnpkg.com/debug/-/debug-2.6.1.tgz#79855090ba2c4e3115cc7d8769491d58f0491351\"\ndependencies:\n@@ -3426,7 +3435,7 @@ detective@^4.0.0, detective@^4.3.1:\nacorn \"^4.0.3\"\ndefined \"^1.0.0\"\n-devtron@^1.4.0:\[email protected]:\nversion \"1.4.0\"\nresolved \"https://registry.yarnpkg.com/devtron/-/devtron-1.4.0.tgz#b5e748bd6e95bbe70bfcc68aae6fe696119441e1\"\ndependencies:\n@@ -3769,6 +3778,16 @@ electron-installer-redhat@^0.4.0:\nword-wrap \"^1.2.1\"\nyargs \"7.0.2\"\n+electron-is-accelerator@^0.1.0:\n+ version \"0.1.2\"\n+ resolved \"https://registry.yarnpkg.com/electron-is-accelerator/-/electron-is-accelerator-0.1.2.tgz#509e510c26a56b55e17f863a4b04e111846ab27b\"\n+\n+electron-localshortcut@^1.1.1:\n+ version \"1.1.1\"\n+ resolved \"https://registry.yarnpkg.com/electron-localshortcut/-/electron-localshortcut-1.1.1.tgz#2b7fbad4a279d1678011254bc4d3578f195e00d4\"\n+ dependencies:\n+ electron-is-accelerator \"^0.1.0\"\n+\nelectron-osx-sign@^0.4.1:\nversion \"0.4.4\"\nresolved \"https://registry.yarnpkg.com/electron-osx-sign/-/electron-osx-sign-0.4.4.tgz#afdf38450ccaebe6dabeca71fb0fad6294a8c57c\"\n@@ -3813,7 +3832,7 @@ [email protected]:\nelectron-compilers \"*\"\nyargs \"^6.6.0\"\n-electron-protocol-serve@^1.3.0:\[email protected], electron-protocol-serve@^1.3.0:\nversion \"1.3.0\"\nresolved \"https://registry.yarnpkg.com/electron-protocol-serve/-/electron-protocol-serve-1.3.0.tgz#ebcc0afc785fa4f71bc1f17f1336681b13a707a2\"\ndependencies:\n@@ -4407,15 +4426,17 @@ ember-debug-handlers-polyfill@^1.0.2:\ndependencies:\nember-cli-babel \"^5.0.0\"\n-ember-electron@^2.0.1:\n- version \"2.0.1\"\n- resolved \"https://registry.yarnpkg.com/ember-electron/-/ember-electron-2.0.1.tgz#cafd8de424064f7246f68648494cab4bef77dee3\"\n+ember-electron@^2.1.0:\n+ version \"2.1.1\"\n+ resolved \"https://registry.yarnpkg.com/ember-electron/-/ember-electron-2.1.1.tgz#6185995a99892883b34a5ff299014bc0a3111092\"\ndependencies:\nbroccoli-file-creator \"^1.1.1\"\nbroccoli-funnel \"^1.0.1\"\n- broccoli-merge-trees \"^1.1.0\"\n+ broccoli-merge-trees \"^2.0.0\"\nbroccoli-string-replace \"^0.1.1\"\n+ capture-exit \"^1.2.0\"\nchalk \"^1.1.0\"\n+ core-object \"^3.1.0\"\nelectron-forge \"2.9.0\"\nelectron-protocol-serve \"^1.3.0\"\nember-cli-babel \"^5.1.7\"\n@@ -4429,10 +4450,12 @@ ember-electron@^2.0.1:\nnpmi \"^2.0.1\"\nquick-temp \"^0.1.5\"\nrsvp \"^3.2.1\"\n+ silent-error \"^1.0.1\"\nsocket.io \"^1.4.8\"\nsymlink-or-copy \"^1.1.8\"\ntestem \"^1.15.0\"\ntree-kill \"^1.1.0\"\n+ tree-sync \"^1.2.2\"\nember-export-application-global@^1.0.5:\nversion \"1.1.1\"\n@@ -4715,23 +4738,6 @@ [email protected]:\nxmlhttprequest-ssl \"1.5.3\"\nyeast \"0.1.2\"\[email protected]:\n- version \"1.8.3\"\n- resolved \"https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-1.8.3.tgz#1798ed93451246453d4c6f635d7a201fe940d5ab\"\n- dependencies:\n- component-emitter \"1.2.1\"\n- component-inherit \"0.0.3\"\n- debug \"2.3.3\"\n- engine.io-parser \"1.3.2\"\n- has-cors \"1.1.0\"\n- indexof \"0.0.1\"\n- parsejson \"0.0.3\"\n- parseqs \"0.0.5\"\n- parseuri \"0.0.5\"\n- ws \"1.1.2\"\n- xmlhttprequest-ssl \"1.5.3\"\n- yeast \"0.1.2\"\n-\[email protected]:\nversion \"1.3.1\"\nresolved \"https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-1.3.1.tgz#9554f1ae33107d6fbd170ca5466d2f833f6a07cf\"\n@@ -4743,17 +4749,6 @@ [email protected]:\nhas-binary \"0.1.6\"\nwtf-8 \"1.0.0\"\[email protected]:\n- version \"1.3.2\"\n- resolved \"https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-1.3.2.tgz#937b079f0007d0893ec56d46cb220b8cb435220a\"\n- dependencies:\n- after \"0.8.2\"\n- arraybuffer.slice \"0.0.6\"\n- base64-arraybuffer \"0.1.5\"\n- blob \"0.0.4\"\n- has-binary \"0.1.7\"\n- wtf-8 \"1.0.0\"\n-\[email protected]:\nversion \"1.8.0\"\nresolved \"https://registry.yarnpkg.com/engine.io/-/engine.io-1.8.0.tgz#3eeb5f264cb75dbbec1baaea26d61f5a4eace2aa\"\n@@ -4765,17 +4760,6 @@ [email protected]:\nengine.io-parser \"1.3.1\"\nws \"1.1.1\"\[email protected]:\n- version \"1.8.3\"\n- resolved \"https://registry.yarnpkg.com/engine.io/-/engine.io-1.8.3.tgz#8de7f97895d20d39b85f88eeee777b2bd42b13d4\"\n- dependencies:\n- accepts \"1.3.3\"\n- base64id \"1.0.0\"\n- cookie \"0.3.1\"\n- debug \"2.3.3\"\n- engine.io-parser \"1.3.2\"\n- ws \"1.1.2\"\n-\nensure-posix-path@^1.0.0, ensure-posix-path@^1.0.1, ensure-posix-path@^1.0.2:\nversion \"1.0.2\"\nresolved \"https://registry.yarnpkg.com/ensure-posix-path/-/ensure-posix-path-1.0.2.tgz#a65b3e42d0b71cfc585eb774f9943c8d9b91b0c2\"\n@@ -7781,6 +7765,17 @@ [email protected]:\nversion \"1.0.1\"\nresolved \"https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61\"\n+merge-trees@^1.0.1:\n+ version \"1.0.1\"\n+ resolved \"https://registry.yarnpkg.com/merge-trees/-/merge-trees-1.0.1.tgz#ccbe674569787f9def17fd46e6525f5700bbd23e\"\n+ dependencies:\n+ can-symlink \"^1.0.0\"\n+ fs-tree-diff \"^0.5.4\"\n+ heimdalljs \"^0.2.1\"\n+ heimdalljs-logger \"^0.1.7\"\n+ rimraf \"^2.4.3\"\n+ symlink-or-copy \"^1.0.0\"\n+\nmerge@^1.1.3, merge@^1.2.0, merge@~1.2.0:\nversion \"1.2.0\"\nresolved \"https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da\"\n@@ -8018,11 +8013,11 @@ [email protected]:\nversion \"0.0.5\"\nresolved \"https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0\"\[email protected]:\[email protected], mute-stream@~0.0.4:\nversion \"0.0.6\"\nresolved \"https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.6.tgz#48962b19e169fd1dfc240b3f1e7317627bbc47db\"\[email protected], mute-stream@~0.0.4:\[email protected]:\nversion \"0.0.7\"\nresolved \"https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab\"\n@@ -10732,22 +10727,6 @@ [email protected]:\nsocket.io-parser \"2.3.1\"\nto-array \"0.1.4\"\[email protected]:\n- version \"1.7.3\"\n- resolved \"https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-1.7.3.tgz#b30e86aa10d5ef3546601c09cde4765e381da377\"\n- dependencies:\n- backo2 \"1.0.2\"\n- component-bind \"1.0.0\"\n- component-emitter \"1.2.1\"\n- debug \"2.3.3\"\n- engine.io-client \"1.8.3\"\n- has-binary \"0.1.7\"\n- indexof \"0.0.1\"\n- object-component \"0.0.3\"\n- parseuri \"0.0.5\"\n- socket.io-parser \"2.3.1\"\n- to-array \"0.1.4\"\n-\[email protected]:\nversion \"2.3.1\"\nresolved \"https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-2.3.1.tgz#dd532025103ce429697326befd64005fcfe5b4a0\"\n@@ -10757,7 +10736,7 @@ [email protected]:\nisarray \"0.0.1\"\njson3 \"3.3.2\"\[email protected]:\[email protected], socket.io@^1.4.8:\nversion \"1.6.0\"\nresolved \"https://registry.yarnpkg.com/socket.io/-/socket.io-1.6.0.tgz#3e40d932637e6bd923981b25caf7c53e83b6e2e1\"\ndependencies:\n@@ -10769,18 +10748,6 @@ [email protected]:\nsocket.io-client \"1.6.0\"\nsocket.io-parser \"2.3.1\"\n-socket.io@^1.4.8:\n- version \"1.7.3\"\n- resolved \"https://registry.yarnpkg.com/socket.io/-/socket.io-1.7.3.tgz#b8af9caba00949e568e369f1327ea9be9ea2461b\"\n- dependencies:\n- debug \"2.3.3\"\n- engine.io \"1.8.3\"\n- has-binary \"0.1.7\"\n- object-assign \"4.1.0\"\n- socket.io-adapter \"0.5.0\"\n- socket.io-client \"1.7.3\"\n- socket.io-parser \"2.3.1\"\n-\nsort-keys@^1.0.0:\nversion \"1.1.2\"\nresolved \"https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad\"\n@@ -11703,7 +11670,7 @@ tree-kill@^1.1.0:\nversion \"1.1.0\"\nresolved \"https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.1.0.tgz#c963dcf03722892ec59cba569e940b71954d1729\"\n-tree-sync@^1.1.4:\n+tree-sync@^1.1.4, tree-sync@^1.2.2:\nversion \"1.2.2\"\nresolved \"https://registry.yarnpkg.com/tree-sync/-/tree-sync-1.2.2.tgz#2cf76b8589f59ffedb58db5a3ac7cb013d0158b7\"\ndependencies:\n@@ -12244,13 +12211,6 @@ [email protected]:\noptions \">=0.0.5\"\nultron \"1.0.x\"\[email protected]:\n- version \"1.1.2\"\n- resolved \"https://registry.yarnpkg.com/ws/-/ws-1.1.2.tgz#8a244fa052401e08c9886cf44a85189e1fd4067f\"\n- dependencies:\n- options \">=0.0.5\"\n- ultron \"1.0.x\"\n-\[email protected]:\nversion \"1.0.0\"\nresolved \"https://registry.yarnpkg.com/wtf-8/-/wtf-8-1.0.0.tgz#392d8ba2d0f1c34d1ee2d630f15d0efb68e1048a\"\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | updated yarn file |
288,235 | 20.04.2017 16:35:53 | -19,080 | 94fe540db5f3f9aaf1bf7c4c3fe5107c397aa5a9 | changes per requested | [
{
"change_type": "MODIFY",
"old_path": "app/inventory/listing/template.hbs",
"new_path": "app/inventory/listing/template.hbs",
"diff": "{{#if canDeleteItem}}\n<button class=\"btn btn-default warning\" {{action 'deleteItem' inventory bubbles=false }}><span class=\"octicon octicon-x\"></span> {{t 'buttons.delete'}}</button>\n{{/if}}\n- {{#link-to 'inventory.barcode' inventory class=\"btn btn-extra\" bubbles=false }}{{t 'buttons.barcode'}}{{/link-to}}\n+ {{#link-to 'inventory.barcode' inventory class=\"btn btn-default neutral\" bubbles=false }}{{t 'buttons.barcode'}}{{/link-to}}\n</td>\n</tr>\n{{/unless}}\n"
},
{
"change_type": "MODIFY",
"old_path": "app/inventory/reports/template.hbs",
"new_path": "app/inventory/reports/template.hbs",
"diff": "</table>\n</div>\n<div class=\"panel-footer\">\n- <a href={{csvExport}} target=\"_blank\" download=\"{{reportTitle}}.csv\" class=\"btn btn-default\">{{t 'inventory.reports.export'}}</a>\n+ <a href={{csvExport}} target=\"_blank\" download=\"{{reportTitle}}.csv\" class=\"btn btn-primary\">{{t 'inventory.reports.export'}}</a>\n</div>\n</div>\n"
},
{
"change_type": "MODIFY",
"old_path": "app/styles/_variables_mixins.scss",
"new_path": "app/styles/_variables_mixins.scss",
"diff": "@@ -6,8 +6,6 @@ $black: #000;\n$green: #00bd9c;\n$green_light: #13d8b6;\n$navy: #2e4359;\n-$navy_dark: #3e95ff;\n-$navy_darker: #0173ff;\n$navy_mid: #546a83;\n$navy_mid2: #2f4358;\n$navy_mid3: #3a4d63;\n@@ -21,8 +19,6 @@ $blue_light2: #e9f3ff;\n$blue_light3: #dde5ee;\n$blue_lightest: #eff2f5;\n$blue_lightest2: #dee2e7;\n-$blue_dark: #799fd2;\n-$blue_darker: #4a7ec3;\n$red: #ff6d6f;\n$red_light: rgba($red,.3);\n$red_lighter: rgba($red,.75);\n"
},
{
"change_type": "MODIFY",
"old_path": "app/styles/components/_buttons.scss",
"new_path": "app/styles/components/_buttons.scss",
"diff": "}\n&.neutral {\n- background-color: $navy_dark;\n- color: $white;\n+ background-color: $gray_light;\n+ color: $gray;\n&:hover,\n&:focus {\n- background-color: $navy_darker;\n- color: $white;\n+ opacity: .8;\n}\n}\n- &.btn-extra {\n- background-color: $blue_dark;\n- color: $white;\n-\n- &:hover,\n- &:focus {\n- background-color: $blue_darker;\n- color: $white;\n- }\n+ &.admit {\n+ width: 110px;\n}\n- &.admit {\n- width: 103px;\n+ &.info {\n+ width: 110px;\n}\n.octicon {\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | changes per requested |
288,284 | 20.04.2017 10:06:39 | 14,400 | 889a5a55898b56e2719f62dbd9e909b4bfe82f0f | Fixed error testing in PhantomJS | [
{
"change_type": "MODIFY",
"old_path": "ember-cli-build.js",
"new_path": "ember-cli-build.js",
"diff": "@@ -4,7 +4,10 @@ var EmberApp = require('ember-cli/lib/broccoli/ember-app');\nmodule.exports = function(defaults) {\nvar app = new EmberApp(defaults, {\n- // Add options here\n+ babel: {\n+ optional: ['es6.spec.symbols'],\n+ includePolyfill: true\n+ }\n});\n// Use `app.import` to add additional libraries to the generated\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Fixed error testing in PhantomJS |
288,335 | 24.04.2017 08:07:15 | 25,200 | 9f2ea761a4c139e693232e2fb65ab9d6de4c2736 | fix translation-sync instruction and script | [
{
"change_type": "MODIFY",
"old_path": ".github/CONTRIBUTING.md",
"new_path": ".github/CONTRIBUTING.md",
"diff": "@@ -163,7 +163,7 @@ New test should be added for any new features or views in the app. For more info\nIf you know a language other than English and would like to help translate this app, please follow the following steps:\n### Install necessary node modules\n-```npm install -g babel-cli eslint-cli```\n+```npm install -g babel-cli eslint-cli babel-preset-es2015```\n### Run script to populate missing translation terms\n```npm run translation-sync```\n"
},
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "\"start\": \"./script/server\",\n\"test\": \"./script/test\",\n\"electron-test\": \"ember electron:test\",\n- \"translation-sync\": \"babel-node script/translation/sync.js --presets es2015,stage-2; eslint --fix app/locales\"\n+ \"translation-sync\": \"babel-node script/translation/sync.js --presets es2015 && eslint --fix app/locales\"\n},\n\"repository\": {\n\"type\": \"git\",\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | fix translation-sync instruction and script (#1067) |
288,284 | 27.04.2017 09:51:34 | 14,400 | 457c1d5d4d776b6bdbc22ba8e7333a3140e3cf22 | Upgrade to Pikaday 1.5.1
Resolves | [
{
"change_type": "MODIFY",
"old_path": "bower.json",
"new_path": "bower.json",
"diff": "\"filer.js\": \"https://github.com/ebidel/filer.js.git#~0.4.3\",\n\"idb.filesystem\": \"https://github.com/ebidel/idb.filesystem.js.git#~0.0.6\",\n\"octicons\": \"~2.4.1\",\n- \"pikaday\": \"https://github.com/owenmead/Pikaday.git#~1.3.3\",\n+ \"pikaday\": \"https://github.com/owenmead/Pikaday.git#1.5.1\",\n\"typeahead.js\": \"~0.11.1\",\n\"pouchdb-load\": \"^1.4.0\",\n\"pretender\": \"~0.10.0\",\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Upgrade to Pikaday 1.5.1
Resolves #1054 |
288,284 | 10.05.2017 13:16:37 | 14,400 | def70414a150d6a473eb7b5d1809b259f6fd3490 | Lock down ember-data and ember-electron
Fixes tests failing | [
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "\"ember-cli-uglify\": \"^1.2.0\",\n\"ember-concurrency\": \"0.8.1\",\n\"ember-concurrency-test-waiter\": \"0.2.0\",\n- \"ember-data\": \"^2.10.0\",\n- \"ember-electron\": \"^2.1.0\",\n+ \"ember-data\": \"2.10.0\",\n+ \"ember-electron\": \"2.1.0\",\n\"ember-export-application-global\": \"^1.0.5\",\n\"ember-fullcalendar\": \"1.7.0\",\n\"ember-i18n\": \"4.4.0\",\n},\n\"dependencies\": {\n\"electron-compile\": \"^6.3.0\",\n- \"electron-localshortcut\": \"^1.1.1\",\n- \"ember-electron\": \"^2.1.0\"\n+ \"electron-localshortcut\": \"^1.1.1\"\n},\n\"ember-addon\": {\n\"paths\": [\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Lock down ember-data and ember-electron
Fixes tests failing |
288,284 | 11.05.2017 14:51:20 | 14,400 | db49ee69b386d37d9f81ceac86ec9ec1d8f403d4 | Lock down pbkdf2
This was causing tests to fail with pbkdf2 3.0.11 | [
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "\"pouchdb-adapter-memory\": \"6.1.2\",\n\"pouchdb-list\": \"^1.1.0\",\n\"pouchdb-users\": \"^1.0.3\",\n+ \"pbkdf2\": \"3.0.9\",\n\"stylelint\": \"~7.7.1\",\n\"stylelint-config-concentric\": \"1.0.7\",\n\"stylelint-declaration-use-variable\": \"1.6.0\",\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Lock down pbkdf2
This was causing tests to fail with pbkdf2 3.0.11 |
288,253 | 19.05.2017 21:11:56 | -3,600 | 53315a9df6459f3605ae8151430f292071a97972 | Normalize line endings
Previously, lines were ended in a variety of ways. Most significantly,
the use of periods and blanks was mixed. I've added periods and colons
to all appropriate locations. | [
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -30,11 +30,11 @@ Contributions are welcome via pull requests and issues. Please see our [contrib\n## Installation\nTo install the frontend please do the following:\n-1. Make sure you have installed [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)\n-2. Make sure you have installed [Node.js](https://nodejs.org/en/download/). Versions 6.0.0 and higher should work\n+1. Make sure you have installed [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).\n+2. Make sure you have installed [Node.js](https://nodejs.org/en/download/). Versions 6.0.0 and higher should work.\n3. Install [ember-cli latest](https://www.npmjs.org/package/ember-cli): `npm install -g ember-cli@latest`.\nDepending on your [npm permissions](https://docs.npmjs.com/getting-started/fixing-npm-permissions) you might need root access to install ember-cli.\n-4. Install [bower](https://www.npmjs.org/package/bower): `npm install -g bower`\n+4. Install [bower](https://www.npmjs.org/package/bower): `npm install -g bower`.\n5. Clone this repo with `git clone https://github.com/HospitalRun/hospitalrun-frontend`, go to the cloned folder and run `script/bootstrap`.\n- **Note:** *If you are using Windows with `cygwin` please run the script in the following way to remove trailing `\\r` characters:*\n``` bash\n@@ -42,20 +42,20 @@ To install the frontend please do the following:\n```\n- **Note:** *Depending on your [npm permissions](https://docs.npmjs.com/getting-started/fixing-npm-permissions) you might need root access to install PhantomJS2; also, Windows users must run with [Cygwin](http://cygwin.org/)).*\n- **Note:** *If you just want to use the project, cloning is the best option. However, if you wish to contribute to the project, you will need to fork the project first, and then clone your `hospitalrun-frontend` fork and make your contributions via a branch on your fork.*\n-6. Install and configure [CouchDB](http://couchdb.apache.org/)\n- 1. Download and install CouchDB from http://couchdb.apache.org/#download\n- 2. Start CouchDB\n+6. Install and configure [CouchDB](http://couchdb.apache.org/):\n+ 1. Download and install CouchDB from http://couchdb.apache.org/#download.\n+ 2. Start CouchDB:\n1. If you downloaded the installed app, navigate to CouchDB and double-click on the application.\n- 2. If you installed CouchDB via Homebrew or some other command line tool, launch the tool from the command line\n+ 2. If you installed CouchDB via Homebrew or some other command line tool, launch the tool from the command line.\n3. If you're stuck with the installation, check out the instructions published here: http://docs.couchdb.org/en/1.6.1/install/index.html\n- 3. Verify that CouchDB is running by successfully navigating to 127.0.0.1:5984/_utils. If that fails, check the installation guide for CouchDB http://docs.couchdb.org/en/1.6.1/install/index.html\n+ 3. Verify that CouchDB is running by successfully navigating to 127.0.0.1:5984/_utils. If that fails, check the installation guide for CouchDB: http://docs.couchdb.org/en/1.6.1/install/index.html.\n4. Create admin user:\n- 1. If you are running CouchDB 1.x\n- 1. If you have just installed CouchDB and have no admin user, please run `./script/initcouch.sh` in the folder you cloned the HospitalRun repo. A user `hradmin` will be created with password: `test`.\n+ 1. If you are running CouchDB 1.x:\n+ 1. If you have just installed CouchDB and have no admin user, please run `./script/initcouch.sh` in the folder you cloned the HospitalRun repo. A user `hradmin` will be created with password `test`.\n2. If you already have a CouchDB admin user, please run `./script/initcouch.sh USER PASS` in the folder you cloned the HospitalRun repo. `USER` and `PASS` are the CouchDB admin user credentials.\n- 2. If you are running CouchDB 2.x (experimental)\n+ 2. If you are running CouchDB 2.x (experimental):\n1. HospitalRun currently does not fully support CouchDB 2.x, but you are welcome to try using it. Most functionality should work but currently creating and/or editing users does not work in CouchDB 2.x. See https://github.com/HospitalRun/hospitalrun-frontend/issues/953 for more details.\n- 2. If you have just installed CouchDB and have no admin user, please run `./script/initcouch2.sh` in the folder you cloned the HospitalRun repo. A user `hradmin` will be created with password: `test`.\n+ 2. If you have just installed CouchDB and have no admin user, please run `./script/initcouch2.sh` in the folder you cloned the HospitalRun repo. A user `hradmin` will be created with password `test`.\n3. If you already have a CouchDB admin user, please run `./script/initcouch2.sh USER PASS` in the folder you cloned the HospitalRun repo. `USER` and `PASS` are the CouchDB admin user credentials.\n7. Copy the `server/config-example.js` to `server/config.js` in the folder you cloned the HospitalRun repo. If you already had a CouchDB admin user that you passed into the couch script (`./script/initcouch.sh USER PASS`), then you will need to modify the `couchAdminUser` and `couchAdminPassword` values in `server/config.js` to reflect those credentials. (*Note: If on Mac, you need to make sure CouchDB can be run. See [How to open an app from a unidentified developer and exempt it from Gatekeeper](https://support.apple.com/en-us/HT202491).*)\n8. Verify that CouchDB is running by visiting: http://127.0.0.1:5984/_utils/#login\n@@ -78,13 +78,13 @@ To run HospitalRun with [Docker](https://www.docker.com/) please do the followin\n- Go to [https://docs.docker.com/engine/installation](https://docs.docker.com/engine/installation) to download and install Docker.\n- Clone the repository with the command `git clone https://github.com/HospitalRun/hospitalrun-frontend.git`.\n- Change to the hospitalrun-frontend directory `cd hospitalrun-frontend`.\n-- Build the HospitalRun image with `docker build -t hospitalrun-frontend .`\n+- Build the HospitalRun image with `docker build -t hospitalrun-frontend .`.\n- Execute `docker run -it --name couchdb -d couchdb` to create the couchdb container.\n- Execute `docker run -it --name hospitalrun-frontend -p 4200:4200 --link couchdb:couchdb -d hospitalrun-frontend` to create the HospitalRun container.\n### Running with Docker Compose\nTo run HospitalRun with Docker-compose please do the following:\n-- Go to [https://docs.docker.com/compose/install](https://docs.docker.com/compose/install/) to install Docker-compose\n+- Go to [https://docs.docker.com/compose/install](https://docs.docker.com/compose/install/) to install Docker-compose.\n- Execute 'docker-compose up' to reduce the steps to build and run the application.\n### Accessing HospitalRun with Docker Toolbox\n@@ -128,7 +128,7 @@ Fixtures are [PouchDB](https://pouchdb.com/) dumps that are generated with [pouc\nTo create a fixture, run `pouchdb-dump http://localhost:5984/main -u hradmin -p test | cat > tests/fixtures/${name_of_fixture}.txt`.\n-To use a fixture, use `runWithPouchDump(${name_of_fixture}, function(){..});` in your acceptance test. For example,\n+To use a fixture, use `runWithPouchDump(${name_of_fixture}, function(){..});` in your acceptance test. For example:\n```js\ntest('visiting /patients', function(assert) {\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Normalize line endings
Previously, lines were ended in a variety of ways. Most significantly,
the use of periods and blanks was mixed. I've added periods and colons
to all appropriate locations. |
288,276 | 20.05.2017 01:27:52 | 0 | 7658ec57f7655dd43d4a92bdaa599aa3b027be9d | added setup for cloud9 | [
{
"change_type": "ADD",
"old_path": null,
"new_path": "script/setupcloud9",
"diff": "+#!/bin/sh\n+\n+sudo mkdir -p /var/run/couchdb\n+sudo chown couchdb:couchdb /var/run/couchdb\n+\n+nvm install 6\n+nvm use 6\n+nvm alias default 6\n+\n+npm install -g npm #optional\n+npm cache clean -f #optional\n+npm install -g n #optional\n+sudo n stable #optional\n+npm install -g ember-cli@latest\n+npm install -g bower\n+npm install\n+bower install\n+npm install -g phantomjs-prebuilt\n+\n+sudo su couchdb -c /usr/bin/couchdb &\n+sleep 5\n+\n+./script/initcouch.sh\n+cp ./server/config-example.js ./server/config.js\n+\n+./script/test\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | added setup for cloud9 |
288,276 | 20.05.2017 02:26:15 | 0 | aa63f416022c428a8311948c879e4dcf8f78b748 | cleanup setupcloud9 shell script | [
{
"change_type": "MODIFY",
"old_path": "script/setupcloud9",
"new_path": "script/setupcloud9",
"diff": "#!/bin/sh\n+# Usage: source ./script/setupcloud9\n+# Sets up the development environment on a cloud9 workspace and runs the tests to verify.\n+\nsudo mkdir -p /var/run/couchdb\nsudo chown couchdb:couchdb /var/run/couchdb\n@@ -7,10 +10,10 @@ nvm install 6\nnvm use 6\nnvm alias default 6\n-npm install -g npm #optional\n-npm cache clean -f #optional\n-npm install -g n #optional\n-sudo n stable #optional\n+npm install -g npm\n+npm cache clean -f\n+npm install -g n\n+sudo n stable\nnpm install -g ember-cli@latest\nnpm install -g bower\nnpm install\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | cleanup setupcloud9 shell script |
288,276 | 21.05.2017 02:11:24 | 0 | 333fa66aff963d5783076c9c2ba15893eea010bf | Detect if cloud9 setup script is running in the proper context | [
{
"change_type": "MODIFY",
"old_path": "script/setupcloud9",
"new_path": "script/setupcloud9",
"diff": "# Sets up the development environment on a cloud9 workspace and runs the tests to verify.\n-sudo mkdir -p /var/run/couchdb\n-sudo chown couchdb:couchdb /var/run/couchdb\n+if nvm > /dev/null 2>&1; then\n+ echo \"setting proper node version\"\n+\n+else\n+ echo \"Cannot find nvm. This probably means you are running this script in its own shell. Try again with source ./script/setupcloud9\"\n+ return 1\n+fi\n+\nnvm install 6\nnvm use 6\nnvm alias default 6\n+\n+sudo mkdir -p /var/run/couchdb\n+sudo chown couchdb:couchdb /var/run/couchdb\n+\n+\nnpm install -g npm\nnpm cache clean -f\nnpm install -g n\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Detect if cloud9 setup script is running in the proper context |
288,376 | 22.05.2017 13:26:13 | 14,400 | 30ccd2055bb3940c1df228def86dfbfea085f5d6 | moved electron-protocol-serve to dependencies
The electron build was failing on build. Corrected now. | [
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "\"csv-parse\": \"^1.2.0\",\n\"devtron\": \"1.4.0\",\n\"electron-prebuilt-compile\": \"1.6.2\",\n- \"electron-protocol-serve\": \"1.3.0\",\n\"electron-rebuild\": \"^1.5.7\",\n\"ember-ajax\": \"^3.0.0\",\n\"ember-browserify\": \"^1.1.12\",\n},\n\"dependencies\": {\n\"electron-compile\": \"^6.3.0\",\n- \"electron-localshortcut\": \"^1.1.1\"\n+ \"electron-localshortcut\": \"^1.1.1\",\n+ \"electron-protocol-serve\": \"1.3.0\"\n},\n\"ember-addon\": {\n\"paths\": [\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | moved electron-protocol-serve to dependencies
The electron build was failing on build. Corrected now. |
288,395 | 23.05.2017 00:52:40 | 18,000 | cbaba2518dd87bc636bad7b7878cfd66733448a3 | updated winstaller config icon path for error free windows build | [
{
"change_type": "MODIFY",
"old_path": "ember-electron/electron-forge-config.js",
"new_path": "ember-electron/electron-forge-config.js",
"diff": "@@ -40,7 +40,7 @@ module.exports = {\nicon: 'assets/icons/favicon',\nname: 'HospitalRun',\nnoMSI: true,\n- setupIcon: path.join(__dirname, '../../../assets/icons/favicon.ico'),\n+ setupIcon: path.join(__dirname, '../assets/icons/favicon.ico'),\nsetupExe: 'HospitalRun.exe',\ntitle: 'HospitalRun'/* ,\ncertificateFile: '',\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | updated winstaller config icon path for error free windows build |
288,405 | 20.06.2017 10:49:11 | 14,400 | 564b1a342846fd70a52ea80cec20d087fca0a88d | First working acceptance test for appointments/search path; ensures only the correct appointment is displayed based on its start date | [
{
"change_type": "MODIFY",
"old_path": "app/appointments/search/template.hbs",
"new_path": "app/appointments/search/template.hbs",
"diff": "+\n{{#item-listing paginationProps=paginationProps }}\n<div class=\"panel panel-info\">\n<div class=\"panel-body\">\n{{#em-form model=model submitButton=false }}\n<div class=\"row\">\n- {{date-picker property=\"selectedStartingDate\" label=(t \"appointments.labels.selectedStartingDate\")class=\"col-sm-3\"}}\n- {{em-select class=\"col-sm-3 form-input-group\" property=\"selectedStatus\"\n+ {{date-picker property=\"selectedStartingDate\" label=(t \"appointments.labels.selectedStartingDate\")class=\"col-sm-3 test-selected-start-date\"}}\n+ {{em-select class=\"col-sm-3 form-input-group test-selected-status\" property=\"selectedStatus\"\nlabel=(t \"models.appointment.labels.status\") content=appointmentStatusesWithEmpty\n}}\n- {{em-select class=\"col-sm-3 form-input-group\" label=(t \"models.appointment.labels.type\")\n+ {{em-select class=\"col-sm-3 form-input-group test-selected-appointment-type\" label=(t \"models.appointment.labels.type\")\nproperty=\"selectedAppointmentType\" content=visitTypesWithEmpty\n}}\n- {{em-select class=\"col-sm-3 form-input-group\" property=\"selectedProvider\"\n+ {{em-select class=\"col-sm-3 form-input-group test-selected-provider\" property=\"selectedProvider\"\nlabel=(t 'models.appointment.labels.provider') content=physicianList\n}}\n</div>\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/acceptance/appointments-test.js",
"new_path": "tests/acceptance/appointments-test.js",
"diff": "@@ -201,6 +201,51 @@ test('Appointment calendar', function(assert) {\n});\n});\n+test('visiting /appointments/search', function(assert) {\n+ runWithPouchDump('appointments', function() {\n+ authenticateUser();\n+\n+ createAppointment(assert);\n+ createAppointment(assert, {\n+ startDate: moment().startOf('day').add(1, 'years'),\n+ startTime: moment().startOf('day').add(1, 'years').format(TIME_FORMAT),\n+ endDate: moment().endOf('day').add(1, 'years').add(2, 'days'),\n+ endTime: moment().endOf('day').add(1, 'years').add(2, 'days').format(TIME_FORMAT)\n+ });\n+\n+ andThen(function() {\n+ visit('/appointments/search');\n+ });\n+\n+ andThen(function() {\n+ findWithAssert(':contains(Search Appointments)');\n+ findWithAssert(':contains(Show Appointments On Or After)');\n+ findWithAssert(':contains(Status)');\n+ findWithAssert(':contains(Type)');\n+ findWithAssert(':contains(With)');\n+ });\n+\n+ andThen(function() {\n+ // debugger;\n+ let desiredDate = moment().endOf('day').add(363, 'days').format('l');\n+ let datePicker = '.test-selected-start-date input';\n+ selectDate(datePicker, desiredDate);\n+ click('button:contains(Search)');\n+ });\n+\n+ andThen(function() {\n+ let date = moment().endOf('day').add(1, 'years').add(2, 'days').format('l');\n+ findWithAssert(`.appointment-status:contains(${status})`);\n+ let element = `tr:contains(${date})`;\n+ findWithAssert(element);\n+ date = moment().startOf('day').add(1, 'years');\n+ element = find(`tr:contains(${date})`);\n+ assert.equal(element.length, 0);\n+ });\n+\n+ });\n+});\n+\ntest('Theater scheduling', function(assert) {\nrunWithPouchDump('appointments', function() {\nauthenticateUser();\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | First working acceptance test for appointments/search path; ensures only the correct appointment is displayed based on its start date (#1100) |
288,321 | 20.06.2017 15:43:32 | 18,000 | 3270cc9b337b80b879d627be70eb0e797f4b74d3 | updated initcouch2.sh script with missing double quotes around an admin value _users/_security json | [
{
"change_type": "MODIFY",
"old_path": "script/initcouch2.sh",
"new_path": "script/initcouch2.sh",
"diff": "@@ -14,7 +14,7 @@ else\nfi\necho \"Setting up security on _users db\"\n-curl -X PUT $SECUREHOST/_users/_security -d '{ \"admins\": { \"names\": [], \"roles\": [\"admin\"]}, \"members\": { \"names\": [], \"roles\": [admin]}}'\n+curl -X PUT $SECUREHOST/_users/_security -d '{ \"admins\": { \"names\": [], \"roles\": [\"admin\"]}, \"members\": { \"names\": [], \"roles\": [\"admin\"]}}'\necho \"Setting up HospitalRun config DB\"\ncurl -X PUT $SECUREHOST/config\ncurl -X PUT $SECUREHOST/config/_security -d '{ \"admins\": { \"names\": [], \"roles\": [\"admin\"]}, \"members\": { \"names\": [], \"roles\": []}}'\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | updated initcouch2.sh script with missing double quotes around an admin value _users/_security json (#1098) |
288,284 | 20.06.2017 17:01:00 | 14,400 | 6067889a80d1f7d159f1c4c506b4af8bf1185f9a | Make initcouch and initcouch2 consistent. | [
{
"change_type": "MODIFY",
"old_path": "script/initcouch.sh",
"new_path": "script/initcouch.sh",
"diff": "@@ -10,13 +10,19 @@ if [ -z \"${1}\" ] || [ -z \"${2}\" ]; then\nelse\nSECUREHOST=\"http://$1:$2@$URL:$PORT\"\nfi\n-curl -X PUT $SECUREHOST/_users/_security -d '{ \"admins\": { \"names\": [], \"roles\": [\"admin\"]}, \"members\": { \"names\": [], \"roles\": [admin]}}'\n+\n+echo \"Setting up security on _users db\"\n+curl -X PUT $SECUREHOST/_users/_security -d '{ \"admins\": { \"names\": [], \"roles\": [\"admin\"]}, \"members\": { \"names\": [], \"roles\": [\"admin\"]}}'\n+echo \"Setting up HospitalRun config DB\"\ncurl -X PUT $SECUREHOST/config\ncurl -X PUT $SECUREHOST/config/_security -d '{ \"admins\": { \"names\": [], \"roles\": [\"admin\"]}, \"members\": { \"names\": [], \"roles\": []}}'\ncurl -X PUT $SECUREHOST/config/_design/auth -d \"{ \\\"validate_doc_update\\\": \\\"function(newDoc, oldDoc, userCtx) {if(userCtx.roles.indexOf('_admin')!== -1) {return;} else {throw({forbidden: 'This DB is read-only'});}}\\\"}\"\n+echo \"Setting up HospitalRun main DB\"\ncurl -X PUT $SECUREHOST/main\ncurl -X PUT $SECUREHOST/main/_security -d '{ \"admins\": { \"names\": [], \"roles\": [\"admin\"]}, \"members\": { \"names\": [], \"roles\": [\"user\"]}}'\n+echo \"Configure CouchDB authentication\"\ncurl -X PUT $SECUREHOST/main/_design/auth -d \"{\\\"validate_doc_update\\\": \\\"function(newDoc, oldDoc, userCtx) { if(userCtx.roles.indexOf('_admin')!== -1 || userCtx.roles.indexOf('admin')!== -1){ if (newDoc._id.indexOf('_design') === 0) { return; }}if (newDoc._id.indexOf('_') !== -1) {var idParts=newDoc._id.split('_');if (idParts.length >= 3) { var allowedTypes=['allergy','appointment','attachment','billingLineItem','customForm','diagnosis','imaging','incCategory','incidentNote','incident','invLocation','invPurchase','invRequest','inventory','invoice','lab','lineItemDetail','lookup','medication','operationReport','operativePlan','option','overridePrice','patientNote','patient','payment','photo','priceProfile','pricing','procCharge','procedure','report','sequence','userRole','visit','vital'];if (allowedTypes.indexOf(idParts[0]) !== -1) {if(newDoc._deleted || newDoc.data) {return;}}}}throw({forbidden: 'Invalid data'});}\\\"}\"\ncurl -X PUT $SECUREHOST/_config/http/authentication_handlers -d '\"{couch_httpd_oauth, oauth_authentication_handler}, {couch_httpd_auth, proxy_authentification_handler}, {couch_httpd_auth, cookie_authentication_handler}, {couch_httpd_auth, default_authentication_handler}\"'\ncurl -X PUT $SECUREHOST/_config/couch_httpd_oauth/use_users_db -d '\"true\"'\n+echo \"Add hradmin user for use in HospitalRun\"\ncurl -X PUT $SECUREHOST/_users/org.couchdb.user:hradmin -d '{\"name\": \"hradmin\", \"password\": \"test\", \"roles\": [\"System Administrator\",\"admin\",\"user\"], \"type\": \"user\", \"userPrefix\": \"p1\"}'\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Make initcouch and initcouch2 consistent. |
288,342 | 27.06.2017 01:16:36 | -36,000 | 64c219c786a19671a2a809a7914302195b5c672f | Update links to 2.10 ember docs
Minor, but thought it'd be appropriate since HospitalRun is now using ember 2.10 | [
{
"change_type": "MODIFY",
"old_path": ".github/CONTRIBUTING.md",
"new_path": ".github/CONTRIBUTING.md",
"diff": "@@ -40,7 +40,7 @@ This section is designed to help developers start coding in the project and unde\n### Ember\n-To understand the project you'll have to understand [Ember](http://emberjs.com), and it is advisable that you'll follow the tutorial: [Create your own app](https://guides.emberjs.com/v2.9.0/tutorial/ember-cli/) to get an understanding of how Ember works and the basic folder structure. You can find more Ember guides [here](https://guides.emberjs.com/v2.9.0/).\n+To understand the project you'll have to understand [Ember](http://emberjs.com), and it is advisable that you'll follow the tutorial: [Create your own app](https://guides.emberjs.com/v2.10.0/tutorial/ember-cli/) to get an understanding of how Ember works and the basic folder structure. You can find more Ember guides [here](https://guides.emberjs.com/v2.10.0/).\n### ES6\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Update links to 2.10 ember docs (#1105)
Minor, but thought it'd be appropriate since HospitalRun is now using ember 2.10 |
288,343 | 28.06.2017 13:28:56 | 14,400 | 47adb29064b426479bea2e2689ee732b96f8e8d7 | Improve contributing doc | [
{
"change_type": "MODIFY",
"old_path": ".github/CONTRIBUTING.md",
"new_path": ".github/CONTRIBUTING.md",
"diff": "@@ -4,7 +4,11 @@ Contributions are welcome via pull requests and issues. Before submitting a pull\n## Slack / Communication\n-Project communication occurs primarily and intentionally via our project [Slack](https://hospitalrun.slack.com/). Those interested in / considering contribution are encouraged to [join](https://hospitalrun-slackin.herokuapp.com/).\n+Project communication occurs primarily and intentionally via our project [Slack](https://hospitalrun.slack.com/). Those interested in / considering contribution are encouraged to [join](https://hospitalrun-slackin.herokuapp.com/). Project maintainers, contributors, and other community members in the Slack channel are usually available to answer questions, so feel free to ask about anything you need help with in the General channel.\n+\n+However, before you ask in Slack \"what can I contribute to\", be sure to keep reading this document for the answer to your question. :-)\n+\n+Also, please avoid use of the `@here` command in Slack, as you will be sending a notification to nearly 600 people. Just post your question and someone will respond soon.\n## Help Wanted\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Improve contributing doc (#1114) |
288,383 | 03.07.2017 16:08:46 | -3,600 | f18dee4b052d0af5f729062119c4cfd18fdb009c | Readme: Add HospitalRun link and brief description
Makes it easier for people arriving to this repository without context to understand what they're looking at. | [
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "HospitalRun frontend\n========\n-_Ember frontend for HospitalRun_\n+_Ember frontend for [HospitalRun](http://hospitalrun.io/): free software for developing world hospitals_\n[](https://travis-ci.org/HospitalRun/hospitalrun-frontend) [](http://couchdb.apache.org/)\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Readme: Add HospitalRun link and brief description (#1112)
Makes it easier for people arriving to this repository without context to understand what they're looking at. |
288,278 | 24.08.2017 20:37:18 | -36,000 | 8bff07b4036605a73975a076c23db2c1fa2fd5bc | fixed max date property on total patient day reports | [
{
"change_type": "MODIFY",
"old_path": "app/patients/reports/template.hbs",
"new_path": "app/patients/reports/template.hbs",
"diff": "{{else}}\n<div class=\"row\">\n<div data-test-selector=\"select-report-start-date\">\n- {{date-picker property=\"startDate\" label=\"Start Date\" class=\"col-sm-4\"}}\n+ {{date-picker property=\"startDate\" label=\"Start Date\" class=\"col-sm-4\" maxDate=\"now\"}}\n</div>\n<div data-test-selector=\"select-report-end-date\">\n- {{date-picker property=\"endDate\" label=\"End Date\" class=\"col-sm-4\"}}\n+ {{date-picker property=\"endDate\" label=\"End Date\" class=\"col-sm-4\" maxDate=\"now\"}}\n</div>\n</div>\n{{/if}}\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | fixed max date property on total patient day reports |
288,278 | 24.08.2017 23:34:19 | -36,000 | 31ddf7b0455aecff7f06c80b6ed771fc084e0b70 | form clearance after adding a contact | [
{
"change_type": "MODIFY",
"old_path": "app/patients/add-contact/controller.js",
"new_path": "app/patients/add-contact/controller.js",
"diff": "@@ -18,6 +18,7 @@ export default Ember.Controller.extend(IsUpdateDisabled, {\nadd() {\nlet newContact = this.getProperties('name', 'phone', 'email', 'relationship');\nthis.get('editController').send('addContact', newContact);\n+ this.setProperties({ name: '', phone: '', email: '', relationship: '' });\n}\n}\n});\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | form clearance after adding a contact |
288,273 | 26.08.2017 13:30:39 | -19,080 | 7010f53765684e81d73d7b3010f438f33f1cde36 | Fixed the issue of number of patients under Reports not showing as whole number. | [
{
"change_type": "MODIFY",
"old_path": "app/patients/reports/controller.js",
"new_path": "app/patients/reports/controller.js",
"diff": "@@ -660,16 +660,16 @@ export default AbstractReportController.extend(PatientDiagnosis, PatientVisits,\npatientName: visit.get('patient.displayName'),\nadmissionDate: visit.get('startDate'),\ndischargeDate: visit.get('endDate'),\n- patientDays: daysDiff\n+ patientDays: this._numberFormat(daysDiff, true)\n}, false, reportColumns);\n}\nreturn previousValue += daysDiff;\n}.bind(this), 0);\nif (detailed) {\n- this._addReportRow({ patientDays: `Total: ${this._numberFormat(patientDays)}` }, true, reportColumns);\n+ this._addReportRow({ patientDays: `Total: ${this._numberFormat(patientDays, true)}` }, true, reportColumns);\n} else {\n- this._addReportRow({ total: patientDays }, false, reportColumns);\n+ this._addReportRow({ total: this._numberFormat(patientDays, true) }, false, reportColumns);\n}\nthis._finishReport(reportColumns);\n},\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | #1146 - Fixed the issue of number of patients under Reports not showing as whole number. |
288,238 | 04.09.2017 18:54:10 | -7,200 | 0f6d58ef5fe26b68422bb4c4ca20f61a43b2c1c1 | Remove deprecated npm crypto module dependency. Close | [
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "\"broccoli-asset-rev\": \"^2.4.5\",\n\"broccoli-export-text\": \"0.0.2\",\n\"broccoli-serviceworker\": \"0.1.6\",\n- \"crypto\": \"1.0.0\",\n\"csv-parse\": \"^1.2.0\",\n\"devtron\": \"1.4.0\",\n\"electron-prebuilt-compile\": \"1.6.2\",\n"
},
{
"change_type": "MODIFY",
"old_path": "yarn.lock",
"new_path": "yarn.lock",
"diff": "@@ -3016,10 +3016,6 @@ [email protected]:\nversion \"1.0.9\"\nresolved \"https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-1.0.9.tgz#cc5449685dfb85eb11c9828acc7cb87ab5bbfcc0\"\[email protected]:\n- version \"0.0.3\"\n- resolved \"https://registry.yarnpkg.com/crypto/-/crypto-0.0.3.tgz#470a81b86be4c5ee17acc8207a1f5315ae20dbb0\"\n-\ncson-parser@^1.0.6:\nversion \"1.3.5\"\nresolved \"https://registry.yarnpkg.com/cson-parser/-/cson-parser-1.3.5.tgz#7ec675e039145533bf2a6a856073f1599d9c2d24\"\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Remove deprecated npm crypto module dependency. Close #1155 |
288,379 | 07.09.2017 03:50:00 | 0 | c601f69618710cbc54338e238d8035a40d97724e | update minimatch to 3.0.2 on the package.json file | [
{
"change_type": "MODIFY",
"old_path": "package.json",
"new_path": "package.json",
"diff": "\"hospitalrun-dblisteners\": \"1.0.0-beta\",\n\"hospitalrun-server-routes\": \"1.0.0-beta\",\n\"loader.js\": \"^4.0.11\",\n+ \"minimatch\": \"^3.0.2\",\n\"nano\": \"6.3.0\",\n\"pouchdb\": \"6.2.0\",\n\"pouchdb-adapter-memory\": \"6.3.4\",\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | update minimatch to 3.0.2 on the package.json file |
288,339 | 14.09.2017 15:37:04 | -43,200 | 7964a9d5a35c4350eb7f59d8b23b7440bb936bbc | added inventory-search test | [
{
"change_type": "MODIFY",
"old_path": "tests/acceptance/inventory-test.js",
"new_path": "tests/acceptance/inventory-test.js",
"diff": "@@ -283,6 +283,34 @@ test('Receiving inventory', function(assert) {\n});\n});\n+test('Searching inventory', function(assert) {\n+ runWithPouchDump('inventory', function() {\n+ authenticateUser();\n+ visit('/inventory');\n+\n+ fillIn('[role=\"search\"] div input', 'Biogesic');\n+ click('.glyphicon-search');\n+ andThen(() => {\n+ assert.equal(currentURL(), '/inventory/search/Biogesic', 'Searched for Biogesic');\n+ assert.equal(find('button:contains(Delete)').length, 1, 'There is one search item');\n+ });\n+\n+ fillIn('[role=\"search\"] div input', 'biogesic');\n+ click('.glyphicon-search');\n+ andThen(() => {\n+ assert.equal(currentURL(), '/inventory/search/biogesic', 'Searched with all lower case ');\n+ assert.equal(find('button:contains(Delete)').length, 1, 'There is one search item');\n+ });\n+\n+ fillIn('[role=\"search\"] div input', 'ItemNotFound');\n+ click('.glyphicon-search');\n+ andThen(() => {\n+ assert.equal(currentURL(), '/inventory/search/ItemNotFound', 'Searched for ItemNotFound');\n+ assert.equal(find('button:contains(Delete)').length, 0, 'There is no search result');\n+ });\n+ });\n+});\n+\ntestSimpleReportForm('Detailed Adjustment');\ntestSimpleReportForm('Detailed Purchase');\ntestSimpleReportForm('Detailed Stock Usage');\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | added inventory-search test |
288,339 | 14.09.2017 16:10:02 | -43,200 | 904bb64a14b6fcd71c05a2d00b538bf55bc417c1 | added patients-search test | [
{
"change_type": "MODIFY",
"old_path": "tests/acceptance/patients-test.js",
"new_path": "tests/acceptance/patients-test.js",
"diff": "@@ -84,7 +84,6 @@ test('Testing admitted patient', function(assert) {\nassert.equal(currentURL(), '/patients/admitted');\nassert.equal(find('.clickable').length, 1, 'One patient is listed');\n});\n-\nclick('button:contains(Discharge)');\nwaitToAppear('.view-current-title:contains(Edit Visit)');\nandThen(function() {\n@@ -156,6 +155,36 @@ test('Delete a patient record', function(assert) {\n});\n});\n+test('Searching patients', function(assert) {\n+ runWithPouchDump('patient', function() {\n+ authenticateUser();\n+ visit('/patients');\n+\n+ fillIn('[role=\"search\"] div input', 'Joe');\n+ click('.glyphicon-search');\n+\n+ andThen(() => {\n+ assert.equal(currentURL(), '/patients/search/Joe', 'Searched for Joe');\n+ assert.equal(find('button:contains(Delete)').length, 1, 'There is one search item');\n+ });\n+\n+ fillIn('[role=\"search\"] div input', 'joe');\n+ click('.glyphicon-search');\n+\n+ andThen(() => {\n+ assert.equal(currentURL(), '/patients/search/joe', 'Searched for all lower case joe');\n+ assert.equal(find('button:contains(Delete)').length, 1, 'There is one search item');\n+ });\n+ fillIn('[role=\"search\"] div input', 'ItemNotFound');\n+ click('.glyphicon-search');\n+\n+ andThen(() => {\n+ assert.equal(currentURL(), '/patients/search/ItemNotFound', 'Searched for ItemNotFound');\n+ assert.equal(find('button:contains(Delete)').length, 0, 'There is no search result');\n+ });\n+ });\n+});\n+\nfunction testSimpleReportForm(reportName) {\ntest(`View reports tab | ${reportName} shows start and end dates`, function(assert) {\nrunWithPouchDump('default', function() {\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | added patients-search test |
288,339 | 14.09.2017 16:37:28 | -43,200 | c0338fa7641b1fd44be46b9a2235f2d4bcd3de1a | added invoices-search test | [
{
"change_type": "MODIFY",
"old_path": "tests/acceptance/invoices-test.js",
"new_path": "tests/acceptance/invoices-test.js",
"diff": "@@ -210,3 +210,33 @@ test('cashier role', function(assert) {\n});\n});\n});\n+\n+test('Searching invoices', function(assert) {\n+ runWithPouchDump('billing', function() {\n+ authenticateUser();\n+ visit('/invoices');\n+\n+ fillIn('[role=\"search\"] div input', 'Joe');\n+ click('.glyphicon-search');\n+\n+ andThen(() => {\n+ assert.equal(currentURL(), '/invoices/search/Joe', 'Searched for Joe');\n+ assert.equal(find('.invoice-number').length, 1, 'There is one search item');\n+ });\n+\n+ fillIn('[role=\"search\"] div input', 'joe');\n+ click('.glyphicon-search');\n+\n+ andThen(() => {'[role=\"search\"] button'\n+ assert.equal(currentURL(), '/invoices/search/joe', 'Searched for all lower case joe');\n+ assert.equal(find('.invoice-number').length, 1, 'There is one search item');\n+ });\n+ fillIn('[role=\"search\"] div input', 'ItemNotFound');\n+ click('.glyphicon-search');\n+\n+ andThen(() => {\n+ assert.equal(currentURL(), '/invoices/search/ItemNotFound', 'Searched for ItemNotFound');\n+ assert.equal(find('.invoice-number').length, 0, 'There is no search result');\n+ });\n+ });\n+});\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | added invoices-search test |
288,339 | 14.09.2017 17:40:18 | -43,200 | da56752b9df83cf94abcf1a9bcce6258205da864 | corrected invoices-search test - lint issue | [
{
"change_type": "MODIFY",
"old_path": "tests/acceptance/invoices-test.js",
"new_path": "tests/acceptance/invoices-test.js",
"diff": "@@ -227,7 +227,7 @@ test('Searching invoices', function(assert) {\nfillIn('[role=\"search\"] div input', 'joe');\nclick('.glyphicon-search');\n- andThen(() => {'[role=\"search\"] button'\n+ andThen(() => {\nassert.equal(currentURL(), '/invoices/search/joe', 'Searched for all lower case joe');\nassert.equal(find('.invoice-number').length, 1, 'There is one search item');\n});\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | corrected invoices-search test - lint issue |
288,393 | 15.09.2017 15:54:59 | -3,600 | 4bd7c74778ad98abab6f5da5533501f0fd2de888 | Change Slack etiquette section
I think that `@here` isn't as bad as `@everyone` or `@channel` since `@here` only notifies people currently active on the Slack as per | [
{
"change_type": "MODIFY",
"old_path": ".github/CONTRIBUTING.md",
"new_path": ".github/CONTRIBUTING.md",
"diff": "@@ -8,7 +8,7 @@ Project communication occurs primarily and intentionally via our project [Slack]\nHowever, before you ask in Slack \"what can I contribute to\", be sure to keep reading this document for the answer to your question. :-)\n-Also, please avoid use of the `@here` command in Slack, as you will be sending a notification to nearly 600 people. Just post your question and someone will respond soon.\n+Also, please avoid use of the `@everyone` and `@channel` commands in Slack, as you will be sending a notification to nearly 600 people. Just post your question and someone will respond soon.\n## Help Wanted\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Change Slack etiquette section
I think that `@here` isn't as bad as `@everyone` or `@channel` since `@here` only notifies people currently active on the Slack as per https://get.slack.help/hc/en-us/articles/202009646-Make-an-announcement |
288,393 | 15.09.2017 16:08:39 | -3,600 | d754fe125089c3582d3d0a43397053aedbf69349 | Added changes suggested | [
{
"change_type": "MODIFY",
"old_path": ".github/CONTRIBUTING.md",
"new_path": ".github/CONTRIBUTING.md",
"diff": "@@ -10,6 +10,10 @@ However, before you ask in Slack \"what can I contribute to\", be sure to keep rea\nAlso, please avoid use of the `@everyone` and `@channel` commands in Slack, as you will be sending a notification to nearly 600 people. Just post your question and someone will respond soon.\n+While `@here` is discouraged as it notifies everyone who is active on Slack, if you have an announcement that the channel needs to hear urgently, use can be justified.\n+\n+Generally, just posting your question will allow you to recieve a timely answer.\n+\n## Help Wanted\nIf you're looking for a way to contribute, the [Help Wanted](https://github.com/HospitalRun/hospitalrun-frontend/labels/Help%20Wanted) tag is the right place to start. Those issues are intended to be bugs / features / enhancements / technologies that have been vetted and we know we want to include in the project.\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Added changes suggested |
288,243 | 17.09.2017 03:56:29 | -32,400 | 48adfb3948abd4a633dcb7630ac2023a636c6787 | Update the path of translations.json
The character string enclosed with <> was not displayed. | [
{
"change_type": "MODIFY",
"old_path": ".github/CONTRIBUTING.md",
"new_path": ".github/CONTRIBUTING.md",
"diff": "@@ -179,7 +179,7 @@ If you know a language other than English and would like to help translate this\nAfter this step, you may see some file changes due to mismatches in translations of different languages. This script will take the English translation as the standard and populate the missing translations in other languages with empty string.\n### Edit the translation file of your language\n-The translation files are in app/locales/<language>/translations.json\n+The translation files are in `app/locales/<language>/translations.json`\nOpen the translation file of your language then search for the string ```''```. Afterwards you fill in the quotation with the translated terms and save the file.\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Update the path of translations.json
The character string enclosed with <> was not displayed. |
288,243 | 17.09.2017 09:27:38 | -32,400 | 4104a6986edd59caec3287479c1d66acb2e61d99 | Add a description about recommended version of Node.js
Prevent warnings displayed when installing current version | [
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -32,7 +32,7 @@ Contributions are welcome via pull requests and issues. Please see our [contrib\nTo install the frontend please do the following:\n1. Make sure you have installed [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).\n-2. Make sure you have installed [Node.js](https://nodejs.org/en/download/). Versions 6.0.0 and higher should work.\n+2. Make sure you have installed [Node.js](https://nodejs.org/en/download/). Versions 6.0.0 and higher should work. We recommend that you use the mose-recent \"Active LTS\" version of Node.js.\n3. Install [ember-cli latest](https://www.npmjs.org/package/ember-cli): `npm install -g ember-cli@latest`.\nDepending on your [npm permissions](https://docs.npmjs.com/getting-started/fixing-npm-permissions) you might need root access to install ember-cli.\n4. Install [bower](https://www.npmjs.org/package/bower): `npm install -g bower`.\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Add a description about recommended version of Node.js
Prevent warnings displayed when installing current version |
288,339 | 20.09.2017 17:41:24 | -43,200 | c49f7b180bbdc3934f9f66e13a9715a923aaba06 | Add medicationTitle and requestedBy fields for searching and added a related test. | [
{
"change_type": "MODIFY",
"old_path": "app/medication/search/route.js",
"new_path": "app/medication/search/route.js",
"diff": "@@ -2,8 +2,14 @@ import AbstractSearchRoute from 'hospitalrun/routes/abstract-search-route';\nexport default AbstractSearchRoute.extend({\nmoduleName: 'medication',\nsearchKeys: [{\n+ name: 'medicationTitle',\n+ type: 'fuzzy'\n+ }, {\nname: 'prescription',\ntype: 'contains'\n+ }, {\n+ name: 'requestedBy',\n+ type: 'contains'\n}],\nsearchModel: 'medication'\n});\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/acceptance/medication-test.js",
"new_path": "tests/acceptance/medication-test.js",
"diff": "@@ -151,3 +151,50 @@ test('returning medication', function(assert) {\n});\n});\n});\n+\n+test('Searching medications', function(assert) {\n+ runWithPouchDump('medication', function() {\n+ authenticateUser();\n+ visit('/medication');\n+\n+ fillIn('[role=\"search\"] div input', 'Biogesic');\n+ click('.glyphicon-search');\n+\n+ andThen(() => {\n+ assert.equal(currentURL(), '/medication/search/Biogesic', 'Searched for Medication Title: Biogesic');\n+ assert.equal(find('.clickable').length, 1, 'There is one search item');\n+ });\n+\n+ fillIn('[role=\"search\"] div input', 'gesic');\n+ click('.glyphicon-search');\n+\n+ andThen(() => {\n+ assert.equal(currentURL(), '/medication/search/gesic', 'Searched for all lower case gesic');\n+ assert.equal(find('.clickable').length, 1, 'There is one search item');\n+ });\n+\n+ fillIn('[role=\"search\"] div input', 'hradmin');\n+ click('.glyphicon-search');\n+\n+ andThen(() => {\n+ assert.equal(currentURL(), '/medication/search/hradmin', 'Searched for Prescriber: hradmin');\n+ assert.notEqual(find('.clickable').length, 0, 'There are one or more search item');\n+ });\n+\n+ fillIn('[role=\"search\"] div input', '60 Biogesic Pills');\n+ click('.glyphicon-search');\n+\n+ andThen(() => {\n+ assert.equal(currentURL(), '/medication/search/60%20Biogesic%20Pills', 'Searched for Prescription: 60 Biogesic Pills');\n+ assert.equal(find('.clickable').length, 1, 'There is one search item');\n+ });\n+\n+ fillIn('[role=\"search\"] div input', 'ItemNotFound');\n+ click('.glyphicon-search');\n+\n+ andThen(() => {\n+ assert.equal(currentURL(), '/medication/search/ItemNotFound', 'Searched for ItemNotFound');\n+ assert.equal(find('.clickable').length, 0, 'There is no search result');\n+ });\n+ });\n+});\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Add medicationTitle and requestedBy fields for searching and added a related test. |
288,339 | 22.09.2017 18:47:47 | -43,200 | 525407f4302cab41abda239908966f1d3a8e92fd | Corrected pricing/search/route.js, added 2 missing labels to locales/en/translations.js,
added pricing search test on name field only | [
{
"change_type": "MODIFY",
"old_path": "app/locales/en/translations.js",
"new_path": "app/locales/en/translations.js",
"diff": "@@ -782,6 +782,7 @@ export default {\naddress: 'Address',\nage: 'Age',\nallDay: 'All Day',\n+ allItems: 'All items',\namount: 'Amount',\nanesthesia: 'Anesthesia',\nassisting: 'Assisting',\n@@ -838,6 +839,7 @@ export default {\nmedication: 'Medication',\nname: 'Name',\nnewUser: 'New User',\n+ newItem: '+ new item',\nnote: 'Note',\nnotes: 'Notes',\nnumber: 'Number',\n"
},
{
"change_type": "MODIFY",
"old_path": "app/pricing/search/route.js",
"new_path": "app/pricing/search/route.js",
"diff": "@@ -2,7 +2,8 @@ import AbstractSearchRoute from 'hospitalrun/routes/abstract-search-route';\nexport default AbstractSearchRoute.extend({\nmoduleName: 'pricing',\nsearchKeys: [{\n- 'name': 'fuzzy'\n+ name: 'name',\n+ type: 'fuzzy'\n}],\nsearchModel: 'pricing'\n});\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/acceptance/pricing-test.js",
"new_path": "tests/acceptance/pricing-test.js",
"diff": "@@ -192,3 +192,58 @@ test('delete pricing profile', function(assert) {\n});\n});\n});\n+\n+test('Searching pricing', function(assert) {\n+ runWithPouchDump('billing', function() {\n+ authenticateUser();\n+ visit('/pricing');\n+\n+ fillIn('[role=\"search\"] div input', 'Xray Hand');\n+ click('.glyphicon-search');\n+\n+ andThen(() => {\n+ assert.equal(currentURL(), '/pricing/search/Xray%20Hand', 'Searched for Name: Xray Hand');\n+ assert.equal(find('button:contains(Delete)').length, 3, 'There are 3 search items');\n+ });\n+\n+ fillIn('[role=\"search\"] div input', 'Blood');\n+ click('.glyphicon-search');\n+\n+ andThen(() => {\n+ assert.equal(currentURL(), '/pricing/search/Blood', 'Searched for Name: Blood');\n+ assert.equal(find('button:contains(Delete)').length, 1, 'There is one search item');\n+ });\n+\n+ fillIn('[role=\"search\"] div input', 'Leg');\n+ click('.glyphicon-search');\n+\n+ andThen(() => {\n+ assert.equal(currentURL(), '/pricing/search/Leg', 'Searched for Name: Leg');\n+ assert.equal(find('button:contains(Delete)').length, 2, 'There are 2 search items');\n+ });\n+\n+ fillIn('[role=\"search\"] div input', 'Gauze');\n+ click('.glyphicon-search');\n+\n+ andThen(() => {\n+ assert.equal(currentURL(), '/pricing/search/Gauze', 'Searched for Name: Gauze');\n+ assert.equal(find('button:contains(Delete)').length, 2, 'There are 2 search items');\n+ });\n+\n+ fillIn('[role=\"search\"] div input', 'xray');\n+ click('.glyphicon-search');\n+\n+ andThen(() => {\n+ assert.equal(currentURL(), '/pricing/search/xray', 'Searched for all lower case xray');\n+ assert.equal(find('button:contains(Delete)').length, 3, 'There is one search item');\n+ });\n+\n+ fillIn('[role=\"search\"] div input', 'ItemNotFound');\n+ click('.glyphicon-search');\n+\n+ andThen(() => {\n+ assert.equal(currentURL(), '/pricing/search/ItemNotFound', 'Searched for ItemNotFound');\n+ assert.equal(find('.clickable').length, 0, 'There is no search result');\n+ });\n+ });\n+});\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Corrected pricing/search/route.js, added 2 missing labels to locales/en/translations.js,
added pricing search test on name field only |
288,339 | 28.09.2017 19:07:38 | -46,800 | e64008919ee674fba166bd63e631eb3436f30557 | added 2 appointment tests and 2 test-attributes to template | [
{
"change_type": "MODIFY",
"old_path": "app/patients/edit/template.hbs",
"new_path": "app/patients/edit/template.hbs",
"diff": "{{#if canAddAppointment}}\n<div class=\"panel-heading\">\n<div class=\"right\">\n- <button type=\"button\" class=\"btn btn-primary\" {{action \"newAppointment\" bubbles=false }}>\n+ <button type=\"button\" class=\"btn btn-primary\" data-test-selector=\"appointments-btn\" {{action \"newAppointment\" bubbles=false }}>\n<span class=\"octicon octicon-plus\"></span>{{t 'patients.buttons.newAppointment'}}\n</button> \n- <button type=\"button\" class=\"btn btn-primary\" {{action \"newSurgicalAppointment\" bubbles=false }}>\n+ <button type=\"button\" class=\"btn btn-primary\" data-test-selector=\"scheduleSurgery-btn\" {{action \"newSurgicalAppointment\" bubbles=false }}>\n<span class=\"octicon octicon-plus\"></span>{{t 'patients.buttons.scheduleSurgery'}}\n</button>\n</div>\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/acceptance/appointments-test.js",
"new_path": "tests/acceptance/appointments-test.js",
"diff": "@@ -4,6 +4,7 @@ import moment from 'moment';\nimport startApp from 'hospitalrun/tests/helpers/start-app';\nconst DATE_TIME_FORMAT = 'l h:mm A';\n+const DATE_FORMAT = 'l';\nconst TIME_FORMAT = 'h:mm';\nmodule('Acceptance | appointments', {\n@@ -94,6 +95,82 @@ test('Creating a new appointment', function(assert) {\n});\n});\n+test('Creating a new appointment from patient screen', function(assert) {\n+ runWithPouchDump('appointments', function() {\n+ let today = moment().startOf('day');\n+ let tomorrow = moment(today).add(24, 'hours');\n+ authenticateUser();\n+ visit('/patients');\n+ andThen(function() {\n+ findWithAssert('button:contains(Edit)');\n+ });\n+ click('button:contains(Edit)');\n+ andThen(function() {\n+ assert.equal(find('button[data-test-selector=\"appointments-btn\"]').length, 1, 'Tab Appointments shown AFTER clicking edit');\n+ });\n+\n+ click('button[data-test-selector=\"appointments-btn\"]');\n+\n+ andThen(function() {\n+ assert.equal(currentURL().substr(0, 19), '/appointments/edit/', 'Creating appointment');\n+ });\n+\n+ click('.appointment-all-day input');\n+ fillIn('.test-appointment-start input', today.format(DATE_FORMAT));\n+ fillIn('.test-appointment-end input', tomorrow.format(DATE_FORMAT));\n+ typeAheadFillIn('.test-appointment-location', 'Harare');\n+ typeAheadFillIn('.test-appointment-with', 'Dr Test');\n+ click('button:contains(Add)');\n+\n+ waitToAppear('.modal-dialog');\n+ andThen(() => {\n+ assert.equal(find('.modal-title').text(), 'Appointment Saved', 'Appointment has been saved');\n+ click('.modal-footer button:contains(Ok)');\n+ });\n+\n+ click('button:contains(Return)');\n+ andThen(() => {\n+ assert.equal(currentURL().substr(0, 15), '/patients/edit/', 'Back on patient edit screen');\n+ });\n+ });\n+});\n+\n+test('Change appointment type', function(assert) {\n+ runWithPouchDump('appointments', function() {\n+ let today = moment().startOf('day');\n+ authenticateUser();\n+ visit('/appointments/edit/new');\n+\n+ andThen(function() {\n+ assert.equal(currentURL(), '/appointments/edit/new');\n+ findWithAssert('button:contains(Cancel)');\n+ findWithAssert('button:contains(Add)');\n+ });\n+\n+ createAppointment(assert);\n+\n+ andThen(() => {\n+ assert.equal(currentURL(), '/appointments');\n+ assert.equal(find('tr').length, 2, 'New appointment has been added');\n+ findWithAssert('button:contains(Edit)');\n+ });\n+\n+ click('button:contains(Edit)');\n+\n+ andThen(() => {\n+ assert.equal(currentURL().substring(0, 19), '/appointments/edit/');\n+ assert.equal(find('.appointment-all-day input').val(), 'on', 'All day appointment is on');\n+ });\n+\n+ select('.test-appointment-type', 'Clinic');\n+\n+ andThen(() => {\n+ assert.equal(find('.test-appointment-date input').val(), today.format(DATE_FORMAT), 'Single date field found');\n+ assert.equal(find('.appointment-all-day').val(), '', 'All day appointment was turned off');\n+ });\n+ });\n+});\n+\ntest('Checkin to a visit from appointment', function(assert) {\nrunWithPouchDump('appointments', function() {\nauthenticateUser();\n@@ -109,6 +186,7 @@ test('Checkin to a visit from appointment', function(assert) {\n});\nclick('button:contains(Check In)');\n+\nandThen(() => {\nassert.equal(currentURL(), '/visits/edit/checkin', 'Now in add visiting information route');\n});\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | added 2 appointment tests and 2 test-attributes to template |
288,299 | 01.10.2017 12:38:44 | -3,600 | ef07a851e775f438ea747fb6ad8f1a002c02ab02 | Added in Header type value in Custom Forms | [
{
"change_type": "MODIFY",
"old_path": "app/admin/custom-forms/field-edit/controller.js",
"new_path": "app/admin/custom-forms/field-edit/controller.js",
"diff": "@@ -14,12 +14,15 @@ export default AbstractEditController.extend({\nactions: {\naddValue() {\nlet fieldValues = this.get('model.values');\n+ let fieldType = this.get('model.type');\nif (isEmpty(fieldValues)) {\nlet model = this.get('model');\nfieldValues = [];\nmodel.set('values', fieldValues);\n}\n+ if (fieldType === 'header' && fieldValues.length < 1 || fieldType != 'header') {\nfieldValues.addObject(Ember.Object.create());\n+ }\n},\ndeleteValue(valueToDelete) {\n@@ -38,6 +41,7 @@ export default AbstractEditController.extend({\n},\nfieldTypeValues: [\n+ 'header',\n'checkbox',\n'radio',\n'select',\n@@ -60,7 +64,7 @@ export default AbstractEditController.extend({\nshowValues: computed('model.type', function() {\nlet type = this.get('model.type');\n- return (type === 'checkbox' || type === 'radio' || type === 'select');\n+ return (type === 'checkbox' || type === 'radio' || type === 'select' || type === 'header');\n})\n});\n"
},
{
"change_type": "MODIFY",
"old_path": "app/admin/custom-forms/field-edit/template.hbs",
"new_path": "app/admin/custom-forms/field-edit/template.hbs",
"diff": "{{#if (eq model.type 'checkbox')}}\n{{t 'admin.customForms.titles.checkboxValues'}}\n{{/if}}\n+ {{#if (eq model.type 'header')}}\n+ {{t 'admin.customForms.titles.headerValues'}}\n+ {{/if}}\n<button class=\"btn btn-primary align-right\" {{action 'addValue'}}>\n{{t \"buttons.addValue\"}}\n</button>\n"
},
{
"change_type": "MODIFY",
"old_path": "app/locales/en/translations.js",
"new_path": "app/locales/en/translations.js",
"diff": "@@ -34,6 +34,7 @@ export default {\nexpenseTo: 'Expense To',\nformName: 'Form Name',\nformType: 'Form Type',\n+ header: 'Header',\nincidentFormType: 'Incident',\nincludeOtherOption: 'Include Other Option',\nlabFormType: 'Lab',\n@@ -60,6 +61,7 @@ export default {\neditCustomForm: 'Edit Custom Form',\nfields: 'Fields',\nformSaved: 'Form Saved',\n+ headerValues: 'Header Line Value',\nnewCustomForm: 'New Custom Form',\nradioValues: 'Radio Values'\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "app/templates/components/custom-form.hbs",
"new_path": "app/templates/components/custom-form.hbs",
"diff": "optionLabelPath=\"label\"\n}}\n{{/if}}\n+ {{#if (eq field.type 'header')}}\n+ <div class=\"form-group {{field.displayClassNames}}\">\n+ <label>{{field.label}}</label>\n+ {{#each field.values as |split|}}\n+ <br>\n+ <label>{{split.label}}</label>\n+ {{/each}}\n+ </div>\n+ {{/if}}\n{{/each}}\n</div>\n{{/each}}\n"
},
{
"change_type": "MODIFY",
"old_path": "tests/acceptance/custom-forms-test.js",
"new_path": "tests/acceptance/custom-forms-test.js",
"diff": "@@ -16,6 +16,7 @@ test('crud operations on custom-forms', function(assert) {\nlet crusts = ['Thin', 'Deep Dish', 'Flatbread'];\nlet desserts = ['Ice Cream', 'Cookies', 'Cake'];\nlet toppings = ['Cheese', 'Pepperoni', 'Mushrooms'];\n+ let header = '______________________________';\nfunction addField(fieldType, label, values) {\nclick('button:contains(Add Field)');\n@@ -56,6 +57,8 @@ test('crud operations on custom-forms', function(assert) {\nclick('button:contains(Preview)');\nwaitToAppear('.form-preview');\nandThen(function() {\n+ assert.equal(find('.form-preview label:contains(Create a Pizza)').length, 1, 'Found Create a Pizza Label');\n+ assert.equal(find(`.form-preview label:contains(${header}):has(label)`).length, 1, `Found ${header} Label`);\nassert.equal(find('.form-preview label:contains(Pizza Toppings)').length, 1, 'Found Pizza Toppings Label');\ntoppings.forEach((topping) => {\nassert.equal(find(`.form-preview label:contains(${topping}):has(input[type=checkbox])`).length, 1, `Found ${topping} checkbox`);\n@@ -95,6 +98,9 @@ test('crud operations on custom-forms', function(assert) {\n});\nandThen(function() {\nassert.equal(find('.modal-title').text(), 'Form Saved', 'Form is saved');\n+ addField('Header', 'Create a Pizza', header);\n+ });\n+ andThen(function() {\naddField('Checkbox', 'Pizza Toppings', toppings);\n});\nandThen(function() {\n"
}
] | TypeScript | MIT License | hospitalrun/hospitalrun-frontend | Added in Header type value in Custom Forms |
Subsets and Splits