Merge remote-tracking branch 'origin/develop'

This commit is contained in:
snipe 2023-09-14 22:57:04 +01:00
commit 20da6cccbc
6 changed files with 42 additions and 91 deletions

View file

@ -1,44 +0,0 @@
version: 1
environment:
php: 8.0
node: 12
services:
- mysql: 5.7
on:
push:
branches:
- master
- develop
pull_request:
branches: .*
pipeline:
- name: Setup
cmd: |
cp -v .env.testing.example .env
cp -v .env.testing.example .env.testing
composer install --no-interaction --prefer-dist --optimize-autoloader
- name: Generate Key
cmd: |
php artisan key:generate --force
- name: Passport Keys
cmd: |
php artisan passport:keys
- name: Run Migrations
cmd: |
php artisan migrate --force
- name: PHPUnit Unit Tests
cmd: |
php artisan test --testsuite Unit
- name: PHPUnit Feature Tests
cmd: |
php artisan test --testsuite Feature

View file

@ -1,4 +1,4 @@
![Build Status](https://app.chipperci.com/projects/0e5f8979-31eb-4ee6-9abf-050b76ab0383/status/master) [![Crowdin](https://d322cqt584bo4o.cloudfront.net/snipe-it/localized.svg)](https://crowdin.com/project/snipe-it) [![Docker Pulls](https://img.shields.io/docker/pulls/snipe/snipe-it.svg)](https://hub.docker.com/r/snipe/snipe-it/) [![Twitter Follow](https://img.shields.io/twitter/follow/snipeitapp.svg?style=social)](https://twitter.com/snipeitapp) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/553ce52037fc43ea99149785afcfe641)](https://www.codacy.com/app/snipe/snipe-it?utm_source=github.com&utm_medium=referral&utm_content=snipe/snipe-it&utm_campaign=Badge_Grade) [![Crowdin](https://d322cqt584bo4o.cloudfront.net/snipe-it/localized.svg)](https://crowdin.com/project/snipe-it) [![Docker Pulls](https://img.shields.io/docker/pulls/snipe/snipe-it.svg)](https://hub.docker.com/r/snipe/snipe-it/) [![Twitter Follow](https://img.shields.io/twitter/follow/snipeitapp.svg?style=social)](https://twitter.com/snipeitapp) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/553ce52037fc43ea99149785afcfe641)](https://www.codacy.com/app/snipe/snipe-it?utm_source=github.com&utm_medium=referral&utm_content=snipe/snipe-it&utm_campaign=Badge_Grade)
[![All Contributors](https://img.shields.io/badge/all_contributors-326-orange.svg?style=flat-square)](#contributors) [![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.gg/yZFtShAcKk) [![huntr](https://cdn.huntr.dev/huntr_security_badge_mono.svg)](https://huntr.dev) [![All Contributors](https://img.shields.io/badge/all_contributors-326-orange.svg?style=flat-square)](#contributors) [![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.gg/yZFtShAcKk) [![huntr](https://cdn.huntr.dev/huntr_security_badge_mono.svg)](https://huntr.dev)
## Snipe-IT - Open Source Asset Management System ## Snipe-IT - Open Source Asset Management System

View file

@ -369,9 +369,9 @@ return [
'notification_error' => 'Error:', 'notification_error' => 'Error:',
'notification_error_hint' => 'Please check the form below for errors', 'notification_error_hint' => 'Please check the form below for errors',
'notification_bulk_error_hint' => 'The following fields had validation errors and were not edited:', 'notification_bulk_error_hint' => 'The following fields had validation errors and were not edited:',
'notification_success' => 'Success:', 'notification_success' => 'Success',
'notification_warning' => 'Warning:', 'notification_warning' => 'Warning',
'notification_info' => 'Info:', 'notification_info' => 'Info',
'asset_information' => 'Asset Information', 'asset_information' => 'Asset Information',
'model_name' => 'Model Name', 'model_name' => 'Model Name',
'asset_name' => 'Asset Name', 'asset_name' => 'Asset Name',
@ -481,5 +481,8 @@ return [
'address2' => 'Address Line 2', 'address2' => 'Address Line 2',
'import_note' => 'Imported using csv importer', 'import_note' => 'Imported using csv importer',
], ],
'percent_complete' => '% complete',
'uploading' => 'Uploading... ',
'upload_error' => 'Error uploading file. Please check that there are no empty trailing rows.'
]; ];

View file

@ -9,7 +9,7 @@
{{-- alert --}} {{-- alert --}}
@if($message != '') @if($message != '')
<div class="col-md-12" class="{{ $message_type }}"> <div class="col-md-12" class="{{ $message_type }}">
<div class="alert alert-{{ $this->message_type }} "> <div class="alert alert-{{ $this->message_type }}">
<button type="button" class="close" wire:click="$set('message','')">&times;</button> <button type="button" class="close" wire:click="$set('message','')">&times;</button>
@if($message_type == 'success') @if($message_type == 'success')
<i class="fas fa-check faa-pulse animated" aria-hidden="true"></i> <i class="fas fa-check faa-pulse animated" aria-hidden="true"></i>
@ -20,11 +20,13 @@
</div> </div>
@endif @endif
@if($import_errors) @if($import_errors)
<div class="col-md-12">
<div class="box"> <div class="box">
<div class="box-body"> <div class="box-body">
<div class="alert alert-warning"> <div class="alert alert-warning">
<strong><i class="fa fa-warning info" aria-hidden="true"></i> {{ trans('general.warning', ['warning'=> trans('general.errors_importing')]) }}</strong>
<i class="fa fa-warning info" aria-hidden="true"></i> <strong>{{ trans('general.warning', ['warning'=> trans('general.errors_importing')]) }}</strong>
</div> </div>
<div class="errors-table"> <div class="errors-table">
@ -57,6 +59,7 @@
</div> </div>
</div> </div>
</div> </div>
</div>
@endif @endif
<div class="col-md-9"> <div class="col-md-9">
@ -65,17 +68,18 @@
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
@if($progress != -1) @if($progress != -1)
<div class="col-md-9" style="padding-bottom:20px" id='progress-container'> <div class="col-md-10 col-sm-5 col-xs-12" style="height: 35px;" id='progress-container'>
<div class="progress progress-striped-active" style="margin-top: 8px"> {{-- so someof these values are in importer.vue! --}} <div class="progress progress-striped-active" style="height: 100%;">
<div id='progress-bar' class="progress-bar {{ $progress_bar_class }}" role="progressbar" style="width: {{ $progress }}%"> <div id='progress-bar' class="progress-bar {{ $progress_bar_class }}" role="progressbar" style="width: {{ $progress }}%">
<span id='progress-text'>{{ $progress_message }}</span> <h4 id="progress-text">{!! $progress_message !!}</h4>
</div> </div>
</div> </div>
</div> </div>
@endif @endif
<div class="col-md-3 text-right pull-right"> <div class="col-md-2 col-sm-5 col-xs-12 text-right pull-right">
<!-- The fileinput-button span is used to style the file input field as button --> <!-- The fileinput-button span is used to style the file input field as button -->
@if (!config('app.lock_passwords')) @if (!config('app.lock_passwords'))
@ -289,7 +293,7 @@
dataType: 'json', dataType: 'json',
done: function(e, data) { done: function(e, data) {
@this.progress_bar_class = 'progress-bar-success'; @this.progress_bar_class = 'progress-bar-success';
@this.progress_message = '{{ trans('general.notification_success') }}'; // TODO - we're already round-tripping to the server here - I'd love it if we could get internationalized text here @this.progress_message = '<i class="fas fa-check faa-pulse animated"></i> {{ trans('general.notification_success') }}';
@this.progress = 100; @this.progress = 100;
}, },
add: function(e, data) { add: function(e, data) {
@ -302,17 +306,12 @@
}, },
progress: function(e, data) { progress: function(e, data) {
@this.progress = parseInt((data.loaded / data.total * 100, 10)); @this.progress = parseInt((data.loaded / data.total * 100, 10));
@this.progress_message = @this.progress+'% Complete'; // TODO - make this use general.percent_complete as a translation, passing :percent as a variable @this.progress_message = '{{ trans('general.uploading') }}';
}, },
fail: function(e, data) { fail: function() {
@this.progress_bar_class = "progress-bar-danger"; @this.progress_bar_class = "progress-bar-danger";
@this.progress = 100; @this.progress = 100;
@this.progress_message = '<i class="fas fa-exclamation-triangle faa-pulse animated"></i> {{ trans('general.upload_error') }}';
var error_message = ''
for(var i in data.jqXHR.responseJSON.messages) {
error_message += i+": "+data.jqXHR.responseJSON.messages[i].join(", ")
}
@this.progress_message = error_message;
} }
}) })

View file

@ -3,7 +3,7 @@
<div class="alert alert-danger fade in"> <div class="alert alert-danger fade in">
<button type="button" class="close" data-dismiss="alert">&times;</button> <button type="button" class="close" data-dismiss="alert">&times;</button>
<i class="fas fa-exclamation-triangle faa-pulse animated"></i> <i class="fas fa-exclamation-triangle faa-pulse animated"></i>
<strong>{{ trans('general.notification_error') }}</strong> <strong>{{ trans('general.notification_error') }}:</strong>
{{ trans('general.notification_error_hint') }} {{ trans('general.notification_error_hint') }}
</div> </div>
</div> </div>
@ -16,7 +16,7 @@
<div class="alert alert-success fade in"> <div class="alert alert-success fade in">
<button type="button" class="close" data-dismiss="alert">&times;</button> <button type="button" class="close" data-dismiss="alert">&times;</button>
<i class="fas fa-check faa-pulse animated"></i> <i class="fas fa-check faa-pulse animated"></i>
<strong>{{ trans('general.notification_success') }} </strong> <strong>{{ trans('general.notification_success') }}: </strong>
{{ $message }} {{ $message }}
</div> </div>
</div> </div>
@ -28,7 +28,7 @@
<div class="alert alert-success fade in"> <div class="alert alert-success fade in">
<button type="button" class="close" data-dismiss="alert">&times;</button> <button type="button" class="close" data-dismiss="alert">&times;</button>
<i class="fas fa-check faa-pulse animated"></i> <i class="fas fa-check faa-pulse animated"></i>
<strong>{{ trans('general.notification_success') }} </strong> <strong>{{ trans('general.notification_success') }}: </strong>
{{ $message }} {{ $message }}
</div> </div>
</div> </div>
@ -67,7 +67,7 @@
<div class="alert alert-info fade in"> <div class="alert alert-info fade in">
<button type="button" class="close" data-dismiss="alert">&times;</button> <button type="button" class="close" data-dismiss="alert">&times;</button>
<i class="fas fa-info-circle faa-pulse animated"></i> <i class="fas fa-info-circle faa-pulse animated"></i>
<strong>{{ trans('general.consumable_information') }} </strong> <strong>{{ trans('general.consumable_information') }}</strong>
<ul><li><b>{{ trans('general.consumable_name') }}</b> {{ $consumable->name }}</li></ul> <ul><li><b>{{ trans('general.consumable_name') }}</b> {{ $consumable->name }}</li></ul>
</div> </div>
</div> </div>
@ -120,7 +120,7 @@
<div class="alert alert alert-danger fade in"> <div class="alert alert alert-danger fade in">
<button type="button" class="close" data-dismiss="alert">&times;</button> <button type="button" class="close" data-dismiss="alert">&times;</button>
<i class="fas fa-exclamation-triangle faa-pulse animated"></i> <i class="fas fa-exclamation-triangle faa-pulse animated"></i>
<strong>{{ trans('general.notification_error') }} </strong> <strong>{{ trans('general.notification_error') }}: </strong>
{{ trans('general.notification_bulk_error_hint') }} {{ trans('general.notification_bulk_error_hint') }}
@foreach($messages as $message) @foreach($messages as $message)
<ul> <ul>
@ -137,7 +137,7 @@
<div class="alert alert-warning fade in"> <div class="alert alert-warning fade in">
<button type="button" class="close" data-dismiss="alert">&times;</button> <button type="button" class="close" data-dismiss="alert">&times;</button>
<i class="fas fa-exclamation-triangle faa-pulse animated"></i> <i class="fas fa-exclamation-triangle faa-pulse animated"></i>
<strong>{{ trans('general.notification_warning') }} </strong> <strong>{{ trans('general.notification_warning') }}: </strong>
{{ $message }} {{ $message }}
</div> </div>
</div> </div>
@ -149,7 +149,7 @@
<div class="alert alert-info fade in"> <div class="alert alert-info fade in">
<button type="button" class="close" data-dismiss="alert">&times;</button> <button type="button" class="close" data-dismiss="alert">&times;</button>
<i class="fas fa-info-circle faa-pulse animated"></i> <i class="fas fa-info-circle faa-pulse animated"></i>
<strong>{{ trans('general.notification_info') }} </strong> <strong>{{ trans('general.notification_info') }}: </strong>
{{ $message }} {{ $message }}
</div> </div>
</div> </div>

View file

@ -1,5 +1,5 @@
@extends('layouts/setup') @extends('layouts/setup')
{{ trans('admin/users/table.createuser') }}
@section('title') @section('title')
{{ trans('admin/users/general.create_user') }} :: {{ trans('admin/users/general.create_user') }} ::
@parent @parent
@ -48,23 +48,19 @@
<div class="row"> <div class="row">
<div class="form-group col-lg-6"> <div class="form-group col-lg-6">
<label>{{trans('admin/settings/general.auto_increment_assets')}}</label>
<div class="checkbox"> <label class="form-control form-control">
<label>
<input type="checkbox" value="1" name="auto_increment_assets">{{trans('admin/settings/general.auto_increment_assets')}} <input type="checkbox" value="1" name="auto_increment_assets">{{trans('admin/settings/general.auto_increment_assets')}}
</label> </label>
</div>
</div> </div>
<!-- Multi Company Support --> <!-- Multi Company Support -->
<div class="form-group col-lg-6"> <div class="form-group col-lg-6">
{{ Form::label('full_multiple_companies_support', trans('admin/settings/general.full_multiple_companies_support_text')) }} <label class="form-control form-control">
<div class="checkbox">
<label>
<input type="checkbox" value="1" name="full_multiple_companies_support"> {{ trans('admin/settings/general.full_multiple_companies_support_text') }} <input type="checkbox" value="1" name="full_multiple_companies_support"> {{ trans('admin/settings/general.full_multiple_companies_support_text') }}
</label> </label>
</div> </div>
</div>
</div> </div>
@ -156,13 +152,10 @@
<!-- Email credentials --> <!-- Email credentials -->
<div class="form-group col-lg-12"> <div class="form-group col-lg-12">
<label>{{ trans('admin/users/general.email_credentials') }}</label> <label class="form-control form-control">
<div class="checkbox">
<label>
<input type="checkbox" value="1" name="email_creds">{{ trans('admin/users/general.email_credentials_text') }} <input type="checkbox" value="1" name="email_creds">{{ trans('admin/users/general.email_credentials_text') }}
</label> </label>
</div> </div>
</div>
</div> <!--/.COL-LG-12--> </div> <!--/.COL-LG-12-->
@stop @stop