Skip to content

Commit

Permalink
Merge pull request #5 from rudnerbjoern/dev
Browse files Browse the repository at this point in the history
Add barcode scanner
  • Loading branch information
rudnerbjoern authored Aug 16, 2024
2 parents e535480 + 33ca6d2 commit 93e56d1
Show file tree
Hide file tree
Showing 9 changed files with 219 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ This Extension uses Icons from:
![Mouse Icon](br-peripherals/images/mouse.png) [Mouse Icon](https://www.flaticon.com/free-icons/computer)Computer icons created by surang - Flaticon

![Keyboard Icon](br-peripherals/images/keyboard.png) [Keyboard Icon](https://www.flaticon.com/free-icons/electric-keyboard) Electric keyboard icons created by Iconic Panda - Flaticon

![Barcode Scanner Icon](br-peripherals/images/barcode-scanner.png) [Barcode Scanner Icon](https://www.flaticon.com/free-icons/barcode-scanner) Barcode scanner icons created by Freepik - Flaticon
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
'itop-endusers-devices/2.7.0',
'teemip-ip-mgmt/3.0.1',
'teemip-config-mgmt-adaptor/3.0.1',
'br-peripherals/0.3.0',
'br-peripherals/0.4.0',
),
'mandatory' => false,
'visible' => true, // To prevent auto-install but shall not be listed in the install wizard
Expand Down
198 changes: 198 additions & 0 deletions br-peripherals/datamodel.br-peripherals.xml
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,199 @@
</list>
</presentation>
</class>
<class id="BarcodeScanner" _delta="define">
<parent>Peripheral</parent>
<properties>
<category>bizmodel,searchable</category>
<abstract>false</abstract>
<key_type>autoincrement</key_type>
<db_table>barcodescanner</db_table>
<db_key_field>id</db_key_field>
<db_final_class_field />
<naming>
<attributes>
<attribute id="name" />
</attributes>
</naming>
<display_template />
<icon>images/barcode-scanner.png</icon>
<reconciliation>
<attributes>
<attribute id="name" />
<attribute id="org_id" />
<attribute id="organization_name" />
</attributes>
</reconciliation>
</properties>
<fields>
</fields>
<methods />
<presentation>
<details>
<items>
<item id="col:col1">
<rank>10</rank>
<items>
<item id="fieldset:Server:baseinfo">
<rank>10</rank>
<items>
<item id="name">
<rank>10</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="status">
<rank>30</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
<item id="location_id">
<rank>50</rank>
</item>
</items>
</item>
<item id="fieldset:Server:moreinfo">
<rank>20</rank>
<items>
<item id="brand_id">
<rank>10</rank>
</item>
<item id="model_id">
<rank>20</rank>
</item>
<item id="serialnumber">
<rank>80</rank>
</item>
<item id="asset_number">
<rank>90</rank>
</item>
</items>
</item>
</items>
</item>
<item id="col:col2">
<rank>20</rank>
<items>
<item id="fieldset:Server:Date">
<rank>10</rank>
<items>
<item id="move2production">
<rank>10</rank>
</item>
<item id="purchase_date">
<rank>20</rank>
</item>
<item id="end_of_warranty">
<rank>30</rank>
</item>
</items>
</item>
<item id="fieldset:Server:otherinfo">
<rank>20</rank>
<items>
<item id="description">
<rank>10</rank>
</item>
</items>
</item>
</items>
</item>
<item id="contacts_list">
<rank>100</rank>
</item>
<item id="documents_list">
<rank>110</rank>
</item>
<item id="providercontracts_list">
<rank>120</rank>
</item>
<item id="services_list">
<rank>130</rank>
</item>
</items>
</details>
<default_search>
<items>
<item id="friendlyname">
<rank>10</rank>
</item>
<item id="location_id">
<rank>20</rank>
</item>
<item id="org_id">
<rank>30</rank>
</item>
</items>
</default_search>
<search>
<items>
<item id="name">
<rank>10</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="status">
<rank>30</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
<item id="location_id">
<rank>50</rank>
</item>
<item id="brand_id">
<rank>60</rank>
</item>
<item id="model_id">
<rank>70</rank>
</item>
<item id="serialnumber">
<rank>90</rank>
</item>
<item id="asset_number">
<rank>100</rank>
</item>
<item id="move2production">
<rank>110</rank>
</item>
<item id="purchase_date">
<rank>120</rank>
</item>
<item id="end_of_warranty">
<rank>130</rank>
</item>
</items>
</search>
<list>
<items>
<item id="org_id">
<rank>10</rank>
</item>
<item id="status">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>30</rank>
</item>
<item id="location_id">
<rank>40</rank>
</item>
<item id="brand_id">
<rank>50</rank>
</item>
<item id="model_id">
<rank>60</rank>
</item>
<item id="serialnumber">
<rank>70</rank>
</item>
</items>
</list>
</presentation>
</class>
<class id="Model">
<fields>
<field id="type" xsi:type="AttributeEnum">
Expand All @@ -983,6 +1176,7 @@
<value id="Keyboard" _delta="define">Keyboard</value>
<value id="Mouse" _delta="define">Mouse</value>
<value id="Headset" _delta="define">Headset</value>
<value id="BarcodeScanner" _delta="define">BarcodeScanner</value>
</values>
</field>
</fields>
Expand Down Expand Up @@ -1014,6 +1208,10 @@
<rank>50</rank>
<class>Headset</class>
</dashlet>
<dashlet id="peripheral.60" xsi:type="DashletBadge" _delta="define">
<rank>60</rank>
<class>BarcodeScanner</class>
</dashlet>
</dashlets>
</cell>
</cells>
Expand Down
8 changes: 8 additions & 0 deletions br-peripherals/de.dict.br-peripherals.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
*/

Dict::Add('DE DE', 'German', 'Deutsch', array(
'Class:DockingStation' => 'Docking Station',
'Class:DockingStation+' => 'Eine Docking Station',
'Class:Monitor' => 'Bildschirm',
'Class:Monitor+' => 'Ein Bildschirm',
'Class:Keyboard' => 'Tastatur',
Expand All @@ -17,7 +19,11 @@
'Class:Mouse+' => 'Eine Computermaus',
'Class:Headset' => 'Headset',
'Class:Headset+' => 'Ein Headset',
'Class:BarcodeScanner' => 'Barcode Scanner',
'Class:BarcodeScanner+' => 'Ein Barcode Scanner',
// Class:Model
'Class:Model/Attribute:type/Value:DockingStation' => 'Docking Station',
'Class:Model/Attribute:type/Value:DockingStation+' => 'Docking Station',
'Class:Model/Attribute:type/Value:Monitor' => 'Bildschirm',
'Class:Model/Attribute:type/Value:Monitor+' => 'Bildschirm',
'Class:Model/Attribute:type/Value:Keyboard' => 'Tastatur',
Expand All @@ -26,4 +32,6 @@
'Class:Model/Attribute:type/Value:Mouse+' => 'Maus',
'Class:Model/Attribute:type/Value:Headset' => 'Headset',
'Class:Model/Attribute:type/Value:Headset+' => 'Headset',
'Class:Model/Attribute:type/Value:BarcodeScanner' => 'Barcode Scanner',
'Class:Model/Attribute:type/Value:BarcodeScanner+' => 'Barcode Scanner',
));
8 changes: 8 additions & 0 deletions br-peripherals/en.dict.br-peripherals.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
*/

Dict::Add('EN US', 'English', 'English', array(
'Class:DockingStation' => 'Docking station',
'Class:DockingStation+' => 'A docking station',
'Class:Monitor' => 'Monitor',
'Class:Monitor+' => 'A display',
'Class:Keyboard' => 'Keyboard',
Expand All @@ -17,7 +19,11 @@
'Class:Mouse+' => 'A PC mouse',
'Class:Headset' => 'Headset',
'Class:Headset+' => 'A headset',
'Class:BarcodeScanner' => 'Barcode scanner',
'Class:BarcodeScanner+' => 'A barcode scanner',
// Class:Model
'Class:Model/Attribute:type/Value:DockingStation' => 'Docking station',
'Class:Model/Attribute:type/Value:DockingStation+' => 'Docking station',
'Class:Model/Attribute:type/Value:Monitor' => 'Monitor',
'Class:Model/Attribute:type/Value:Monitor+' => 'Monitor',
'Class:Model/Attribute:type/Value:Keyboard' => 'Keyboard',
Expand All @@ -26,4 +32,6 @@
'Class:Model/Attribute:type/Value:Mouse+' => 'Mouse',
'Class:Model/Attribute:type/Value:Headset' => 'Headset',
'Class:Model/Attribute:type/Value:Headset+' => 'Headset',
'Class:Model/Attribute:type/Value:BarcodeScanner' => 'Barcode scanner',
'Class:Model/Attribute:type/Value:BarcodeScanner+' => 'Barcode scanner',
));
Binary file added br-peripherals/images/barcode-scanner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added br-peripherals/images/barcode-scanner_256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion br-peripherals/module.br-peripherals.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'br-peripherals/0.3.0',
'br-peripherals/0.4.0',
array(
// Identification
//
Expand Down
2 changes: 1 addition & 1 deletion extension.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<![CDATA[Adds monitor, docking station, keyboard, mouse, headset]]>
</description>
<version>
<![CDATA[0.3.0]]>
<![CDATA[0.4.0]]>
</version>
<release_date>
<![CDATA[2024-08-16]]>
Expand Down

0 comments on commit 93e56d1

Please sign in to comment.