Giter VIP home page Giter VIP logo

irods_client_zone_management_tool's Introduction

iRODS Zone Management Tool (ZMT)

A web application for managing an iRODS Zone.

Zone Management Tool 0.1.0

Setup

1. Install Docker and Docker Compose

Follow instructions in Docker docs to install Docker and Docker Compose for your OS.

2. Clone the repository from GitHub

git clone https://github.com/irods/irods_client_zone_management_tool

3. Deploy the iRODS Client REST Mid-Tier API

Please refer to iRODS Client REST API and build this repository. You will need the hostname, port, and version of this service.

The C++ REST API must be version 0.9.2 or later.

4. Setup Environment Variables

Create a file named '.env' and place under the root directory. Please refer to sample.env file, setup the following environment variables and save the file.

#######################################
# Location of the iRODS Client REST API
# <protocol>://<host>:<port>/irods-rest/<rest_api_version>
#
# e.g. https://example.org:8080/irods-rest/0.9.2

REACT_APP_REST_API_URL=

#######################################
# Defaults

LISTEN_PORT=9000
REACT_APP_APPBAR_LOGO=iRODS-logo.jpg
REACT_APP_LOGIN_LOGO=iRODS-logo-1.png
REACT_APP_BRANDING_NAME=Zone Management Tool
REACT_APP_PRIMARY_COLOR=#04bdaf

5. Deploy the ZMT via Docker Compose

Start Service

Use the following code to start service.

docker-compose up

Stop Service

docker-compose down

Health checks in ZMT

ZMT will load its health checks from two checkfile directories (default and custom). Default checks are included and on by default.

Results of each check are presented as 'healthy', 'warning', 'error', 'invalid', 'inactive', or 'unavailable'.

localStorage

  • active - Each health check's status. Can be set to 'false' to no longer run.

  • interval - Each health check's interval between reaching out to the server, in seconds.

ZMT will hold each checkfile's settings in localStorage until Logout.

Custom health checks

Additional health checks can be added to your ZMT deployment.

On startup, ZMT will validate each checkfile and provide any errors in the table view (with additional information in the browser console).

1. Create a new checkfile

Copy src/data/checkfiles/checkfile_template.js into the src/data/checkfiles/custom_checkfiles directory. The name of the new checkfile does not matter.

2. Fill in the required values

Required:

  • name - non-empty string
  • description - non-empty string
  • interval_in_seconds - positive integer
  • active - true or false
  • checker - javascript object which returns a result object

Optional:

  • minimum_server_version - string representing major.minor.patch level of the iRODS server
  • maximum_server_version - string representing major.minor.patch level of the iRODS server

3. Restart ZMT

ZMT will re-validate and re-run each defined checkfile.

Built With

  • React - Reactive frontend framework built by Facebook
  • Material UI - Material Design

irods_client_zone_management_tool's People

Contributors

connectbo avatar ganning127 avatar trel avatar alanking avatar

Stargazers

 avatar Kory Draughn avatar Aitrami avatar  avatar Konrad avatar Sam Morris avatar

Watchers

 avatar James Cloos avatar Kory Draughn avatar  avatar Martin Flores avatar  avatar  avatar  avatar

irods_client_zone_management_tool's Issues

add hierarchy/tree view to the resources page

The resources section of the ZMT should have two 'tabs' presenting the same information, but in different ways.

  • TableView - existing, with editing and filters available
  • HierarchicalView - showing the resource hierarchies (trees) with their parent/child relationships
    • should have drag and drop
    • should have 'folding' or collapsible branches (in case of many resources, too many to see at once, etc)
    • should accumulate 'edits', provide a 'confirm' dialog/page, and then update/refresh
    • should possibly provide an 'undo' stack?

refactor server context provider

Server context provider can make full use of the new rest api to boost its performance. Implement concurrent operations in server context provider, and handle all fetch requests for user, group and resource page.

misconfiguration of reactapp

I start the service but can not login to it
Is there something I missed?
I tried with the user and password that I used with REST API and RPC
Thank you
ask_ZMT

shift-reload while on /servers page shows TypeError (race condition?)

TypeError: Cannot read property 'length' of undefined

Server
src/app/src/views/Server.js:78
  75 | 
  76 | return (
  77 |     <Fragment>
> 78 |         <TablePagination component="div" className={classes.pagination} page={currPage - 1} count={parseInt(zoneContext.length)} rowsPerPage={perPage} onChangePage={(event, value) => { setCurrPage(value + 1) }} onChangeRowsPerPage={(e) => { setPerPage(e.target.value); setCurrPage(1) }} />
  79 |         <TableContainer className={classes.tableContainer} component={Paper}>
  80 |             <Table className={classes.table} aria-label="simple table">
  81 |                 <TableHead>

add configuration file

in the configuration for the application...

  • iRODS REST API URL (protocol://hostname:port/path)
  • allow for specifying an image to serve as a branding logo
    • relative path into a container? absolute URL? not sure here...
    • to be used on login page
    • to be used in title bar
  • allow for specifying the colors used in the application
    • main background (default white)
    • titlebar (default iRODS green)
    • active navigation tab (default iRODS green)

add key event (return) to text field entries

when editing a resource (for example)... it would be nice to hit enter... and the value I typed to be 'saved'.

Screen Shot 2021-09-01 at 4 24 56 PM

I think it should also just 'close' the text area and repaint just that resource's details..., not necessarily refresh the entire page... the refresh takes the user away from their search and the resource they were editing... maybe they wanted to edit a second field... this can be a new issue if requires more changes (aka no modal 'success' dialog, etc.)

show counts of items in sidebar / listings

instead of saying
Users
the sidebar should show
Users (13)

And that 13 should be live updated whenever a change is made in the application.

It should be lazy loaded and cached on first load of the app.

too many options in the dropdown for new resource

when creating a new resource, the dropdown should be populated with the list of available resource plugin types. This information... is in the zone_report, I believe.

let's see what it looks like with just the lowercase names, too.

Screen Shot 2021-09-03 at 9 35 38 AM

input and table components re-render when filtering

I accidentally found this bug: when filtering results, the input value will re-render and stay empty all the time which could be confusing. I think it relates to the new loading indicator.. Results are correct, but the input element should display the current value. In other words, all other components should not re-render when typing, only the linear progress indicator should render conditionally.

New auth header

Auth header in the new rest api has changed. The ZMT controller needs to be updated. Token will be stored in localstorage and old auth context provider will be removed.

filtering on group might not working

During testing, I found that under certain circumstances, the filtering on group page might display all groups after showing initial filtered results. This relates to the request order react context provider sends out.

image

show current app version

this should include version number as well as git SHA

could be in the title bar... or an about box... or perhaps in a footer? We don't have a footer for anything else yet.

add bumpers for group removal

Have a dialog when clicking the 'remove' button. Let user double-check if that is the one to remove. Should work similar as user/resource page.

  • display groupname
  • be able to display error message during remove operation

Modify the table view

The current list view is not very consist. Having a sort function for each column might be a good idea. Also need to merge edit/remove button into each row of data, having the entire row clickable into editor mode.

Filter function in edit page

Current edit page does not support filtering, which means there is no way for user to find out a group or user among hundreds or thousands. Implementing dynamic filtering function in both edit-user and edit-group page will help. The filter function would also detect whether a user is in this group or not (or a group has this user), and display the functionality accordingly.

inconsistent display of footer

Some weird extra space between footer and main component when scrolled down to the bottom and up to the top again:

image

The footer should stay at the bottom all the time, and main component can be infinite scolling. We could also adding a 'Back to top' button?

release activities for ZMT 0.1.0

  • HTML
    • clean up comments
    • have 404 and 5xx error page #47
    • any anchor tag with target="_blank" should have a rel="noopener" attribute to prevent tab nabbing
    • lint check #53
  • CSS
    • responsive design, mobile friendly, check at different resolution width<= 768px, 1024px, etc..
    • css validator, and stylelint
    • test on different kernel browsers (Safari, Firefox, Chrome, Internet Explorer, EDGE...)
    • test on mobile browsers
  • Image
    • images are optimized to be rendered in the browser
    • width and height are set to limit the rendering
    • have alternative text when image is not available
  • Functionality
    • Test with the latest irods client rest api
    • Authentication
    • User/Group Page Scenario
      • Listing + Sorting
      • Add new user/group (various name case) + key event
      • Delete user/group
      • Edit user group
    • Resource Page Scenario
      • Listing + Sorting
      • Add new resource, handle error messages if not created successfully + key event
      • Edit resource attribute, hostname, vault path, context string, comment
      • Remove resource, show error message
      • Treeview Drag and drop
    • Zone report Scenario
      • display all zone data appropriately
  • Update README

404 error page is not present

ZMT should have a 404 error page, so when users hit a url that is not served, it will notify users and provide links back to homepage.

refactor sorting within page listing

Let ZMT use iRODS genquery ordering syntax. ZMT Server context providers should take care of all the logic and query string, and page views (user,group,resoruce) only needs to pass in props (which order and order by which column).

new resource fields should be sanitized

when creating a new resource... i was able to add some spaces or a tab character and they made it into the database... which, due to them being a hostname... made iRODS timeout in talking to all its resources during new connections.

these fields should be trimmed for all whitespace (front and back) before sending to the server.

seen in the screenshot and then in the database... ip-172-31-13-194%20%20

Screen Shot 2021-09-02 at 1 06 58 PM

also note the incorrect dialog box...

  • "Vault Path" -> "Hostname"
  • "Zone" should be dropped from this dialog
  • "Vault Path" should be added, with correct value

bundleResc doesn't need to be listed

please hide it from the list of resources

it's not really a thing that can/should be edited and it does not interact (parent/child) with any other resources.

Eslint clean

Current ZMT has several eslint warnings and errors, some of which might have a negative impact on performance and security issue. These should be resolved, and web console should be clean for the initial release.

add connection status on the login page

Have a green(OK)/red(Error) status bar will help user determine if REST Api deployment or the its url in .env is correct.

Click on the status bar will pop up a new window showing each endpoint status(currently /auth, /zone_report, /admin, /query), along with a retry button for each.

show active area of navigation

either the navigation should show a different color for the 'page' you're on, or we introduce consistent breadcrumbs near the top of any page to show where the user is in the app.

if we don't have two-levels of navigation (which we do not at the moment)... then an active color in the sidebar is sufficient, and saves space.

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.