Giter Club home page Giter Club logo

slurm-web-api's Introduction

Slurm Web UI

This is a project to provide a web interface to the Slurm cluster manager via the slurm_rest_api project found here: slurm_rest_api

This project uses bootstrap and angularjs to provide a single-page dashboard app.

Warning: There are a few dirty dependencies on slurm and collectd to render this correctly.

Examples

Overview: alt text

Queue: alt text

History: alt text

Nodes: alt text

Partitions: alt text

Install and Dependencies

This project uses npm and bower to help with package management You need to have those installed first.

  1. Install NPM, slurm-rest-api

    Exercise left to developer.

    See slurm_rest_api for that repo's instructions.

  2. Clone Repo

    git clone https://github.com/rbogle/slurm-web-api.git
    
  3. Configure to match slurm-rest-api

    Modify app/config.js and set the Url's to match where you are hosting slurm-rest-api.

    queueStatusUrl can be pointed to any url that displays your slurm queue status.

    Note: if you are running slurm-rest-api and slurm-web-api on the same server, you may have to enable CORS on slurm-rest-api. See https://github.com/corydolphin/flask-cors for more information.

  4. Run NPM, bower

    Run npm install to install the dev server and bower, then our package.json file should trigger bower to download javascript dependencies and place them in app/lib

      npm install
    
    
  5. Testing and Development

    The project includes the spec for lite-server. You can start the server with

    npm start
    

    this will open the web app in your broswer on localhost:3000

Deploy Notes

I deployed this to a subdirectory on an nginx server.

To get correct routing,urls,refresh I found the nginx config had to be like this:

location /<baseref>/ {
    alias <docrootpath>/;
    expires -1;
    add_header Pragma "no-cache";
    add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
    try_files $uri index.html =404;
}

I also needed to have <base href=<baseref> /> in the head of index above any links.

All resource urls in head need to have the baseref added.
Urls in the html should be relative to <baseref> i.e.

<li><a href="queue">Queue</a></li>

results in a url of http://server/baseref/queue

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.