Commit 71863e7e authored by Sven Franck's avatar Sven Franck

added JSON for invoices, networks, services, computers, fix display bugs

parent 1ac6c45c
......@@ -49,7 +49,7 @@
"description": "The reference number for this computer.",
"description_i18n": "portal_type_dict.computer_dict.field_list.reference.description",
"alternate_name": "computer_reference",
"default_value": "COMP-1234",
"default_value": null,
"css_class": null,
"hidden": false,
"display_width": 30,
......@@ -94,7 +94,7 @@
"css_class": null,
"hidden": false,
"size": 1,
"items": null,
"items": "computer_getters_groups",
"select_first_item": true,
"extra_per_item": null,
"extra": null
......@@ -135,7 +135,7 @@
"css_class": null,
"hidden": false,
"size": 1,
"items": null,
"items": "computer_getters_cpu_core",
"select_first_item": true,
"extra_per_item": null,
"extra": null
......@@ -176,7 +176,7 @@
"css_class": null,
"hidden": false,
"size": 1,
"items": null,
"items": "computer_getters_cpu_frequency",
"select_first_item": true,
"extra_per_item": null,
"extra": null
......@@ -217,7 +217,7 @@
"css_class": null,
"hidden": false,
"size": 1,
"items": null,
"items": "computer_getters_cpu_type",
"select_first_item": true,
"extra_per_item": null,
"extra": null
......@@ -258,7 +258,7 @@
"css_class": null,
"hidden": false,
"size": 1,
"items": null,
"items": "computer_getters_memory_size",
"select_first_item": true,
"extra_per_item": null,
"extra": null
......@@ -299,7 +299,7 @@
"css_class": null,
"hidden": false,
"size": 1,
"items": null,
"items": "computer_getters_memory_type",
"select_first_item": true,
"extra_per_item": null,
"extra": null
......@@ -340,7 +340,7 @@
"css_class": null,
"hidden": false,
"size": 1,
"items": null,
"items": "computer_getters_region",
"select_first_item": true,
"extra_per_item": null,
"extra": null
......@@ -381,7 +381,7 @@
"css_class": null,
"hidden": false,
"size": 1,
"items": null,
"items": "computer_getters_storage_capacity",
"select_first_item": true,
"extra_per_item": null,
"extra": null
......@@ -422,7 +422,7 @@
"css_class": null,
"hidden": false,
"size": 1,
"items": null,
"items": "computer_getters_storage_interface",
"select_first_item": true,
"extra_per_item": null,
"extra": null
......@@ -463,7 +463,7 @@
"css_class": null,
"hidden": false,
"size": 1,
"items": null,
"items": "computer_getters_storage_redundancy",
"select_first_item": true,
"extra_per_item": null,
"extra": null
......@@ -504,7 +504,7 @@
"css_class": null,
"hidden": false,
"size": 1,
"items": null,
"items": "computer_getters_network",
"select_first_item": true,
"extra_per_item": null,
"extra": null
......@@ -545,7 +545,7 @@
"css_class": null,
"hidden": false,
"size": 1,
"items": null,
"items": "computer_getters_lan_type",
"select_first_item": true,
"extra_per_item": null,
"extra": null
......@@ -586,7 +586,7 @@
"css_class": null,
"hidden": false,
"size": 1,
"items": null,
"items": "computer_getters_storage_technology",
"select_first_item": true,
"extra_per_item": null,
"extra": null
......@@ -826,5 +826,87 @@
"i18n": "validation_dict.too_much_input"
}
}
},
"computer_reference_portal_type": {
"type":"StringField",
"widget": {
"id": "computer_reference_portal_type",
"title": "Reference Portal Type",
"title_i18n": "portal_type_dict.computer_dict.field_list.reference_portal_type.title",
"description": "The portal type this release is associated to.",
"description_i18n": "portal_type_dict.computer_dict.field_list.reference_portal_type.description",
"alternate_name": "computer_reference_portal_type",
"default_value": null,
"css_class": "",
"hidden": null,
"display_width": null,
"maximum_input": null,
"extra": null
},
"properties": {
"enabled": true,
"editable": true,
"external_validator": null,
"required": true,
"preserve_whitespace": null,
"unicode": null,
"maximum_length": 70,
"truncate": null
},
"message": {
"external_validator_failed": {
"message": "The input failed the external validator.",
"i18n": "validation_dict.external"
},
"required_not_found": {
"message": "Input required but not found.",
"i18n": "validation_dict.required"
},
"too_long": {
"message": "Too much input given.",
"i18n": "validation_dict.too_much_input"
}
}
},
"computer_reference_id": {
"type":"StringField",
"widget": {
"id": "computer_reference_id",
"title": "Reference ID",
"title_i18n": "portal_type_dict.computer_dict.field_list.reference_id.title",
"description": "The id of the referenced portal_type this release is associated to.",
"description_i18n": "portal_type_dict.computer_dict.field_list.reference_id.description",
"alternate_name": "computer_reference_id",
"default_value": null,
"css_class": "",
"hidden": null,
"display_width": null,
"maximum_input": null,
"extra": null
},
"properties": {
"enabled": true,
"editable": true,
"external_validator": null,
"required": true,
"preserve_whitespace": null,
"unicode": null,
"maximum_length": 70,
"truncate": null
},
"message": {
"external_validator_failed": {
"message": "The input failed the external validator.",
"i18n": "validation_dict.external"
},
"required_not_found": {
"message": "Input required but not found.",
"i18n": "validation_dict.required"
},
"too_long": {
"message": "Too much input given.",
"i18n": "validation_dict.too_much_input"
}
}
}
}
\ No newline at end of file
[
{"text": "", "text_i18n":null, "class":"translate", "value":""}
]
\ No newline at end of file
[
{"text": "", "text_i18n":null, "class":"translate", "value":""},
{"text": "1000 MHz", "text_i18n":null, "class":"translate", "value":"1000"},
{"text": "1100 MHz", "text_i18n":null, "class":"translate", "value":"1100"},
{"text": "1200 MHz", "text_i18n":null, "class":"translate", "value":"1200"},
{"text": "1300 MHz", "text_i18n":null, "class":"translate", "value":"1300"},
{"text": "1400 MHz", "text_i18n":null, "class":"translate", "value":"1400"},
{"text": "1500 MHz", "text_i18n":null, "class":"translate", "value":"1500"},
{"text": "1600 MHz", "text_i18n":null, "class":"translate", "value":"1600"},
{"text": "1700 MHz", "text_i18n":null, "class":"translate", "value":"1700"},
{"text": "1800 MHz", "text_i18n":null, "class":"translate", "value":"1800"},
{"text": "1900 MHz", "text_i18n":null, "class":"translate", "value":"1900"},
{"text": "2000 MHz", "text_i18n":null, "class":"translate", "value":"2000"},
{"text": "2100 MHz", "text_i18n":null, "class":"translate", "value":"2100"},
{"text": "2200 MHz", "text_i18n":null, "class":"translate", "value":"2200"},
{"text": "2300 MHz", "text_i18n":null, "class":"translate", "value":"2300"},
{"text": "2400 MHz", "text_i18n":null, "class":"translate", "value":"2400"},
{"text": "2500 MHz", "text_i18n":null, "class":"translate", "value":"2500"},
{"text": "2600 MHz", "text_i18n":null, "class":"translate", "value":"2600"},
{"text": "2700 MHz", "text_i18n":null, "class":"translate", "value":"2700"},
{"text": "2800 MHz", "text_i18n":null, "class":"translate", "value":"2800"},
{"text": "2900 MHz", "text_i18n":null, "class":"translate", "value":"2900"},
{"text": "3000 MHz", "text_i18n":null, "class":"translate", "value":"3000"},
{"text": "3100 MHz", "text_i18n":null, "class":"translate", "value":"3100"},
{"text": "3200 MHz", "text_i18n":null, "class":"translate", "value":"3200"},
{"text": "3300 MHz", "text_i18n":null, "class":"translate", "value":"3300"},
{"text": "3400 MHz", "text_i18n":null, "class":"translate", "value":"3400"},
{"text": "600 MHz", "text_i18n":null, "class":"translate", "value":"600"},
{"text": "700 MHz", "text_i18n":null, "class":"translate", "value":"700"},
{"text": "800 MHz", "text_i18n":null, "class":"translate", "value":"800"},
{"text": "900 MHz", "text_i18n":null, "class":"translate", "value":"900"}
]
\ No newline at end of file
[
{"text": "", "text_i18n": null, "class":"translate", "value":""},
{"text": "ARM", "text_i18n": null, "class":"translate", "value":"arm"},
{"text": "ARM/ARM11", "text_i18n": null, "class":"translate", "value":"arm/arm11"},
{"text": "ARM/ARM7", "text_i18n": null, "class":"translate", "value":"arm/arm7"},
{"text": "ARM/ARM9", "text_i18n": null, "class":"translate", "value":"arm/arm9"},
{"text": "Intel x86", "text_i18n": null, "class":"translate", "value":"x86"},
{"text": "Intel x86/Intel x86 32 bit", "text_i18n": null, "class":"translate", "value":"x86/x86_32"},
{"text": "Intel x86/Intel x86 32 bit/Intel 486", "text_i18n": null, "class":"translate", "value":"x86/x86_32/i486"},
{"text": "Intel x86/Intel x86 32 bit/Intel Core", "text_i18n": null, "class":"translate", "value":"x86/x86_32/core"},
{"text": "Intel x86/Intel x86 32 bit/Intel Pentium", "text_i18n": null, "class":"translate", "value":"x86/x86_32/i586"},
{"text": "Intel x86/Intel x86 32 bit/Intel Pentium Pro", "text_i18n": null, "class":"translate", "value":"x86/x86_32/i686"},
{"text": "Intel x86/Intel x86 64 bit", "text_i18n": null, "class":"translate", "value":"x86/x86_64"},
{"text": "Intel x86/Intel x86 64 bit/Intel Nehalem Architecture", "text_i18n": null, "class":"translate", "value":"x86/x86_64/nehalem"},
{"text": "Intel x86/Intel x86 64 bit/Intel Sandy Bridge Architecture", "text_i18n": null, "class":"translate", "value":"x86/x86_64/sandybridge"}
]
\ No newline at end of file
[
{"text": "", "text_i18n":null, "value":""},
{"text": "Amazon.Group", "text_i18n":null, "value": "amazon"},
{"text": "Atlantic.net Group", "text_i18n":null, "value":"atlanticnet"},
{"text": "Bull Group", "text_i18n":null, "value":"bull"},
{"text": "Slapos Company", "text_i18n":null, "value":"company"},
{"text": "Gandi Group", "text_i18n":null, "value":"gandi"},
{"text": "IBM Group", "text_i18n":null, "value":"ibm"},
{"text": "Joyent Group", "text_i18n":null, "value":"joyent"},
{"text": "OVH Group", "text_i18n":null, "value":"ovh"},
{"text": "Microsoft Group", "text_i18n":null, "value":"microsoft"},
{"text": "Rackspace Group", "text_i18n":null, "value":"rackspace"},
{"text": "VIFIB Group", "text_i18n":null, "value":"vifib"},
{"text": "wmWare Group", "text_i18n":null, "value":"vmware"}
]
\ No newline at end of file
[
{"text": "", "text_i18n":null, "class":"translate", "value":""},
{"text": "Ethernet", "text_i18n":null, "class":"translate", "value":"ethernet"},
{"text": "Ethernet/1 Gbps Ethernet", "text_i18n":null, "class":"translate", "value":"ethernet/1g"},
{"text": "Ethernet/10 Gbps Ethernet", "text_i18n":null, "class":"translate", "value":"ethernet/10g"},
{"text": "Ethernet/10 Mbps Ethernet", "text_i18n":null, "class":"translate", "value":"ethernet/10m"},
{"text": "Ethernet/100 Gbps Ethernet", "text_i18n":null, "class":"translate", "value":"ethernet/100g"},
{"text": "Ethernet/100 Mbps Ethernet", "text_i18n":null, "class":"translate", "value":"ethernet/100m"},
{"text": "Ethernet/40 Gbps Ethernet", "text_i18n":null, "class":"translate", "value":"ethernet/40g"},
{"text": "Infiniband", "text_i18n":null, "class":"translate", "value":"infiniband"},
{"text": "Wifi 802.11", "text_i18n":null, "class":"translate", "value":"wifi"},
{"text": "Wifi 802.11/801.11b Wifi", "text_i18n":null, "class":"translate", "value":"wifi/b"},
{"text": "Wifi 802.11/802.11g Wifi", "text_i18n":null, "class":"translate", "value":"wifi/g"},
{"text": "Wifi 802.11/802.11n Wifi", "text_i18n":null, "class":"translate", "value":"wifi/n"}
]
\ No newline at end of file
[
{"text": "", "text_i18n":null, "class":"translate", "value":""},
{"text": "1 GB RAM", "text_i18n":null, "class":"translate", "value":"1"},
{"text": "12 GB RAM", "text_i18n":null, "class":"translate", "value":"12"},
{"text": "128 GB RAM", "text_i18n":null, "class":"translate", "value":"128"},
{"text": "16 GB RAM", "text_i18n":null, "class":"translate", "value":"16"},
{"text": "196 GB RAM", "text_i18n":null, "class":"translate", "value":"196"},
{"text": "2 GB RAM", "text_i18n":null, "class":"translate", "value":"2"},
{"text": "24 GB RAM", "text_i18n":null, "class":"translate", "value":"24"},
{"text": "256 GB RAM", "text_i18n":null, "class":"translate", "value":"256"},
{"text": "32 GB RAM", "text_i18n":null, "class":"translate", "value":"32"},
{"text": "4 GB RAM", "text_i18n":null, "class":"translate", "value":"4"},
{"text": "48 GB RAM", "text_i18n":null, "class":"translate", "value":"48"},
{"text": "64 GB RAM", "text_i18n":null, "class":"translate", "value":"64"},
{"text": "8 GB RAM", "text_i18n":null, "class":"translate", "value":"8"},
{"text": "96 GB RAM", "text_i18n":null, "class":"translate", "value":"96"}
]
\ No newline at end of file
[
{"text": "", "text_i18n": null, "class":"translate", "value":""},
{"text": "DDR2 Memory", "text_i18n": null, "class":"translate", "value":"ddr2"},
{"text": "DDR2 Memory/1066 Mhz", "text_i18n": null, "class":"translate", "value":"ddr2/1066"},
{"text": "DDR2 Memory/400 Mhz", "text_i18n": null, "class":"translate", "value":"ddr2/400"},
{"text": "DDR2 Memory/533 Mhz", "text_i18n": null, "class":"translate", "value":"ddr2/533"},
{"text": "DDR2 Memory/667 Mhz", "text_i18n": null, "class":"translate", "value":"ddr2/667"},
{"text": "DDR2 Memory/800 Mhz", "text_i18n": null, "class":"translate", "value":"ddr2/800"},
{"text": "DDR3 Memory", "text_i18n": null, "class":"translate", "value":"ddr3"},
{"text": "DDR3 Memory/1066 Mhz", "text_i18n": null, "class":"translate", "value":"ddr3/1066"},
{"text": "DDR3 Memory/1333 Mhz", "text_i18n": null, "class":"translate", "value":"ddr3/1333"},
{"text": "DDR3 Memory/1600 Mhz", "text_i18n": null, "class":"translate", "value":"ddr3/1600"},
{"text": "DDR3 Memory/1866 Mhz", "text_i18n": null, "class":"translate", "value":"ddr3/1866"},
{"text": "DDR3 Memory/2133 Mhz", "text_i18n": null, "class":"translate", "value":"ddr3/2133"},
{"text": "DDR3 Memory/800 Mhz", "text_i18n": null, "class":"translate", "value":"ddr3/800"}
]
\ No newline at end of file
[
{"text": "", "text_i18n":null, "class":"translate", "value":""}
]
\ No newline at end of file
This diff is collapsed.
[
{"text": "", "text_i18n":null, "class":"translate", "value":""},
{"text": "Finite Storage Capacity", "text_i18n":null, "class":"translate", "value":"finite"},
{"text": "Finite Storage Capacity/1 TB Storage Capacity", "text_i18n":null, "class":"translate", "value":"finite/1000"},
{"text": "Finite Storage Capacity/1.5 TB Storage Capacity", "text_i18n":null, "class":"translate", "value":"finite/1500"},
{"text": "Finite Storage Capacity/10 GB Storage Capacity", "text_i18n":null, "class":"translate", "value":"finite/10"},
{"text": "Finite Storage Capacity/100 GB Storage Capacity", "text_i18n":null, "class":"translate", "value":"finite/100"},
{"text": "Finite Storage Capacity/128 GB Storage Capacity", "text_i18n":null, "class":"translate", "value":"finite/128"},
{"text": "Finite Storage Capacity/16 GB Storage Capacity", "text_i18n":null, "class":"translate", "value":"finite/16"},
{"text": "Finite Storage Capacity/160 GB Storage Capacity", "text_i18n":null, "class":"translate", "value":"finite/160"},
{"text": "Finite Storage Capacity/2 TB Storage Capacity", "text_i18n":null, "class":"translate", "value":"finite/2000"},
{"text": "Finite Storage Capacity/20 GB Storage Capacity", "text_i18n":null, "class":"translate", "value":"finite/20"},
{"text": "Finite Storage Capacity/200 GB Storage Capacity", "text_i18n":null, "class":"translate", "value":"finite/200"},
{"text": "Finite Storage Capacity/300 GB Storage Capacity", "text_i18n":null, "class":"translate", "value":"finite/300"},
{"text": "Finite Storage Capacity/32 GB Storage Capacity", "text_i18n":null, "class":"translate", "value":"finite/32"},
{"text": "Finite Storage Capacity/320 GB Storage Capacity", "text_i18n":null, "class":"translate", "value":"finite/320"},
{"text": "Finite Storage Capacity/4 TB Storage Capacity", "text_i18n":null, "class":"translate", "value":"finite/4000"},
{"text": "Finite Storage Capacity/40 GB Storage Capacity", "text_i18n":null, "class":"translate", "value":"finite/40"},
{"text": "Finite Storage Capacity/500 GB Storage Capacity", "text_i18n":null, "class":"translate", "value":"finite/500"},
{"text": "Finite Storage Capacity/64 GB Storage Capacity", "text_i18n":null, "class":"translate", "value":"finite/64"},
{"text": "Finite Storage Capacity/750 GB Storage Capacity", "text_i18n":null, "class":"translate", "value":"finite/750"},
{"text": "Finite Storage Capacity/80 GB Storage Capacity", "text_i18n":null, "class":"translate", "value":"finite/80"},
{"text": "Finite Storage Capacity/8GB Storage Capacity", "text_i18n":null, "class":"translate", "value":"finite/8"},
{"text": "Infinite Storage Capacity", "text_i18n":null, "class":"translate", "value":"infinite"}
]
\ No newline at end of file
[
{"text": "", "text_i18n":null, "class":"translate", "value":""},
{"text": "Network Attached Storage", "text_i18n":null, "class":"translate", "value":"nas"},
{"text": "Serial Advanced Technology Attachment", "text_i18n":null, "class":"translate", "value":"sata"},
{"text": "Serial Attached SCSI", "text_i18n":null, "class":"translate", "value":"sas"},
{"text": "Storage Area Network", "text_i18n":null, "class":"translate", "value":"san"},
{"text": "Universal Serial Bus", "text_i18n":null, "class":"translate", "value":"usb"},
{"text": "Universal Serial Bus/USB2", "text_i18n":null, "class":"translate", "value":"usb/usb2"},
{"text": "Universal Serial Bus/USB3", "text_i18n":null, "class":"translate", "value":"usb/usb3"}
]
\ No newline at end of file
[
{"text": "", "text_i18n":null, "class":"translate", "value":""},
{"text": "Distributed Hash Table", "text_i18n":null, "class":"translate", "value":"dht"},
{"text": "Redundant Array of Independent Disks", "text_i18n":null, "class":"translate", "value":"raid"},
{"text": "Redundant Array of Independent Disks/Redundant Array of Independent Disks Level 0", "text_i18n":null, "class":"translate", "value":"raid/level0"},
{"text": "Redundant Array of Independent Disks/Redundant Array of Independent Disks Level 0 + Level 1", "text_i18n":null, "class":"translate", "value":"raid/nested01"},
{"text": "Redundant Array of Independent Disks/Redundant Array of Independent Disks Level 1", "text_i18n":null, "class":"translate", "value":"raid/level1"},
{"text": "Redundant Array of Independent Disks/Redundant Array of Independent Disks Level 1 + Level 0", "text_i18n":null, "class":"translate", "value":"raid/nested10"},
{"text": "Redundant Array of Independent Disks/Redundant Array of Independent Disks Level 2", "text_i18n":null, "class":"translate", "value":"raid/level2"},
{"text": "Redundant Array of Independent Disks/Redundant Array of Independent Disks Level 3", "text_i18n":null, "class":"translate", "value":"raid/level3"},
{"text": "Redundant Array of Independent Disks/Redundant Array of Independent Disks Level 4", "text_i18n":null, "class":"translate", "value":"raid/level4"},
{"text": "Redundant Array of Independent Disks/Redundant Array of Independent Disks Level 5", "text_i18n":null, "class":"translate", "value":"raid/level5"},
{"text": "Redundant Array of Independent Disks/Redundant Array of Independent Disks Level 5 + Level 0", "text_i18n":null, "class":"translate", "value":"raid/nested50"},
{"text": "Redundant Array of Independent Disks/Redundant Array of Independent Disks Level 6", "text_i18n":null, "class":"translate", "value":"raid/level6"}
]
\ No newline at end of file
[
{"text": "", "text_i18n":null, "class":"translate", "value":""},
{"text": "Disk Storage", "text_i18n":null, "class":"translate", "value":"disk"},
{"text": "Disk Storage/10,000 rpm", "text_i18n":null, "class":"translate", "value":"disk/10000"},
{"text": "Disk Storage/15,000 rpm", "text_i18n":null, "class":"translate", "value":"disk/15000"},
{"text": "Disk Storage/5,400 rpm", "text_i18n":null, "class":"translate", "value":"disk/5400"},
{"text": "Disk Storage/7,200 rpm", "text_i18n":null, "class":"translate", "value":"disk/7200"},
{"text": "ram", "text_i18n":null, "class":"translate", "value":"ram"},
{"text": "ssd", "text_i18n":null, "class":"translate", "value":"ssd"}
]
\ No newline at end of file
......@@ -6,7 +6,7 @@
"form": true,
"id": "computer_overview",
"property_dict": {
"initial_query_url_identifier": "computer_reference",
"initial_query_url_identifier": "_id",
"dynamic_children": [1],
"requires_authentication": true,
"depends_on": "login_state",
......@@ -29,7 +29,7 @@
},
"feature_dict": {
"linkable": true,
"link_identifier": null,
"link_identifier": "id",
"editable": null
}
},
......
[]
\ No newline at end of file
[
{
"computer_title":"Cortana",
"computer_reference":"",
"computer_group":"amazon",
"computer_cpu_core":"",
"computer_cpu_frequency":"1000",
"computer_cpu_type":"x86/x86_32/i486",
"computer_memory_size":"1",
"computer_memory_type":"ddr3/800",
"computer_region":"america/north/usa",
"computer_storage_capacity":"finite/750",
"computer_storage_interface":"sata",
"computer_storage_redundancy":"raid/level2",
"computer_wide_area_network_type":"",
"computer_local_area_network_type":"ethernet/100m",
"computer_storage_technology":"disk/10000",
"computer_description":"",
"computer_translated_validation_state_title":"",
"computer_default_network_address_netmask":"",
"computer_default_network_address_ip_address":"",
"computer_default_network_address_host_name":"",
"computer_reference_portal_type":"",
"computer_reference_id":""
},
{
"computer_title":"HAL",
"computer_reference":"",
"computer_group":"atlanticnet",
"computer_cpu_core":"",
"computer_cpu_frequency":"3400",
"computer_cpu_type":"x86/x86_32/i486",
"computer_memory_size":"256",
"computer_memory_type":"ddr3/800",
"computer_region":"america/north/usa",
"computer_storage_capacity":"finite/320",
"computer_storage_interface":"sata",
"computer_storage_redundancy":"raid/level2",
"computer_wide_area_network_type":"",
"computer_local_area_network_type":"ethernet/100m",
"computer_storage_technology":"disk/10000",
"computer_description":"",
"computer_translated_validation_state_title":"",
"computer_default_network_address_netmask":"",
"computer_default_network_address_ip_address":"",
"computer_default_network_address_host_name":"",
"computer_reference_portal_type":"",
"computer_reference_id":""
},
{
"computer_title":"Computer",
"computer_reference":"",
"computer_group":"bull",
"computer_cpu_core":"",
"computer_cpu_frequency":"2500",
"computer_cpu_type":"x86/x86_32/i486",
"computer_memory_size":"96",
"computer_memory_type":"ddr3/1066",
"computer_region":"america/north/usa",
"computer_storage_capacity":"finite/4000",
"computer_storage_interface":"sata",
"computer_storage_redundancy":"raid/level2",
"computer_wide_area_network_type":"",
"computer_local_area_network_type":"wifi/b",
"computer_storage_technology":"disk/10000",
"computer_description":"",
"computer_translated_validation_state_title":"",
"computer_default_network_address_netmask":"",
"computer_default_network_address_ip_address":"",
"computer_default_network_address_host_name":"",
"computer_reference_portal_type":"",
"computer_reference_id":""
},
{
"computer_title":"Prof. Simon Wright",
"computer_reference":"",
"computer_group":"ovh",
"computer_cpu_core":"",
"computer_cpu_frequency":"1200",
"computer_cpu_type":"x86",
"computer_memory_size":"96",
"computer_memory_type":"ddr3/1066",
"computer_region":"america/north/usa",
"computer_storage_capacity":"finite/80",
"computer_storage_interface":"sata",
"computer_storage_redundancy":"raid/level2",
"computer_wide_area_network_type":"",
"computer_local_area_network_type":"wifi/b",
"computer_storage_technology":"disk/10000",
"computer_description":"",
"computer_translated_validation_state_title":"",
"computer_default_network_address_netmask":"",
"computer_default_network_address_ip_address":"",
"computer_default_network_address_host_name":"",
"computer_reference_portal_type":"",
"computer_reference_id":""
},
{
"computer_title":"Lawnmower",
"computer_reference":"",
"computer_group":"rackspace",
"computer_cpu_core":"",
"computer_cpu_frequency":"3400",
"computer_cpu_type":"x86",
"computer_memory_size":"96",
"computer_memory_type":"ddr3/1066",
"computer_region":"america/north/usa",
"computer_storage_capacity":"finite/750",
"computer_storage_interface":"sata",
"computer_storage_redundancy":"raid/level2",
"computer_wide_area_network_type":"",
"computer_local_area_network_type":"ethernet/100m",
"computer_storage_technology":"disk/10000",
"computer_description":"",
"computer_translated_validation_state_title":"",
"computer_default_network_address_netmask":"",
"computer_default_network_address_ip_address":"",
"computer_default_network_address_host_name":"",
"computer_reference_portal_type":"",
"computer_reference_id":""
}
]
\ No newline at end of file
......@@ -11,24 +11,6 @@
"data": "data/",
"home": "#dashboard"
},
"login_dict": {
"application_dict": {},
"third_party": {
"provider": "hellojs",
"initializer_dict": {
"google" : "1028374738607-pg2qqcopjpoc09shlpul3mehu2dv76ln.apps.googleusercontent.com"
},
"verification_dict": {
"google": "https://www.googleapis.com/oauth2/v1/tokeninfo?access_token="
},
"signout_dict": {
"google": "https://accounts.google.com/Logout?continue=REDIRECT_URL",
"facebook": "https://www.facebook.com/logout.php?next=REDIRECT_URL&access_token=ACCESS_TOKEN"
},
"modernizr": ["localStorage"],
"redirect": {"redirect_uri":"http://localhost/sven/slapos-ui/index.html"}
}
},
"i18n": "i18next",
"i18n_force_browser_language": false,
"i18n_dict": {
......@@ -66,7 +48,7 @@
{"type": "item", "href": "#person", "left": {"icon":"user"}, "center": {"text": [{"type": "h1", "text": "Account Info", "text_i18n": "page_dict.person.title"}, {"type": "p", "text": "Registration/Invoicing Info", "text_i18n": "page_dict.person.subtitle"}]}},
{"type": "item", "href": "#invoices", "left": {"icon":"file-text-alt"}, "center": {"text": [{"type":"h1", "text": "Invoices", "text_i18n": "page_dict.invoices.title"}, {"type": "p", "text": "Overview of Invoices", "text_i18n":"page_dict.invoices.subtitle"}]}},
{"type": "item", "href": "#servers", "left": {"icon":"hdd"}, "center": {"text": [{"type":"h1", "text": "Servers", "text_i18n": "page_dict.servers.title"}, {"type":"p", "text": "Server instances being used", "text_i18n": "page_dict.servers.subtitle"}]}},
{"type": "item", "href": "#services", "left": {"icon":"cogs"}, "center": {"text": [{"type": "h1","text": "Subscriptions", "text_i18n":"page_dict.services.title"},{"type": "p", "text": "Administration of Installed Software", "text_i18n":"page_dict.services.subtitle"}]}},
{"type": "item", "href": "#services", "left": {"icon":"cogs"}, "center": {"text": [{"type": "h1","text": "Services", "text_i18n":"page_dict.services.title"},{"type": "p", "text": "Administration of Installed Software", "text_i18n":"page_dict.services.subtitle"}]}},
{"type": "item", "href": "#networks", "left": {"icon":"sitemap"}, "center": {"text":[{"type": "h1", "text": "Networks", "text_i18n": "page_dict.networks.title"},{"type": "p", "text":"Network Administration", "text_i18n":"page_dict.networks.subtitle"}]}},
{"type": "divider", "center": {"text": [{"type": "h1", "text": "Performance", "text_i18n":null}]}},
{"type": "item", "href": "#monitoring", "left": {"icon":"bar-chart"}, "center": {"text":[{"type":"h1", "text": "Monitoring", "text_i18n":"page_dict.monitoring.title"},{"type":"p", "text": "Server Status Reports", "text_i18n": "page_dict.monitoring.subtitle"}]}},
......@@ -121,8 +103,7 @@
"direction": "horizontal"
},
"children": [
{"type":"a", "direct": {"href": "#global-panel", "className":"responsive translate"}, "attributes": {"data-rel":"panel", "data-icon":"reorder", "data-i18n":"global_dict.common_dict.menu"},"logic": {"text":"Menu"}},
{"type":"a", "direct": {"href": "#global-popup", "className":"responsive action"}, "attributes": {"data-depend":"login_state", "data-rel":"popup", "data-action":"login", "data-icon":"user", "data-i18n":"global_dict.common_dict.login"}, "logic": {"text":"Login"}}
{"type":"a", "direct": {"href": "#global-panel", "className":"responsive translate"}, "attributes": {"data-rel":"panel", "data-icon":"reorder", "data-i18n":"global_dict.common_dict.menu"},"logic": {"text":"Menu"}}
]
},{
"generate": "widget",
......
......@@ -289,5 +289,47 @@
"i18n": "validation_dict.too_much_input"
}
}
},
"installation_timestamp": {
"type":"DateTimeField",
"widget": {
"id": "installation_timestamp",
"title": "ID",
"title_i18n": "portal_type_dict.installation_dict.field_list.timestamp.title",
"description": "The timestamp this installation was made.",
"description_i18n": "portal_type_dict.installation_dict.field_list.timestamp.description",
"alternate_name": "installation_timestamp",
"default_value": null,
"css_class": null,
"hidden": null,
"display_width": null,
"maximum_input": null,
"extra": null
},
"properties": {
"enabled": true,
"editable": true,
"external_validator": null,
"required": true,
"preserve_whitespace": null,
"unicode": null,
"maximum_length": null,
"truncate": null
},
"message": {
"external_validator_failed": {
"message": "The input failed the external validator.",
"i18n": "validation_dict.external"
},
"required_not_found": {
"message": "Input required but not found.",
"i18n": "validation_dict.required"
},
"too_long": {
"message": "Too much input give.",
"i18n": "validation_dict.too_much_input"
}
}
}
}
\ No newline at end of file
{
"portal_type_source": "Installation",
"portal_type_title": "installation",
"portal_type_fields": "installation_fieldlist",
"initial_query": {"include_docs": true, "limit":[0,16]},
"form": true,
"id": "installation_overview",
"property_dict": {
"initial_query_url_identifier": "installation_reference_computer",
"dynamic_children": [1],
"wrap_gadget": 2,
"layout": {
"header": [
[
{"custom": true, "text": "Image", "text_i18n": "portal_type_dict.installation_dict.field_list.image_url.title", "show": true, "priority": 4},
{"column": "installation_title", "show": true, "priority": 1},
{"column": "installation_version", "show": true, "priority": 1},
{"column": "installation_usage", "show": true, "priority": 5}
]
],
"body": [
{"column": "installation_image_url", "show": true, "priority": 4, "image": true},
{"column": "installation_title", "show": true, "priority": 1},
{"column": "installation_version", "show": true, "priority": 1},
{"column": "installation_usage", "show": true, "priority": 5}
],
"footer": []
},
"feature_dict": {
"linkable": true,
"link_identifier": null
}
},
"children": [{
"type": "a",
"direct": {"className":"translate ui-btn ui-icon-edit ui-btn-icon-left ui-corner-all ui-btn-inline ui-btn-slapos-black ui-link", "href": "#services::new"},
"attributes": {
"data-i18n": "page_dict.services.add",
"data-icon": "edit"
},
"logic": {"text":"Install new software"}
},{
"generate": "widget",
"type": "table",
"class_list": "table-stroke ui-responsive",
"property_dict": {
"mode": "columntoggle",
"toggle_popup": false,
"wrap": "both",
"top_grid": 1,
"bottom_grid": 1
},
"children": []
}]
}
[
{
"installation_version":"slapos-0.92",
"installation_title": "[EXPERIMENTAL] KVM",
"installation_image_type": "image",
"installation_image_url":"https://www.slapos.org/software_product_module/2/default_image?quality=75&display=thumbnail",
"installation_status": "",
"installation_usage": "",
"installation_id": "",
"installation_timestamp": "2013/12/24",
"installation_reference_release": "2845497",
"installation_reference_computer": ""
},
{
"installation_version":"[EXPERIMENTAL] SlapOS Web Runner",
"installation_title": "SlapOS Web Runner (Master Development)",
"installation_image_type": "image",
"installation_image_url":"https://www.slapos.org/software_product_module/20110316-88D7/default_image?quality=75&display=thumbnail",
"installation_status": "",
"installation_usage": "",
"installation_id": "",
"installation_timestamp": "2013/12/23",
"installation_reference_release": "1657159",
"installation_reference_computer": ""
},
{
"installation_version":"slapos-0.141",
"installation_title": "Kumofs Branch Development",
"installation_image_type": "image",
"installation_image_url":"https://www.slapos.org/software_product_module/20110615-176F8/default_image?quality=75&display=thumbnail",
"installation_status": "",
"installation_usage": "",
"installation_id": "",
"installation_timestamp": "2013/12/22",
"installation_reference_release": "8516098",
"installation_reference_computer": ""
},
{
"installation_version":"slapos-0.96",
"installation_title": "Zabbix Agent",
"installation_image_type": "image",
"installation_image_url":"https://www.slapos.org/software_product_module/20110613-107B5/default_image?quality=75&display=thumbnail",
"installation_status": "",
"installation_usage": "",
"installation_id": "",
"installation_timestamp": "2013/12/22",
"installation_reference_release": "3105599",
"installation_reference_computer": ""
}
]
\ No newline at end of file
......@@ -137,9 +137,9 @@
"widget": {
"id": "invoice_translated_simulation_state_title",
"title": "Status",
"title_i18n": "portal_type_dict.release_dict.field_list.status.title",
"title_i18n": "portal_type_dict.invoice_dict.field_list.status.title",
"description": "The status of the invoice.",
"description_i18n": "portal_type_dict.release_dict.field_list.status.description",
"description_i18n": "portal_type_dict.invoice_dict.field_list.status.description",
"alternate_name": "invoice_translated_simulation_state_title",
"default": null,
"css_class": null,
......@@ -178,9 +178,9 @@
"widget": {
"id": "invoice_reference_portal_type",
"title": "Reference Portal Type",
"title_i18n": "portal_type_dict.release_dict.field_list.reference_portal_type.title",
"title_i18n": "portal_type_dict.invoice_dict.field_list.reference_portal_type.title",
"description": "The portal type this invoice is associated to.",
"description_i18n": "portal_type_dict.release_dict.field_list.reference_portal_type.description",
"description_i18n": "portal_type_dict.invoice_dict.field_list.reference_portal_type.description",
"alternate_name": "invoice_reference_portal_type",
"default": null,
"css_class": null,
......@@ -219,9 +219,9 @@
"widget": {
"id": "invoice_reference_portal_type",
"title": "Reference ID",
"title_i18n": "portal_type_dict.release_dict.field_list.reference_id.title",
"title_i18n": "portal_type_dict.invoice_dict.field_list.reference_id.title",
"description": "The id of the portal_type this invoice is associated to.",
"description_i18n": "portal_type_dict.release_dict.field_list.reference_id.description",
"description_i18n": "portal_type_dict.invoice_dict.field_list.reference_id.description",
"alternate_name": "invoice_reference_portal_type",
"default": null,
"css_class": null,
......@@ -260,9 +260,9 @@
"widget": {
"id": "invoice_id",
"title": "Reference ID",
"title_i18n": "portal_type_dict.release_dict.field_list.id.title",
"title_i18n": "portal_type_dict.invoice_dict.field_list.id.title",
"description": "The id of the portal_type this invoice is associated to.",
"description_i18n": "portal_type_dict.release_dict.field_list.id.description",
"description_i18n": "portal_type_dict.invoice_dict.field_list.id.description",
"alternate_name": "invoice_id",
"default": null,
"css_class": null,
......
......@@ -6,13 +6,12 @@
"form": true,
"id": "invoice_overview",
"property_dict": {
"dynamic_children": [5],
"dynamic_children": [1],
"requires_authentication": true,
"wrap_gadget": 2,
"layout": {
"header": [
[
{"column": "invoice_id", "show": false, "priority": 5},
{"column": "invoice_date", "show": true, "priority": 1, "sort":true},
{"column": "invoice_total_price", "show": true, "persist": true, "sort":false},
{"column": "invoice_price_currency", "show": "true", "priority": 4, "merge": "invoice_total_price", "merger_text": "Total Price", "merger_i18n": "portal_type_dict.invoice_dict.fieldlist.total_price.title"},
......@@ -21,32 +20,29 @@
]
],
"body": [
{"column": "invoice_id", "show": false, "priority": 5},
{"column": "invoice_date", "show": true, "priority": 1, "sort":true},
{"column": "invoice_total_price", "show": true, "persist": true, "sort":false},
{"column": "invoice_price_currency", "show": "true", "priority": 4, "merge": "invoice_total_price", "merger_text": "Total Price", "merger_i18n": "portal_type_dict.invoice_dict.fieldlist.total_price.title"},
{"column": "invoice_price_currency", "show": "true", "priority": 4, "merge": "invoice_total_price"},
{"column": "invoice_translated_simulation_state_title", "show":"true", "priority": 5},
{"custom": true, "text": "Download", "text_i18n": "global_dict.export_dict.download", "show": true, "priority": 6, "sort": false}
{"custom": true, "show": true, "persist": true, "action_list": [{"action": "download", "icon":"file-alt", "text": "Download", "text_i18n":"page_dict.invoices.download"}], "sort": false}
]
},
"feature_dict": {
"check": true,
"global_check": true,
"sortable": true,
"mergeable": true,
"linkable": true,
"link_identifier": null,
"action_menu": true
}
},
"children": [{
"generate": "widget",
"type": "controlbar",
"class_list": "responsive",
"children": [
{"type": "input", "direct": {"id":"search_release_list", "className": "translate"}, "attributes": {"data-action":"search", "data-enhanced":"true", "data-i18n": "[placeholder]page_dict.release.search","placeholder":"Search available releases", "data-icon":"search", "data-action-btn":"true", "data-type":"search", "type":"search"}, "logic":{"clear":"true", "action":"search"}},
{"type": "div", "direct": {"className":"info"}, "attributes": {"data-info":"records"}},
{"type": "div", "direct": {"className":"info"}, "attributes": {"data-info":"filter"}},
{"type": "div", "direct": {"className":"info"}, "attributes": {"data-info":"sorted"}}
]
"type": "a",
"direct": {"className":"translate ui-btn ui-icon-edit ui-btn-icon-left ui-corner-all ui-btn-inline ui-btn-slapos-black ui-link", "href": "#invoices::new"},
"attributes": {
"data-i18n": "page_dict.invoices.add",
"data-icon": "edit"
},
"logic": {"text":"Create new invoice"}
}, {
"generate": "widget",
"type": "table",
......
......@@ -13,7 +13,7 @@
"default": [
{
"generate": "gadget",
"type": "listgrid",
"type": "listbox",
"id": "invoice_overview",
"href": "invoice_overview"
}
......
......@@ -17,6 +17,14 @@
"id": "computer_overview",
"href": "computer_overview"
}
],
"new": [
{
"generate": "gadget",
"type": "fieldlist",
"id": "computer_new",
"href": "computer_new"
}
]
}
}, {
......@@ -39,14 +47,6 @@
"id": "software_status",
"href": "software_status"
}
],
"new": [
{
"generate": "gadget",
"type": "fieldlist",
"id": "computer_new",
"href": "computer_new"
}
]
}
}, {
......
[]
\ No newline at end of file
[
{
"network_title":"Foo-Net",
"network_reference": "NET-123"
},
{
"network_title":"Bar-Net",
"network_reference": "NET-456"
},
{
"network_title":"Lawn",
"network_reference": "NET-111"
}
]
\ No newline at end of file
......@@ -17,6 +17,14 @@
"id": "person_view",
"href": "person_view"
}
],
"new": [
{
"generate": "gadget",
"type": "fieldlist",
"id": "person_view",
"href": "person_view"
}
]
}
},
......@@ -34,14 +42,6 @@
"id": "person_view",
"href": "person_view"
}
],
"new": [
{
"generate": "gadget",
"type": "fieldlist",
"id": "person_view",
"href": "person_view"
}
]
}
}
......
......@@ -90,7 +90,7 @@
"release_image_url": "https://www.slapos.org/software_product_module/20110316-88D7/default_image?quality=75&display=thumbnail"
},
{
"release_title": "SlapOS Web Runner ",
"release_title": "SlapOS Web Runner",
"release_description": "Ready for production.",
"release_version": "slapos-0.143",
"release_id": "9572094",
......@@ -150,7 +150,7 @@
"release_image_url": "https://www.slapos.org/software_product_module/20110316-88D7/default_image?quality=75&display=thumbnail"
},
{
"release_title": "Kumofs Branch Development ",
"release_title": "Kumofs Branch Development",
"release_description": "For development use only. ",
"release_version": "branch",
"release_id": "1650465",
......@@ -162,7 +162,7 @@
{
"release_title": "Kumofs",
"release_description": "",
"release_version": "slapos-0.141 ",
"release_version": "slapos-0.141",
"release_id": "8516098",
"release_reference_id": "20110615-176F8",
"release_reference_portal_type": "Software Product",
......
......@@ -17,6 +17,14 @@
"id": "computer_overview",
"href": "computer_overview"
}
],
"new": [
{
"generate": "gadget",
"type": "fieldlist",
"id": "computer_new",
"href": "computer_new"
}
]
}
}, {
......@@ -39,14 +47,6 @@
"id": "software_status",
"href": "software_status"
}
],
"new": [
{
"generate": "gadget",
"type": "fieldlist",
"id": "computer_new",
"href": "computer_new"
}
]
}
}, {
......
......@@ -10,7 +10,14 @@
"title_i18n": "page_dict.services.title",
"theme": "slapos-white",
"layout": {
"default": []
"default": [
{
"generate": "gadget",
"type": "listbox",
"id": "installation_overview",
"href": "installation_overview"
}
]
}
}
]
......
......@@ -17,6 +17,14 @@
"id": "subscription_overview",
"href": "subscription_overview"
}
],
"new": [
{
"generate": "gadget",
"type": "listgrid",
"id": "subscription_overview",
"href": "subscription_overview"
}
]
}
}, {
......@@ -33,22 +41,6 @@
"id": "release_overview",
"href": "release_overview"
}
],
"add": [
{
"generate": "gadget",
"type": "listgrid",
"id": "subscription_overview",
"href": "subscription_overview"
}
],
"install": [
{
"generate": "gadget",
"type": "listbox",
"id": "release_install",
"href": "release_install"
}
]
}
}, {
......@@ -58,7 +50,15 @@
"title_i18n": "page_dict.release.title",
"theme": "slapos-white",
"layout": {
"default": []
"default": [],
"install": [
{
"generate": "gadget",
"type": "listbox",
"id": "release_install",
"href": "release_install"
}
]
}
}
]
......
......@@ -94,7 +94,7 @@
"property_dict": {"direction": "horizontal"},
"children": [{
"type": "a",
"direct": {"className":"translate ui-btn-slapos-black", "href": "#software"},
"direct": {"className":"translate ui-btn-slapos-black", "href": "#software::new"},
"attributes": {
"data-i18n": "page_dict.servers.add_software"
},
......
{
"portal_type_source": "Software Product",
"portal_type_title": "subscription",
"portal_type_fields": "subscription_fieldlist",
"initial_query": {"include_docs": true, "limit":[0,8]},
"form": true,
"id": "subscription_overview",
"property_dict": {
"link": true,
"link_identifier": "id",
"link_to_view": "install",
"dynamic_children": [1]
},
"children": [{
"generate": "widget",
"type": "controlbar",
"class_list": "responsive",
"children": [
{"type": "input", "direct": {"id":"search_subscription_list", "className": "translate"}, "attributes": {"data-action":"search", "data-enhanced":"true", "data-i18n": "[placeholder]page_dict.software.search","placeholder":"Search available software", "data-icon":"search", "data-action-btn":"true", "data-type":"search", "type":"search"}, "logic":{"clear":"true", "action":"search"}},
{"type": "div", "direct": {"className":"info"}, "attributes": {"data-info":"records"}},
{"type": "div", "direct": {"className":"info"}, "attributes": {"data-info":"selected"}},
{"type": "div", "direct": {"className":"info"}, "attributes": {"data-info":"filter"}},
{"type": "div", "direct": {"className":"info"}, "attributes": {"data-info":"sorted"}}
]
}, {
"generate":"widget",
"type": "listview",
"class_list": "",
"theme": "slapos-white",
"property_dict": {
"inset":"true",
"filter": "true",
"input": "#search_subscription_list"
},
"children": []
}, {
"generate":"widget",
"type": "controlbar",
"class_list": "responsive",
"children": [{
"generate": "widget",
"type": "controlgroup",
"class_list": "pagination",
"property_dict": {
"direction": "horizontal"
},
"children": [
{"type": "a", "direct":{"className":"action", "href":""}, "attributes":{"data-i18n":"global_dict.pagination_dict.first", "data-action":"first", "data-icon":"step-backward", "data-iconpos":"notext"}, "logic": {"text":"First"}},
{"type": "a", "direct":{"className":"action", "href":""}, "attributes":{"data-i18n":"global_dict.pagination_dict.previous", "data-action":"prev", "data-icon":"backward", "data-iconpos":"notext"}, "logic": {"text":"Step Backward"}},
{"type":"select", "direct":{"id":"paginate_subscription_list", "className":"action"},"attributes": {"data-icon":"reorder", "data-action":"limit", "data-iconpos":"notext"},"logic": {"options":[{"value": "16", "text": "16", "text_i18n":"global_dict.pagination_dict.16"},{"value": "32", "text": "32", "text_i18n":"global_dict.pagination_dict.32"},{"value": "64", "text": "64", "text_i18n":"global_dict.pagination_dict.64"}, {"value": "128", "text": "128", "text_i18n":"global_dict.pagination_dict.128"}]}},
{"type": "a", "direct":{"className":"action", "href":""}, "attributes":{"data-i18n":"global_dict.pagination_dict.next", "data-action":"next", "data-icon":"forward", "data-iconpos":"notext"}, "logic": {"text":"Step Forward"}},
{"type": "a", "direct":{"className":"action", "href":""}, "attributes":{"data-i18n":"global_dict.pagination_dict.last", "data-action":"last", "data-icon":"step-forward", "data-iconpos":"notext"}, "logic": {"text": "Last"}}
]
}]
}]
}
......@@ -7,7 +7,6 @@
"id": "subscription_overview",
"property_dict": {
"link": true,
"radio": true,
"link_identifier": "id",
"dynamic_children": [1]
},
......
......@@ -554,8 +554,14 @@
for (k = 0; k < items.length; k += 1) {
item = items[k].doc;
// TODO: not working to alternate identifier!
identifier = item[spec.portal_type_title + "_" +
(spec.property_dict.feature_dict.link_identifier || "id")];
spec.property_dict.feature_dict.link_identifier];
// fallback to _id if no link identifier is specified
if (identifier === undefined) {
identifier = item["_id"];
}
if (item === undefined) {
util.error({"error": "mapTableRows: include_docs not set"});
......@@ -564,6 +570,10 @@
for (m = 0; m < config.length; m += 1) {
cell = util.cloneObject(config[m]);
// image
if (cell.image) {
cell.image = item[cell.column];
} else {
if (cell.text === undefined) {
cell.text = item[cell.column];
}
......@@ -574,7 +584,7 @@
if (translation) {
cell.text_i18n = translation;
}
}
// add href if specified, default to "portal_type" & "id"
// TODO: features are set here and in table, not nice?
if (linkable) {
......@@ -585,6 +595,7 @@
if (action && cell.action_list) {
cell.action_list = cell.action_list || [];
}
row.push(cell);
// empty set value again for next iteration
......@@ -738,6 +749,8 @@
* @param {string} value Value to set this field to
* @returns {object} config Configuration object to pass to factory
**/
// NOTE: select options must be fetched here, because we are setting
// the mapping from (ERP5) custom API to internal API here
"mapFormField": function (spec, overrides, passed_value) {
var validation_list, class_list, element, type, prevail, clear, config,
error_log, field_value;
......@@ -944,8 +957,8 @@
.i18n_force_browser_language;
logger = content_dict.property_dict.login_dict;
// add login if specified
if (logger) {
// make sure login is only setup if needed
if (logger !== undefined) {
app.default_dict.state_dict.login = true;
foreign = logger.third_party;
depend = "login_state";
......@@ -974,8 +987,6 @@
break;
}
}
} else {
util.error({"error": "globalConfig: Missing login dict"});
}
// setup loader
......@@ -2937,7 +2948,7 @@
promises[i] = app.setContent(render[i], url_dict, create);
}
} else {
util.errorHandler({"error":"factory.page: Missing view for " + render});
util.errorHandler({"error":"factory.page: Missing view"});
}
return RSVP.all(promises)
......@@ -3098,7 +3109,7 @@
// TODO: until we can pre-enhance, JQM may enhance...
container = factory.element(
"table",
{"className": (spec.classList || "") + " ui-responsive"},
{"className": (spec.classList || "") + " ui-responsive table-stroke"},
{
"data-role": "table",
"data-mode": config.mode,
......@@ -3146,7 +3157,7 @@
factory.tableRow = function (spec, body) {
var i, j, k, field, link, config, property, title, action, cell, set, text,
column_list, temp, container, row, group, button, input_type, checkered,
global_check, skip, input_dict;
global_check, skip, input_dict, snippet;
// checkbox row
if (spec.config.check) {
......@@ -3229,6 +3240,7 @@
field = column_list[j];
link = undefined;
config = {};
text = null;
property = field.column;
if (field.show) {
......@@ -3241,8 +3253,8 @@
}
// set title to title or merger_title stored in temp
title = temp[property] ? temp[property][0] :
(field.title || field.text);
snippet = (field.title || field.text);
title = temp[property] ? snippet + " " + temp[property][0] : snippet;
// cell action buttons
if (field.action_list && field.action_list.length) {
......@@ -3275,9 +3287,8 @@
link = app.setContent(group);
// links & sorting
} else if ((spec.config.sortable && field.sort) ||
} else if ((!body && spec.config.sortable && field.sort) ||
spec.config.linkable && field.href) {
text = {};
// header link (sorting) or href link
link = factory.element(
......@@ -3292,8 +3303,9 @@
{
"data-action": field.href ? null : "sort",
"data-reference": field.href ? null : spec.config.reference,
"data-column-title": field.hrf ? null : field.column,
"text": title,
"data-column-title": field.href ? null : field.column,
"text": title || null,
"img": field.image ? {"href": field.image, "alt": null, "alt_i18n": null} : null,
"href": field.href || null,
"data-i18n": field.href ? null : (field.text_i18n ?
(temp[property] ? temp[property][1] : field.text_i18n) :
......@@ -3333,7 +3345,10 @@
}
} else {
// set merger
temp[field.merge] = [field.merger_text, field.merger_i18n]
temp[field.merge] = [
(field.merger_text || field.text),
(field.merger_i18n || null)
];
}
}
}
......@@ -3745,6 +3760,7 @@
case "role":
case "type":
case "rel":
case "alt":
case "readonly":
case "size":
if (setters[attribute]) {
......@@ -3752,22 +3768,31 @@
}
break;
case "text":
if (setters.text) {
element.appendChild(document.createTextNode(setters.text));
}
break;
case "img":
pic = setters.img;
if (pic) {
element.appendChild(factory.element(
"img",
{"src": pic.href, "alt": pic.alt},
{"src": pic.href},
{},
{"data-i18n": pic.alt_i18n ? ("[alt]" + pic.alt_i18n) : null}
{
"data-i18n": pic.alt_i18n ? ("[alt]" + pic.alt_i18n) : null,
"alt": pic.alt || null
}
));
}
break;
case "options":
// TODO: optgroup!!!
if (setters.options) {
for (i = 0; i < setters.options.length; i += 1) {
recurse = setters.options[i];
if (recurse) {
element.appendChild(
factory.element(
"option",
......@@ -3785,6 +3810,7 @@
);
}
}
}
break;
case "extra":
// WARNING: uses JSON not HTML!!!
......@@ -4834,10 +4860,11 @@
* @return {object} pointer object
*/
app.generateLinkObject = function (url) {
var i, query, parameter, path, clean_hash, config;
var i, query, parameter, path, clean_hash, config, backup;
path = $.mobile.path.parseUrl(url.replace($.mobile.dialogHashKey, "")),
clean_hash = path.hash.replace("#", ""),
backup = 0;
config = {
"url": url
};
......@@ -4851,13 +4878,16 @@
// check for mode(s)
query = clean_hash.split("::");
// TODO: this should be generic and without a backup....
for (i = 0; i < query.length; i += 1) {
switch(query[i]) {
case "new":
config.mode = "new";
backup = 1;
break;
case "add":
config.mode = "add";
backup = 1;
break;
case "config":
config.mode = "config";
......@@ -4867,7 +4897,7 @@
config.fragment_list = clean_hash.split("::");
config.id = clean_hash;
config.layout_level = config.fragment_list.length - 1;
config.layout_level = config.fragment_list.length - 1 - backup;
config.deeplink = true;
config.layout_identifier = clean_hash.split("::")[0];
}
......@@ -5255,8 +5285,8 @@
// ======================== SAMPLE DATA ==================================
/**
* Create Sample data entries for JIO
* @method storeSampleData
* Create/Update element in storage
* @method store
* @param {object} parcel object containing storage, type and pass
* @return {object} promise object/pass
*/
......@@ -5941,6 +5971,14 @@
*/
util.storage_dict = {};
/**
* Internal item counter
*/
// TODO: remove once there is a way to assign auto-incrementing counters
// from server-side (or switch to UUID right away, because this requires
// syncing!
util.counter = 0;
/**
* cookie handler
* thx: https://developer.mozilla.org/en-US/docs/Web/API/document.cookie
......
......@@ -82,7 +82,9 @@
},
"invoices": {
"title": "Invoices",
"subtitle": "Overview of Invoices"
"subtitle": "Overview of Invoices",
"download": "Download",
"add": "Create new invoice"
},
"servers": {
"no_software": "No software installed.",
......@@ -100,7 +102,8 @@
"subtitle": "Server instances being used"
},
"services": {
"title": "Subscriptions",
"add": "Install new software",
"title": "Services",
"subtitle": "Administration of Installed Software"
},
"networks": {
......@@ -178,6 +181,10 @@
},
"installation_dict": {
"field_list": {
"timestamp": {
"title": "Timestamp",
"description": "Data and time this installation was made."
},
"version": {
"title": "Version",
"description": "The version of the software installed on this computer."
......@@ -191,7 +198,7 @@
"description": "Type of image (icon/image)."
},
"image_url": {
"title": "Image Url",
"title": "Image",
"description": "The path to the icon/image for this software service."
},
"status": {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment