mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Merge branch 'develop' of https://github.com/snipe/snipe-it into develop
This commit is contained in:
commit
90584ab803
|
@ -1,7 +1,48 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Cribbed from nextcloud docker official repo
|
||||
# https://github.com/nextcloud/docker/blob/master/docker-entrypoint.sh
|
||||
# usage: file_env VAR [DEFAULT]
|
||||
# ie: file_env 'XYZ_DB_PASSWORD' 'example'
|
||||
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
|
||||
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
|
||||
file_env() {
|
||||
local var="$1"
|
||||
local fileVar="${var}_FILE"
|
||||
local def="${2:-}"
|
||||
local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
|
||||
local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
|
||||
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
|
||||
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
||||
exit 1
|
||||
fi
|
||||
if [ -n "${varValue}" ]; then
|
||||
export "$var"="${varValue}"
|
||||
elif [ -n "${fileVarValue}" ]; then
|
||||
export "$var"="$(cat "${fileVarValue}")"
|
||||
elif [ -n "${def}" ]; then
|
||||
export "$var"="$def"
|
||||
fi
|
||||
unset "$fileVar"
|
||||
}
|
||||
|
||||
# Add docker secrets support for the variables below:
|
||||
file_env APP_KEY
|
||||
file_env DB_HOST
|
||||
file_env DB_PORT
|
||||
file_env DB_DATABASE
|
||||
file_env DB_USERNAME
|
||||
file_env DB_PASSWORD
|
||||
file_env REDIS_HOST
|
||||
file_env REDIS_PASSWORD
|
||||
file_env REDIS_PORT
|
||||
file_env MAIL_HOST
|
||||
file_env MAIL_PORT
|
||||
file_env MAIL_USERNAME
|
||||
file_env MAIL_PASSWORD
|
||||
|
||||
# fix key if needed
|
||||
if [ -z "$APP_KEY" ]
|
||||
if [ -z "$APP_KEY" -a -z "$APP_KEY_FILE" ]
|
||||
then
|
||||
echo "Please re-run this container with an environment variable \$APP_KEY"
|
||||
echo "An example APP_KEY you could use is: "
|
||||
|
|
|
@ -1,7 +1,48 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Cribbed from nextcloud docker official repo
|
||||
# https://github.com/nextcloud/docker/blob/master/docker-entrypoint.sh
|
||||
# usage: file_env VAR [DEFAULT]
|
||||
# ie: file_env 'XYZ_DB_PASSWORD' 'example'
|
||||
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
|
||||
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
|
||||
file_env() {
|
||||
local var="$1"
|
||||
local fileVar="${var}_FILE"
|
||||
local def="${2:-}"
|
||||
local varValue=$(env | grep -E "^${var}=" | sed -E -e "s/^${var}=//")
|
||||
local fileVarValue=$(env | grep -E "^${fileVar}=" | sed -E -e "s/^${fileVar}=//")
|
||||
if [ -n "${varValue}" ] && [ -n "${fileVarValue}" ]; then
|
||||
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
||||
exit 1
|
||||
fi
|
||||
if [ -n "${varValue}" ]; then
|
||||
export "$var"="${varValue}"
|
||||
elif [ -n "${fileVarValue}" ]; then
|
||||
export "$var"="$(cat "${fileVarValue}")"
|
||||
elif [ -n "${def}" ]; then
|
||||
export "$var"="$def"
|
||||
fi
|
||||
unset "$fileVar"
|
||||
}
|
||||
|
||||
# Add docker secrets support for the variables below:
|
||||
file_env APP_KEY
|
||||
file_env DB_HOST
|
||||
file_env DB_PORT
|
||||
file_env DB_DATABASE
|
||||
file_env DB_USERNAME
|
||||
file_env DB_PASSWORD
|
||||
file_env REDIS_HOST
|
||||
file_env REDIS_PASSWORD
|
||||
file_env REDIS_PORT
|
||||
file_env MAIL_HOST
|
||||
file_env MAIL_PORT
|
||||
file_env MAIL_USERNAME
|
||||
file_env MAIL_PASSWORD
|
||||
|
||||
# fix key if needed
|
||||
if [ -z "$APP_KEY" ]
|
||||
if [ -z "$APP_KEY" -a -z "$APP_KEY_FILE" ]
|
||||
then
|
||||
echo "Please re-run this container with an environment variable \$APP_KEY"
|
||||
echo "An example APP_KEY you could use is: "
|
||||
|
|
|
@ -845,18 +845,20 @@ th.css-location > .th-inner::before {
|
|||
}
|
||||
}
|
||||
@media screen and (max-width: 1318px) and (min-width: 1200px){
|
||||
.box{
|
||||
.admin.box{
|
||||
height:170px;
|
||||
}
|
||||
}
|
||||
|
||||
.ellipsis {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
@media screen and (max-width: 1494px) and (min-width: 1200px){
|
||||
.dashboard.small-box{
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 188px;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/** Form-stuff overrides for checkboxes and stuff **/
|
||||
|
||||
label.form-control {
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<div class="col-lg-2 col-xs-6">
|
||||
<a href="{{ route('hardware.index') }}">
|
||||
<!-- small box -->
|
||||
<div class="small-box bg-teal">
|
||||
<div class="dashboard small-box bg-teal">
|
||||
<div class="inner">
|
||||
<h3>{{ number_format(\App\Models\Asset::AssetsForShow()->count()) }}</h3>
|
||||
<p>{{ strtolower(trans('general.assets')) }}</p>
|
||||
|
@ -49,7 +49,7 @@
|
|||
<div class="col-lg-2 col-xs-6">
|
||||
<a href="{{ route('licenses.index') }}">
|
||||
<!-- small box -->
|
||||
<div class="small-box bg-maroon">
|
||||
<div class="dashboard small-box bg-maroon">
|
||||
<div class="inner">
|
||||
<h3>{{ number_format($counts['license']) }}</h3>
|
||||
<p>{{ strtolower(trans('general.licenses')) }}</p>
|
||||
|
@ -68,7 +68,7 @@
|
|||
<div class="col-lg-2 col-xs-6">
|
||||
<!-- small box -->
|
||||
<a href="{{ route('accessories.index') }}">
|
||||
<div class="small-box bg-orange">
|
||||
<div class="dashboard small-box bg-orange">
|
||||
<div class="inner">
|
||||
<h3> {{ number_format($counts['accessory']) }}</h3>
|
||||
<p>{{ strtolower(trans('general.accessories')) }}</p>
|
||||
|
@ -87,7 +87,7 @@
|
|||
<!-- small box -->
|
||||
|
||||
<a href="{{ route('consumables.index') }}">
|
||||
<div class="small-box bg-purple">
|
||||
<div class="dashboard small-box bg-purple">
|
||||
<div class="inner">
|
||||
<h3> {{ number_format($counts['consumable']) }}</h3>
|
||||
<p>{{ strtolower(trans('general.consumables')) }}</p>
|
||||
|
@ -104,7 +104,7 @@
|
|||
<div class="col-lg-2 col-xs-6">
|
||||
<a href="{{ route('components.index') }}">
|
||||
<!-- small box -->
|
||||
<div class="small-box bg-yellow">
|
||||
<div class="dashboard small-box bg-yellow">
|
||||
<div class="inner">
|
||||
<h3>{{ number_format($counts['component']) }}</h3>
|
||||
<p>{{ strtolower(trans('general.components')) }}</p>
|
||||
|
@ -122,7 +122,7 @@
|
|||
<div class="col-lg-2 col-xs-6">
|
||||
<a href="{{ route('users.index') }}">
|
||||
<!-- small box -->
|
||||
<div class="small-box bg-light-blue">
|
||||
<div class="dashboard small-box bg-light-blue">
|
||||
<div class="inner">
|
||||
<h3>{{ number_format($counts['user']) }}</h3>
|
||||
<p>{{ strtolower(trans('general.people')) }}</p>
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
<div class="list clearfix">
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="admin box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.branding.index') }}" class="settings_button">
|
||||
|
@ -74,7 +74,7 @@
|
|||
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="admin box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.general.index') }}" class="settings_button">
|
||||
|
@ -91,7 +91,7 @@
|
|||
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="admin box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.security.index') }}" class="settings_button">
|
||||
|
@ -107,7 +107,7 @@
|
|||
</div>
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="admin box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('groups.index') }}" class="settings_button">
|
||||
|
@ -124,7 +124,7 @@
|
|||
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="admin box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.localization.index') }}" class="settings_button">
|
||||
|
@ -142,7 +142,7 @@
|
|||
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="admin box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.alerts.index') }}" class="settings_button">
|
||||
|
@ -158,7 +158,7 @@
|
|||
</div>
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="admin box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.slack.index') }}" class="settings_button">
|
||||
|
@ -173,7 +173,7 @@
|
|||
</div>
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="admin box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.asset_tags.index') }}" class="settings_button">
|
||||
|
@ -188,7 +188,7 @@
|
|||
</div>
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="admin box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.barcodes.index') }}" class="settings_button">
|
||||
|
@ -203,7 +203,7 @@
|
|||
</div>
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="admin box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.labels.index') }}" class="settings_button">
|
||||
|
@ -219,7 +219,7 @@
|
|||
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="admin box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.ldap.index') }}" class="settings_button">
|
||||
|
@ -234,7 +234,7 @@
|
|||
</div>
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="admin box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.google.index') }}" class="settings_button">
|
||||
|
@ -249,7 +249,7 @@
|
|||
</div>
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="admin box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.saml.index') }}" class="settings_button">
|
||||
|
@ -264,7 +264,7 @@
|
|||
</div>
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="admin box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.backups.index') }}" class="settings_button">
|
||||
|
@ -280,7 +280,7 @@
|
|||
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="admin box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.logins.index') }}" class="settings_button">
|
||||
|
@ -295,7 +295,7 @@
|
|||
</div>
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="admin box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.oauth.index') }}" class="settings_button">
|
||||
|
@ -311,7 +311,7 @@
|
|||
|
||||
@if (config('app.debug')=== true)
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-default">
|
||||
<div class="admin box box-default">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.phpinfo.index') }}" class="settings_button">
|
||||
|
@ -329,7 +329,7 @@
|
|||
|
||||
|
||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||
<div class="box box-danger">
|
||||
<div class="admin box box-danger">
|
||||
<div class="box-body text-center">
|
||||
<h5>
|
||||
<a href="{{ route('settings.purge.index') }}" class="link-danger">
|
||||
|
|
Loading…
Reference in a new issue