Skip to content

Latest commit

 

History

History
45 lines (40 loc) · 4.99 KB

CommonTasks.md

File metadata and controls

45 lines (40 loc) · 4.99 KB

Common Tasks

This section has an overview of several common tasks that might be peformed as part of routine maitenance/expansion of the app.

Table of Contents

Connecting to the DB.

The following information will be useful for accessing the DB.

  • User: kywAdmin
  • Server Name: kyw.database.windows.net
  • Database: kyw
  • MSSQL_PASSWORD: Can be found as an Application Setting under Configuration in the Web App's Azure page. There are two ways to connect to the DB.
  1. Using the Azure portal:
    • In the Azure portal go to the kyw SQL database.
    • In the search bar on the left-hand side of the screen type in "Query Editor."
    • Use the User and MSSQL_PASSWORD values mentioned above to access the page.
    • From here you can see or edit the data by right-clicking on the appropriate table and selecting your preferred option.
  2. Using MSSQL Management Studio
    • If applicable download MSSQL Management Studio
    • After opening MSSQL use the following values.
      • Server Type: Database Engine
      • Server Name: Server Name.
      • Authentication: SQL Server Authentication
      • Login: User
      • Password: MSSQL_PASSWORD.
    • To find the relevant DB expand the Databases folder in the panel on the left-hand side of the screen and then expand the kyw database section.

Making Minor Adjustments to the Code

This guide is for minor adjustments to the source code (1-20 lines.) Any adjustments larger than this or edits that adjust the larger structure of the website should be performed by people who have experience with web development, and the tools required to do it.

  1. If you don't have one, Create a GitHub account. This is the account you will use to access and edit the code in your web browser.
  2. Have the owner grant you access to the GitHub repository. If there is any confusion about how to do this, this article is helpful.
  3. Many changes can be made simply by editing files directly on GitHub. If you anticipate making very significant changes to the source, hand off the task to someone who knows how to edit and test the code locally.

Adding or Deleting Drop-Down Items

This process is quite trivial as long as you have access to the source code.

  1. Access the .js file in knowyourwell\knowyourwell\ClientApp\src\components that contains the dropdown you would like to edit. For the purposes of this demonstration, I will be using the bacteria dropdown in classlab.js; which looked like this before modification Drop-Down Before.
  2. After finding the relevant file, the next step is finding the relevant HTML select element. You can do this using (Ctrl/CMD+f) and then typing "select" into the relevant box. Press enter until you find the section of the .js file that has options that match up to the existing drop-down elements. An example of what this section looks like for the bacteria drop-down is provided below. Finding Select Element Notice how the various option elements correspond to the menu choices shown in the previous screen-shot
  3. To add an additional option to the drop-down we follow the template followed by the other option elements that are valid choices in my case, I selected the last option element: <option value="Yellow_without_fluorescent" id="bacteria" name="bacteria" required >Yellow without fluorescent rim</option> this can be done by copy and pasting the element on a new-line immediately beneath itself.
    • Deleting an option element can be accomplished using a similar process, but instead of pasting it below itself, you eliminate the relevant element.
  4. We then adjust the value attribute, and the content of the option element that we copied. In my example, I have adjusted the value and content both to Test. My modifications can be seen below. Modified Select Element
  5. The final result can be seen below Drop-Down Element After