diff --git a/.gitignore b/.gitignore index 71f6f1c1e81a741c7903a4e00f6c4fb13a02c5cf..9f7d55267b85b86aee661d84546c226b56a13a4d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +docs/_build .env __pycache__ *.pyc diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..3e6b271225cfe1496f91528e7131e2571aa8a520 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +Take a look at [the documentation folder](docs/index.rst) for information on this project. diff --git a/VERSION b/VERSION new file mode 100644 index 0000000000000000000000000000000000000000..26aaba0e86632e4d537006e45b0ec918d780b3b4 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +1.2.0 diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..d4bb2cbb9eddb1bb1b4f366623044af8e4830919 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 0000000000000000000000000000000000000000..430616a4c13b74daa526e715ba05c53d041c0100 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,60 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) + + +# -- Project information ----------------------------------------------------- + +project = 'user-panel' +copyright = '2020, OpenAppStack' +author = 'OpenAppStack' + +# The full version, including alpha/beta/rc tags +with open('../VERSION') as version_file: + release = version_file.read() + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'recommonmark' +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'sphinx_rtd_theme' + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# Readthedocs.io needs us to tell it what the index file is. This defaults to +# 'contents' +master_doc = 'index' diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..7c71c1b98eb86193db63b63c45584d0bbf1640b4 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,67 @@ +.. user-panel documentation master file, created by + sphinx-quickstart on Thu Jan 9 17:06:13 2020. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Description +----------- + +The user panel allows you to add and edit users. It can +also show you an overview of applications that are available to the users. + +Admin users can create, delete and edit other users. Normal users can log in to change +their password and email address, and see to which applications they have +access. + +Installation +------------ + +At the moment installation should be done following the `single-sign-on +installation instructions`__ which include installation of this user panel. + +.. _sso-docs: https://docs.openappstack.net/projects/single-sign-on/en/latest/installation_instructions.html + +__ sso-docs_ + +In the future, this application will be installable with its own helm chart. + +Usage +----- + +When you first go to the application URL, you will see a "Login" button. This +button opens redirects to you the login screen. On the login screen, you can +find another button that will redirect you to your single sign-on's login +process. Log in by entering your credentials there. + +After logging in there are three tabs on top of the screen. + +The first is the "Home" screen. You'll automatically be on it too: you'll see +all the applications that are also configured in the single sign-on. + +The second tab, "OIDC", shows debug information about your user. + +The last tab, "Users" is where you can create and edit users. + +Creating a new user ++++++++++++++++++++ + +1. Navigate to the "Users" tab. +2. Click "Add user" +3. Enter a username and click "Submit". **Note that your user is not saved + yet!** +4. Enter a password and a valid email address and click "Save" +5. You have now created a user. For the user to be able to log into + applications, you still need to click "Add app" and type the name of the + application the user is allowed to use. Take a look at your admin user to + see the list of possible applications. After typing the name of the + application, click "Save". + + + + + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 0000000000000000000000000000000000000000..2119f51099bf37e4fdb6071dce9f451ea44c62dd --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=. +set BUILDDIR=_build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..020d71956c204b8c7e1dc9f431f94ce47fa05949 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,3 @@ +sphinx>=2.3.1 +sphinx_rtd_theme>=0.4.3 +recommonmark>=0.6.0