# Logging into the CliDEsc Administration UI

An administrator must first log into the CliDEsc administration UI.</br>
To do this, open CliDEsc in your browser and append **/admin** to the URL as follows
> Example clidesc.local**/admin**

Log in to CliDEsc with your administrator credentials

![Image of Login](../images/login.png)

# Administration Overview

![Image of Login](../images/Clidescadmin.png)

## Left menu

The left menu navigates between the administration tools for CliDEsc

### Pages

The pages administration is to maintain and manage page content on CliDEsc. Here an administrator can add new content pages.

To add a new page:
1. Select 'Add new'

![Image of Add New Page](../images/newpage.png)

#### Page hierarchy

When creating a new page you can opt to place the page either at the top level or a child page of another page.

> The hierarchy determines where in the CliDEsc navigation the page resides. i.e. if a page is at the top level, if selected to display in the navigation will appear in the main navigation bar; a child page will reside in the secondary navigation.

#### Page types

1. Page
  1. This is a generic content page allowing you to enter content via WYSIWYG editor
1. Catalogue Page
  1. This page displays Product Generator information to the user
  1. Catalogue pages are created automatically when a Product Generator is created in the Products admin
1. Error page
  1. This allows the admin to create custom error pages for standard http error codes between 400 and 505
  1. It is recommended to have at least an Error page for 404 and a second Error page for 500
1. Profile Page
  1. For each CliDEsc installation there should be a single Profile page configured. This page is to allow users to configure their own personal information such as, Name, Password, and preferred languages
1. Redirector Page
  1. This page allows the administrator to configure a redirect to a URL either external or internal.

### Product administration

The Product admin is for adding Product Generators.

> A Product Generator is the Script(s) container and surrounding meta data for a Product to be created.

![Image of Product admin](../images/ProductGenerator.png)  

In the Product administration you can navigate several administration screens:
1. Product Generator
 1. Use this screen to view the list of created Product Generators or create a new Product Generator
1. Stations
 1. View the list of Stations or add a new Station manually
 1. This list of stations determines which stations a product may query against
1. Country
 1. View the list of Countries or add a new Country manually
 1. The selected country can be used to define which users see which products by Country they are residing in
1. Product Category
 1. View the list of Product Categories or add new Product Categories
 1. Categories are used to group Products by Types configured by the administrator
1. Bundle
 1. View the list of Product Bundles or add new Product Bundles
 1. Bundles are used to group products to define which users see which products defined by the administrator. Some users may only see products in some bundles, and a Product Generator can be assigned to one or more Bundle. By default all Product Generators are placed in the Master Bundle.
1. Environment
 1. Configure the Product Generator Script(s) executables and their local environment location
1. Language
 1. Configure the Languages to be passed through the Product Generator script(s). If a Product supports translated outputs it will use the language selected byy the user configured in this admin, if the Product does not support the language selected then products will be provided in English by default.

#### Create a Product Generator

See [create products](/create_products.md) on how to create Product Generators
To create a Product Generator click the 'Add Product Generator' button
You will be presented with the Product Generator form to complete the following fields:

* Product Name
This will appear to the user as the title of the Product in the Classic View.
* Description
The Description text should describe what the product is.
* Thumbnail
A small image to display with the product description
* Country product is applicable to
Restricts this product to only to display to users assigned to the country selected
* Category
Set the category for this product. Categories are administered in the Product Category admin screen
* Primary Script
Upload the primary script to run to produce the product to this field.
* Ancillary Scripts
Upload any additional scripts the primary script uses to produce a product.
* Environment
Select the environment executable type and path
* Inputs
Define the Product generator inputs
* outputs
Define the Product generator inputs
* Bundles
Bundles are used to group Product Generators together to define which users can see which products. Bundles are managed in the Bundles Screen tab under the Product admin.


#### Security (User administration)
Here the CliDEsc administrator can configure CliDEsc users and groups. See [User Management](/user_management.md)

#### Jobs (Queued processes)
This screen allows you to view product generator processes when a Product Generator is initialised or run.

#### Settings (Global application settings)
On the settings screen the CliDEsc Administrator can configure the global settings for CliDEsc including:

##### Main
Here the CliDEsc administrator can configure:

* Site title

> site title appears on the CliDEsc Login Screen and in the Header

* Site Tagline/Slogan

> A short tagline which appears in the CliDEsc header below the site title.

* Theme

> If CliDEsc has multoiple themes then you can select and set the theme Here

* Main Logo

> The image uploaded here will display on the Login screen, header and footer
> Recommended size is 250px x 70px [https://placehold.it/250x70](https://placehold.it/250x70)

##### Access
The Access tab defines what configured users and groups can view the CliDEsc Application. By Default only logged in users should have access to the CliDEsc Application.

> On installation only Administrator and User groups have access to the CliDEsc application.

##### Login Form
Here the CliDEsc administrator can configure the content on the Log in form using a WYSIWYG editor.

##### Footer Links
The CliDEsc administrator can use this tab to configure the links which appear in the footer. CliDEsc supports up to two rows in the Footer section of the application. You must first create a row before configuring links.

Once a row is created, select the row and select the "Pages" tab.

Here you can configure either by adding a new page to link to by clicking the "Add Page" button; or

Enter an existing page in the "Link to existing" field

![Footer Links Image](../images/FooterLinks.png)


#### Help
Links to the CliDEsc Documentation you are reading right now.
