trudesk
repository·master·Indexed 23 days ago
https://github.com/polonel/trudeskAn open-source help desk solution designed to organize and simplify issue and task resolution, available as a Community Edition for self-hosting. Version 1.2.11 includes documentation for Kubernetes deployment, Elasticsearch configuration, and various AngularJS library integrations such as angular-animate, angular-elastic, angular-moment, and angular-sanitize.
What's inside trudesk
- Moment.js is a lightweight JavaScript library designed for parsing, validating, manipulating, and formatting dates.
Overview of C3.js
masterC3 is a reusable chart library built on top of D3.js. It is designed to enable deeper integration of charts into web applications by providing a more high-level API than raw D3.js.What is D3.js
masterD3.js (Data-Driven Documents) is a JavaScript library used to manipulate documents based on data. It enables the creation of dynamic visualizations by binding data to the DOM and using HTML, SVG, and CSS to bring that data to life. D3 focuses on web standards, allowing for powerful visualization components without being tied to a proprietary framework.How ngStorage works with AngularJS
masterngStorage is an AngularJS module that provides two services:
$localStorageand$sessionStorage. It allows you to persist data in the browser's Web Storage in an "Angular Way" by binding storage objects directly to your$scope.When you bind a storage service to a
$scopeproperty, changes made to that property are automatically synchronized with the browser's Web Storage. This synchronization works across different browser tabs.angular.module('app', [ 'ngStorage' ]).controller('Ctrl', function( $scope, $localStorage, $sessionStorage ){});How states and nested views work in AngularUI Router
masterAngularUI Router organizes applications around states rather than just URL routes. States can be nested, allowing you to manage complex interfaces by plugging child templates into a
ui-viewdirective located within a parent state's template.Core Directives:
ui-view: A placeholder directive that marks where the state's template should be rendered. Nestingui-viewdirectives within templates enables nested views.ui-sref: A directive used on links (e.g.,<a ui-sref="stateName">) that automatically generates the correcthrefbased on the state's URL and manages state transitions.
Customize option templates in modal-select
masterThe
modal-selectdirective uses an internal template for each item in the list. To customize how options look, place a single element with the classoptioninside your directive element. The directive will extract this template and use it to render each item in the modal.Example:
<button class="button" modal-select ng-model="someModel" options="selectables"> Select it <div class="option"> {{option.name}} ({{option.role}}) </div> </button>When rendered in the modal, the content will be wrapped in an element with classes
item item-text wrap.<button class="button button-positive" modal-select ng-model="someModel" options="selectables" modal-title="Select a number"> Select it <div class="option"> {{option}} </div> </button>How to provide options to modal-select
masterYou can provide the list of selectable items to the
modal-selectdirective in two ways:Using the
optionsattribute: Pass an array of values or objects. The directive watches this array for changes.<div modal-select options="myArray" ng-model="selectedItem">...</div>Using the
options-expressionattribute: Pass an expression similar tocollection-repeat(e.g.,item in items | orderBy:'name'). This allows you to apply filters or ordering directly in the template without modifying the source array.<div modal-select options-expression="album in artist.albums" ng-model="selectedAlbum">...</div>
Handle timezones with amUtc, amLocal, and amTimezone filters
masterThese filters allow you to manipulate timezones for display:
amUtc: Switches the moment object to UTC mode.amLocal: Switches the moment object to the local timezone.amUtcOffset: Displays the date with a specific UTC offset (e.g.,'+0300').amTimezone: Applies a specific timezone (e.g.,'Israel'). Requiresmoment-timezone.jsand timezone data to be loaded.
Note: These filters require
angular-momentversion1.0.0-beta.3or newer.Deploy Trudesk on Ubuntu 20.04
masterYou can quickly deploy Trudesk on an Ubuntu 20.04 system using a single command. This script automates the installation process.
curl -L -s https://storage.trudesk.io/install/ubuntu-1.2.sh | sudo bashConfigure Elasticsearch in Trudesk
masterAfter the deployment is complete, you must configure the Elasticsearch endpoint within the Trudesk application to ensure proper functionality.
- Log into the Trudesk web interface.
- Navigate to Settings > Elasticsearch.
- Define the endpoint using the following service details:
- Server:
http://elasticsearch.trudesk.svc.cluster.local - Port:
9200
- Server:
Server: http://elasticsearch.trudesk.svc.cluster.local Port: 9200Install angular-sanitize via npm
masterInstall the
angular-sanitizepackage using npm, then includengSanitizeas a dependency in your AngularJS module definition.npm install angular-sanitizeangular.module('myApp', [require('angular-sanitize')]);Configure moment-timezone with webpack
masterIf you are using
moment-timezonewith webpack,angular-momentwill not automatically use it unless you explicitly override themomentconstant via Angular's dependency injection.var angular = require('angular'); require('angular-moment'); var ngModule = angular.module('ngApp',['angularMoment']); ngModule.constant('moment', require('moment-timezone'));