# Overhaul The User Management Dashboard

**URL:** <https://talk.openmrs.org/t/overhaul-the-user-management-dashboard/6292>\
**Category:** ID Dashboard\
**Tags:** gsoc2016, id-dashboard\
**Created:** [May 14, 2016, 2:43am UTC](https://talk.openmrs.org/t/overhaul-the-user-management-dashboard/6292 "2016-05-14T02:43:10Z")\
**Posts on this page:** 20\
**Page:** 8

<div class="post-metadata">

**Author:** ![dmytro.trifonov](https://talk.openmrs.org/letter_avatar/dmytro.trifonov/32/5_5575768a8748004e209b776fc1b2916d.png) [@dmytro.trifonov](https://talk.openmrs.org/u/dmytro.trifonov)\
**Post date:** [July 18, 2016, 7:58pm UTC](https://talk.openmrs.org/t/overhaul-the-user-management-dashboard/6292/145 "2016-07-18T19:58:57Z")

</div>

How to set pass for user that I am creating?

---

<div class="post-metadata">

**Author:** ![r0bby](https://talk.openmrs.org/user_avatar/talk.openmrs.org/r0bby/32/6479_2.png) [@r0bby](https://talk.openmrs.org/u/r0bby)\
**Post date:** [July 18, 2016, 7:59pm UTC](https://talk.openmrs.org/t/overhaul-the-user-management-dashboard/6292/146 "2016-07-18T19:59:20Z")

</div>

You register the user first (by hand sadly) and then set it as admin 🙂 What I mean, is go to the registration page and fill out the form

---

<div class="post-metadata">

**Author:** ![r0bby](https://talk.openmrs.org/user_avatar/talk.openmrs.org/r0bby/32/6479_2.png) [@r0bby](https://talk.openmrs.org/u/r0bby)\
**Post date:** [July 18, 2016, 8:00pm UTC](https://talk.openmrs.org/t/overhaul-the-user-management-dashboard/6292/148 "2016-07-18T20:00:37Z")

</div>

You got it?

---

<div class="post-metadata">

**Author:** ![dmytro.trifonov](https://talk.openmrs.org/letter_avatar/dmytro.trifonov/32/5_5575768a8748004e209b776fc1b2916d.png) [@dmytro.trifonov](https://talk.openmrs.org/u/dmytro.trifonov)\
**Post date:** [July 18, 2016, 8:00pm UTC](https://talk.openmrs.org/t/overhaul-the-user-management-dashboard/6292/149 "2016-07-18T20:00:38Z")

</div>

thanks, understand.

And it works 🙂

But when I’m trying to open localhost:3000/user-dashboard, it shows 404, maybe I must setup ID Dashboard routing?

---

<div class="post-metadata">

**Author:** ![r0bby](https://talk.openmrs.org/user_avatar/talk.openmrs.org/r0bby/32/6479_2.png) [@r0bby](https://talk.openmrs.org/u/r0bby)\
**Post date:** [July 18, 2016, 8:11pm UTC](https://talk.openmrs.org/t/overhaul-the-user-management-dashboard/6292/150 "2016-07-18T20:11:40Z")

</div>

Yeah you might have to import the app reference from ID dashboard so that it’s added to the routes.

---

<div class="post-metadata">

**Author:** ![dmytro.trifonov](https://talk.openmrs.org/letter_avatar/dmytro.trifonov/32/5_5575768a8748004e209b776fc1b2916d.png) [@dmytro.trifonov](https://talk.openmrs.org/u/dmytro.trifonov)\
**Post date:** [July 18, 2016, 8:13pm UTC](https://talk.openmrs.org/t/overhaul-the-user-management-dashboard/6292/151 "2016-07-18T20:13:18Z")

</div>

in my module, I have

> <https://github.com/diospark/openmrs-contrib-id-user-management-dashboard/blob/master/index.js#L21>

is it not enough? Or I must include my module somewhere manually?

---

<div class="post-metadata">

**Author:** ![r0bby](https://talk.openmrs.org/user_avatar/talk.openmrs.org/r0bby/32/6479_2.png) [@r0bby](https://talk.openmrs.org/u/r0bby)\
**Post date:** [July 18, 2016, 8:15pm UTC](https://talk.openmrs.org/t/overhaul-the-user-management-dashboard/6292/152 "2016-07-18T20:15:08Z")

</div>

Did you add your module to the list of modules to load? Order doesn’t matter.

> <https://github.com/openmrs/openmrs-contrib-id/blob/master/app/conf.example.js#L113>

---

<div class="post-metadata">

**Author:** ![dmytro.trifonov](https://talk.openmrs.org/letter_avatar/dmytro.trifonov/32/5_5575768a8748004e209b776fc1b2916d.png) [@dmytro.trifonov](https://talk.openmrs.org/u/dmytro.trifonov)\
**Post date:** [July 18, 2016, 8:15pm UTC](https://talk.openmrs.org/t/overhaul-the-user-management-dashboard/6292/153 "2016-07-18T20:15:44Z")

</div>

no, just added. Then restart docker?

---

<div class="post-metadata">

**Author:** ![r0bby](https://talk.openmrs.org/user_avatar/talk.openmrs.org/r0bby/32/6479_2.png) [@r0bby](https://talk.openmrs.org/u/r0bby)\
**Post date:** [July 18, 2016, 8:17pm UTC](https://talk.openmrs.org/t/overhaul-the-user-management-dashboard/6292/154 "2016-07-18T20:17:01Z")

</div>

@dmytro.trifonov, actually you need to run this locally –

`cp app/conf.example.js app/conf.js ; docker-compose stop web ; docker-compose up -d mailcatcher mongodb` (last step shouldn’t be necessary right now)

Add your module to the userModules list and save

Then `node app/app`

---

<div class="post-metadata">

**Author:** ![dmytro.trifonov](https://talk.openmrs.org/letter_avatar/dmytro.trifonov/32/5_5575768a8748004e209b776fc1b2916d.png) [@dmytro.trifonov](https://talk.openmrs.org/u/dmytro.trifonov)\
**Post date:** [July 18, 2016, 8:32pm UTC](https://talk.openmrs.org/t/overhaul-the-user-management-dashboard/6292/155 "2016-07-18T20:32:10Z")

</div>

Are there any way to resolve dependencies for all user-modules automatically? or I must go to each folder, and execute ‘npm i’ there?

---

<div class="post-metadata">

**Author:** ![r0bby](https://talk.openmrs.org/user_avatar/talk.openmrs.org/r0bby/32/6479_2.png) [@r0bby](https://talk.openmrs.org/u/r0bby)\
**Post date:** [July 18, 2016, 8:32pm UTC](https://talk.openmrs.org/t/overhaul-the-user-management-dashboard/6292/156 "2016-07-18T20:32:35Z")

</div>

`git submodule foreach npm install` – that’s why I made them submodules 🙂

---

<div class="post-metadata">

**Author:** ![dmytro.trifonov](https://talk.openmrs.org/letter_avatar/dmytro.trifonov/32/5_5575768a8748004e209b776fc1b2916d.png) [@dmytro.trifonov](https://talk.openmrs.org/u/dmytro.trifonov)\
**Post date:** [July 18, 2016, 8:33pm UTC](https://talk.openmrs.org/t/overhaul-the-user-management-dashboard/6292/157 "2016-07-18T20:33:40Z")

</div>

Awesome! 🙂

---

<div class="post-metadata">

**Author:** ![r0bby](https://talk.openmrs.org/user_avatar/talk.openmrs.org/r0bby/32/6479_2.png) [@r0bby](https://talk.openmrs.org/u/r0bby)\
**Post date:** [July 18, 2016, 8:34pm UTC](https://talk.openmrs.org/t/overhaul-the-user-management-dashboard/6292/158 "2016-07-18T20:34:10Z")

</div>

Random things I learned while stumbling – I REALLLLLLLLLLLLLLLLY know git.

---

<div class="post-metadata">

**Author:** ![dmytro.trifonov](https://talk.openmrs.org/letter_avatar/dmytro.trifonov/32/5_5575768a8748004e209b776fc1b2916d.png) [@dmytro.trifonov](https://talk.openmrs.org/u/dmytro.trifonov)\
**Post date:** [July 18, 2016, 8:36pm UTC](https://talk.openmrs.org/t/overhaul-the-user-management-dashboard/6292/159 "2016-07-18T20:36:32Z")

</div>

it WORKS! Thanks for your huge support, now I can integrate users data to our User Dashboard 🙂

---

<div class="post-metadata">

**Author:** ![r0bby](https://talk.openmrs.org/user_avatar/talk.openmrs.org/r0bby/32/6479_2.png) [@r0bby](https://talk.openmrs.org/u/r0bby)\
**Post date:** [July 18, 2016, 8:37pm UTC](https://talk.openmrs.org/t/overhaul-the-user-management-dashboard/6292/160 "2016-07-18T20:37:44Z")

</div>

No problem – I tried to set this up so that it’s easy if you run it inside docker or outside of docker. For some weird reason, I could never get OpenLDAP to install on my system…not sure _WHY_

---

<div class="post-metadata">

**Author:** ![dmytro.trifonov](https://talk.openmrs.org/letter_avatar/dmytro.trifonov/32/5_5575768a8748004e209b776fc1b2916d.png) [@dmytro.trifonov](https://talk.openmrs.org/u/dmytro.trifonov)\
**Post date:** [July 19, 2016, 6:48am UTC](https://talk.openmrs.org/t/overhaul-the-user-management-dashboard/6292/161 "2016-07-19T06:48:11Z")

</div>

I’ve got yet one error, associated with babel compiling.

Let me explain. The problem is that when we using user-dashboard as a ID module, and trying to include some code from ID dashboard, it includes modules from openmrs-contrib-id/node\_modules (such as express, mongoose, and others)

> <https://github.com/diospark/openmrs-contrib-id-user-management-dashboard/blob/import-test/app/lib/Api.js>

but our webpack configured for only one node\_modules folder, and when we include something from id-dashboard, we have TWO node\_modules folder, and there are such errors as:

`ERROR in ./~/glob/sync.js Module not found: Error: Cannot resolve module 'fs' in /home/invercity/projects/webstorm/openmrs-contrib-id/node_modules/glob @ ./~/glob/sync.js 4:9-22`

etc…

So, we need to configure webpack for 2 node\_modules folders, but as for now, our configuration is not working, I am still trying to fix it. Maybe someone who have more experience with webpack and babel could help? Here is our current configuration:

> <https://github.com/diospark/openmrs-contrib-id-user-management-dashboard/blob/master/webpack.config.js>

---

<div class="post-metadata">

**Author:** ![r0bby](https://talk.openmrs.org/user_avatar/talk.openmrs.org/r0bby/32/6479_2.png) [@r0bby](https://talk.openmrs.org/u/r0bby)\
**Post date:** [July 19, 2016, 6:53am UTC](https://talk.openmrs.org/t/overhaul-the-user-management-dashboard/6292/162 "2016-07-19T06:53:45Z")

</div>

How do I trigger this?

---

<div class="post-metadata">

**Author:** ![dmytro.trifonov](https://talk.openmrs.org/letter_avatar/dmytro.trifonov/32/5_5575768a8748004e209b776fc1b2916d.png) [@dmytro.trifonov](https://talk.openmrs.org/u/dmytro.trifonov)\
**Post date:** [July 19, 2016, 6:56am UTC](https://talk.openmrs.org/t/overhaul-the-user-management-dashboard/6292/163 "2016-07-19T06:56:53Z")

</div>

I pushed code to separate branch:

> **[diospark/openmrs-contrib-id-user-management-dashboard](https://github.com/diospark/openmrs-contrib-id-user-management-dashboard/tree/import-test)**
>
> User Management Dashboard module for OpenMRS ID Dashboard - diospark/openmrs-contrib-id-user-management-dashboard

checkout it, and then launch app with `node app/app`. You’ll see the error logs from webpack

---

<div class="post-metadata">

**Author:** ![r0bby](https://talk.openmrs.org/user_avatar/talk.openmrs.org/r0bby/32/6479_2.png) [@r0bby](https://talk.openmrs.org/u/r0bby)\
**Post date:** [July 19, 2016, 6:57am UTC](https://talk.openmrs.org/t/overhaul-the-user-management-dashboard/6292/164 "2016-07-19T06:57:24Z")

</div>

Okay… give me a few

---

<div class="post-metadata">

**Author:** ![dmytro.trifonov](https://talk.openmrs.org/letter_avatar/dmytro.trifonov/32/5_5575768a8748004e209b776fc1b2916d.png) [@dmytro.trifonov](https://talk.openmrs.org/u/dmytro.trifonov)\
**Post date:** [July 19, 2016, 7:03am UTC](https://talk.openmrs.org/t/overhaul-the-user-management-dashboard/6292/165 "2016-07-19T07:03:10Z")

</div>

We need to play with webpack.config options, to probably set multiple node\_modules folders

[Previous page](https://talk.openmrs.org/t/overhaul-the-user-management-dashboard/6292.md?page=7)

[Next page](https://talk.openmrs.org/t/overhaul-the-user-management-dashboard/6292.md?page=9)
