Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
b9b216a
Made changes to arches/app/models/entity.py so that files can be down…
TeriForey Jun 12, 2018
854d71c
Merge pull request #2 from TeriForey/60_file_entity_creation_from_bul…
TeriForey Jun 13, 2018
21cbe53
Merge branch 'eamena-migration-branch' into eamena-migration-branch
azerbini Sep 24, 2018
6711de8
remove livereload
mradamcox Nov 27, 2018
5379c1f
Change all external references from http to https
mradamcox Nov 27, 2018
ba6b1f9
change all cdn references to https
mradamcox Nov 30, 2018
52e831e
add missing report section templates
mradamcox Dec 17, 2018
32ecb1f
place bulk load log file with all other log files
mradamcox Dec 17, 2018
93d057a
standardize location of media files and url
mradamcox Dec 17, 2018
94f8722
add missing settings used in reports
mradamcox Dec 17, 2018
dc293d5
remove unneeded bulk load log file setting
mradamcox Dec 17, 2018
c831865
attempt import of GDAL path early on, where it's needed.
mradamcox Dec 17, 2018
6d27c09
fix name of bulk upload log file setting
mradamcox Dec 17, 2018
964b4b4
handle django's auto file rename on save for bulk upload
mradamcox Dec 17, 2018
4076983
add crypto js to version control
mradamcox Dec 17, 2018
9780cc6
change multiple file upload to syncronous; async was causing errors
mradamcox Dec 18, 2018
b5742d3
add some needed properties to load 3-tier graphs
mradamcox Dec 18, 2018
ddf09d1
Merge branch 'eamena-migration-branch' of https://github.com/azerbini…
mradamcox Dec 18, 2018
3b51c9f
only allow editors bulk upload access
mradamcox Dec 18, 2018
d045259
fix broken nodesHaveValues function, improve optional arguments
mradamcox Jan 11, 2019
13b5af8
add rules for required fields to have green placeholders
mradamcox Jan 11, 2019
8342f03
Merge pull request #4 from azerbini/eamena-migration-branch
TeriForey Jan 15, 2019
1a25bac
iterate excel rows to find blank cells
mradamcox Jan 15, 2019
8b7e1b7
only check values under valid headers
mradamcox Jan 18, 2019
3007adc
handle non-ascii characters when checking empty cells
mradamcox Jan 18, 2019
870cffc
Merge pull request #93 from azerbini/90_flag_empty_cells_in_Excel_file
mradamcox Jan 18, 2019
600c289
fix command line export command
mradamcox Jan 18, 2019
408bbf7
add new properties
mradamcox Jan 18, 2019
4e50c16
Merge pull request #5 from azerbini/eamena-migration-branch
TeriForey Jan 24, 2019
37662bb
Reset branch back to status on azerbini fork
TeriForey Jan 24, 2019
0e5178b
Cropped and lowered the quality of homepage images to reduce file siz…
TeriForey Jan 30, 2019
365c73a
Set mapFilter obj to be created only on clicking the map toggle, ther…
TeriForey Feb 5, 2019
ae80612
Added responsive logo images
TeriForey Feb 19, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*.xslx
arches.egg-info
eamena/eamena/settings_local.py
eamena/eamena/media/js/views/crypto
eamena/eamena/elasticsearch
eamena/eamena/logs
eamena/eamena/uploadedfiles
Expand Down
4 changes: 2 additions & 2 deletions arches/app/media/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

/*Import Google Font*/
@import url(http://fonts.googleapis.com/css?family=Open+Sans:300,400);
@import url(https://fonts.googleapis.com/css?family=Open+Sans:300,400);

/*Reset Styles
------------------------------------*/
Expand Down Expand Up @@ -2775,4 +2775,4 @@ img.img-circle {
-o-transform: scale(2) rotate(5deg);
-ms-transform: scale(2) rotate(5deg);
transform: scale(2) rotate(5deg);
}
}
16 changes: 14 additions & 2 deletions arches/app/media/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,22 @@ body {
padding: 0 10px 0px;
}

@media (max-width: 1200px) {
.header .navbar-brand {
top: -20px;
}
}

@media (max-width: 992px) {
.header .navbar-brand {
top: 0;
height: 80px;
top: -40px;
}
}

@media (max-width: 767px) {
.header .navbar-brand {
height: auto;
top: -10px;
}
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 arches/app/media/img/Petra_AZ_cropped.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
221 changes: 131 additions & 90 deletions arches/app/media/js/search.js

Large diffs are not rendered by default.

50 changes: 25 additions & 25 deletions arches/app/templates/base.htm
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
<meta name="author" content="">

{% block css %}
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.1.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.1.0/css/bootstrap.min.css">
<link rel="stylesheet" href="{% static 'plugins/line-icons/line-icons.css' %}">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.2.0/css/font-awesome.min.css">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/octicons/2.1.2/octicons.min.css">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/select2/3.5.0/select2-bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.2.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/octicons/2.1.2/octicons.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.0/select2-bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="{% static 'css/main.css' %}">
<link rel="stylesheet" href="{% static 'css/plugins/smartadmin-production.css' %}" type="text/css" media="screen">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/3.1.3/css/bootstrap-datetimepicker.min.css" type="text/css" media="screen">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/3.1.3/css/bootstrap-datetimepicker.min.css" type="text/css" media="screen">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/blueimp-gallery/2.15.2/css/blueimp-gallery.min.css" type="text/css" media="screen">
<link rel="stylesheet" href="{% static 'css/plugins/bootstrap-image-gallery.min.css' %}" type="text/css" media="screen">
<link rel="stylesheet" href="{% static 'plugins/openlayers/ol.css' %}">
Expand Down Expand Up @@ -80,36 +80,36 @@ <h1 class="pull-left arches-breadcrumb-title">Reference Data Manager (RDM)</h1>
</div><!--/wrapper-->

{% block javascript %}
<script src="http://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.14/require.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.14/require.min.js"></script>
{% block pre_require_js %}
{% endblock pre_require_js %}
<script>
require.config({
baseUrl: '{{ STATIC_URL }}js',
paths: {
'plugins': '{{ STATIC_URL }}plugins',
'async': 'http://cdnjs.cloudflare.com/ajax/libs/requirejs-async/0.1.1/async',
'jquery': 'http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min',
'select2': 'http://cdnjs.cloudflare.com/ajax/libs/select2/3.5.1/select2.min',
'bootstrap': 'http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.1.0/js/bootstrap.min',
'jquery-ui': 'http://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min',
'flexslider': 'http://cdnjs.cloudflare.com/ajax/libs/flexslider/2.2.2/jquery.flexslider-min',
'async': 'https://cdnjs.cloudflare.com/ajax/libs/requirejs-async/0.1.1/async',
'jquery': 'https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min',
'select2': 'https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.1/select2.min',
'bootstrap': 'https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.1.0/js/bootstrap.min',
'jquery-ui': 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min',
'flexslider': 'https://cdnjs.cloudflare.com/ajax/libs/flexslider/2.2.2/jquery.flexslider-min',
'openlayers': '{{ STATIC_URL }}plugins/openlayers/ol',
'easing': 'http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min',
'backbone': 'http://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.2/backbone-min',
'underscore': 'http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.7.0/underscore-min',
'jquery-validate': 'http://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.11.1/jquery.validate.min',
'd3': 'http://cdnjs.cloudflare.com/ajax/libs/d3/3.5.3/d3.min',
'dropzone': 'http://cdnjs.cloudflare.com/ajax/libs/dropzone/3.8.4/dropzone-amd-module.min',
'summernote': 'http://cdnjs.cloudflare.com/ajax/libs/summernote/0.5.10/summernote.min',
'knockout': 'http://cdnjs.cloudflare.com/ajax/libs/knockout/3.3.0/knockout-min',
//'knockout': 'http://knockoutjs.com/downloads/knockout-3.3.0.debug',
'knockout-mapping': 'http://cdnjs.cloudflare.com/ajax/libs/knockout.mapping/2.4.1/knockout.mapping.min',
'moment': 'http://cdnjs.cloudflare.com/ajax/libs/moment.js/2.8.4/moment.min',
'bootstrap-datetimepicker': 'http://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/3.1.3/js/bootstrap-datetimepicker.min',
'easing': 'https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min',
'backbone': 'https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.2/backbone-min',
'underscore': 'https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.7.0/underscore-min',
'jquery-validate': 'https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.11.1/jquery.validate.min',
'd3': 'https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.3/d3.min',
'dropzone': 'https://cdnjs.cloudflare.com/ajax/libs/dropzone/3.8.4/dropzone-amd-module.min',
'summernote': 'https://cdnjs.cloudflare.com/ajax/libs/summernote/0.5.10/summernote.min',
'knockout': 'https://cdnjs.cloudflare.com/ajax/libs/knockout/3.3.0/knockout-min',
//'knockout': 'https://knockoutjs.com/downloads/knockout-3.3.0.debug',
'knockout-mapping': 'https://cdnjs.cloudflare.com/ajax/libs/knockout.mapping/2.4.1/knockout.mapping.min',
'moment': 'https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.8.4/moment.min',
'bootstrap-datetimepicker': 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/3.1.3/js/bootstrap-datetimepicker.min',
'shp': 'https://raw.githubusercontent.com/wavded/js-shapefile-to-geojson/master/shapefile',
'blueimp-gallery': 'https://cdnjs.cloudflare.com/ajax/libs/blueimp-gallery/2.15.2/js/blueimp-gallery',
'blueimp-jquery': 'http://blueimp.github.io/Gallery/js/jquery.blueimp-gallery',
'blueimp-jquery': 'https://blueimp.github.io/Gallery/js/jquery.blueimp-gallery',
'blueimp-helper': 'https://cdnjs.cloudflare.com/ajax/libs/blueimp-gallery/2.15.2/js/blueimp-helper.min'
},
shim: {
Expand Down
3 changes: 2 additions & 1 deletion arches/app/utils/data_management/resources/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def export(self, resources=None, zip=False, search_results=True, dest_dir=None):
configs = self.read_export_configs()
result = self.writer.write_resources(resources, configs)
else:
self.writer.write_resources(dest_dir)
configs = False
self.writer.write_resources(dest_dir, configs)
return result

def read_export_configs(self):
Expand Down
2 changes: 1 addition & 1 deletion arches/app/utils/data_management/resources/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def resource_list_to_entities(self, resource_list, archesjson=False, append=Fals
log_msg = "\n~~~~~\n{}\nfile: {}\nresources: {}\nloadid: {}".format(
d.strftime("%d/%m/%Y - %H:%M"),filename,len(resource_list),load_id
)
with open(os.path.join(settings.BULK_UPLOAD_DIR,'_loadlog.txt'), "a") as loadlog:
with open(settings.BULK_UPLOAD_LOG_FILE, "a") as loadlog:
loadlog.write(log_msg)
return ret

Expand Down
20 changes: 20 additions & 0 deletions arches/management/commands/Excelreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,22 @@ def validate_rows_and_values(self,workbook):
for msg in ret:
result['errors'].append(msg)

## get the number of real columns based on the headers
headers = [i.value for i in list(sheet.rows)[0] if i.value]

## now iterate the row normal direction to find empty cells
for n,row in enumerate(list(sheet.rows)):
if n+1 == num_rows:
break
for cell in row[:len(headers)]:
msg = "Blank value in: {} row {}".format(sheet_name,n+1)
try:
if cell.value is None or str(cell.value).rstrip() == "":
result['errors'].append(msg)
except UnicodeEncodeError:
if cell.value.encode('ascii', 'ignore').rstrip() == "":
result['errors'].append(msg)

if (rows_count/sheet_count).is_integer() is not True:
result['errors'].append("Inconsistent number of rows across "\
"workbook sheets.")
Expand Down Expand Up @@ -476,6 +492,10 @@ def write_arches_file(self,workbook,resourcetype,destination,append=False):
elif datatype == 'dates':
outval = self.validatedate(concept)

## anticipate django's auto renaming of saved files
elif "FILE_PATH" in entitytype:
outval = concept.replace(" ","_")

else:
outval = concept
row = [str(resourceid),resourcetype,entitytype,outval, GroupName]
Expand Down
32 changes: 19 additions & 13 deletions eamena/eamena/install/prepackage_sql/add_classes.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ INSERT INTO ontology.classes VALUES ('I4', 'Proposition Set', true);
INSERT INTO ontology.classes VALUES ('I6', 'Belief Value', true);
INSERT INTO ontology.classes VALUES ('SP6', 'Declarative Place', true);
INSERT INTO ontology.classes VALUES ('SP5', 'Geometric Place Expression', true);
INSERT INTO ontology.classes VALUES ('SP4', 'Spatial Coordinate Reference System', true);
INSERT INTO ontology.classes VALUES ('SP15', 'Observable Entity', true);
INSERT INTO ontology.classes VALUES ('SP16', 'State', true);
INSERT INTO ontology.classes VALUES ('XX1', 'Potential State Prediction', true);
INSERT INTO ontology.classes VALUES ('SP4', 'Spatial Coordinate Reference System', true);
INSERT INTO ontology.classes VALUES ('SP15', 'Observable Entity', true);
INSERT INTO ontology.classes VALUES ('SP16', 'State', true);
INSERT INTO ontology.classes VALUES ('XX1', 'Potential State Prediction', true);
INSERT INTO ontology.classes VALUES ('XX2', 'Risk Prediction Evaluation', true);
INSERT INTO ontology.classes VALUES ('B2', 'Morphological Building Section', true);

INSERT INTO ontology.properties VALUES ('P81a', 'E52', 'E61', 'End of the beginning');
INSERT INTO ontology.properties VALUES ('P81b', 'E53', 'E62', 'Beginning of the end');
INSERT INTO ontology.properties VALUES ('P82a', 'E54', 'E63', 'Beginning of the beginning');
INSERT INTO ontology.properties VALUES ('P82b', 'E55', 'E64', 'End of the end');
INSERT INTO ontology.properties VALUES ('P81a', 'E52', 'E61', 'End of the beginning');
INSERT INTO ontology.properties VALUES ('P81b', 'E53', 'E62', 'Beginning of the end');
INSERT INTO ontology.properties VALUES ('P82a', 'E54', 'E63', 'Beginning of the beginning');
INSERT INTO ontology.properties VALUES ('P82b', 'E55', 'E64', 'End of the end');
INSERT INTO ontology.properties VALUES ('-O8', 'E24', 'S4', 'Was Observed By');
INSERT INTO ontology.properties VALUES ('O8', 'S4', 'S15', 'Observed');
INSERT INTO ontology.properties VALUES ('O16', 'S4', 'I6', 'Observed Value');
Expand All @@ -33,8 +33,14 @@ INSERT INTO ontology.properties VALUES ('J4', 'I2', 'I4', 'That');
INSERT INTO ontology.properties VALUES ('J5', 'I2', 'I6', 'Holds to be');
INSERT INTO ontology.properties VALUES ('J2', 'I1', 'I2', 'Concluded that');
INSERT INTO ontology.properties VALUES ('-Q11', 'E53', 'SP6', 'Is approximated by');
INSERT INTO ontology.properties VALUES ('-Q10', 'SP6', 'E94', 'Is defined place by');
INSERT INTO ontology.properties VALUES ('Q9', 'E94', 'SP4', 'Is expressed in terms of');
INSERT INTO ontology.properties VALUES ('YY1', 'E14', 'XX1', 'predicts');
INSERT INTO ontology.properties VALUES ('-YY2', 'XX1', 'XX2', 'Is evaluated by');
INSERT INTO ontology.properties VALUES ('-YY3', 'XX1', 'E5', 'Would be produced by');
INSERT INTO ontology.properties VALUES ('-Q10', 'SP6', 'E94', 'Is defined place by');
INSERT INTO ontology.properties VALUES ('Q9', 'E94', 'SP4', 'Is expressed in terms of');
INSERT INTO ontology.properties VALUES ('YY1', 'E14', 'XX1', 'predicts');
INSERT INTO ontology.properties VALUES ('-YY2', 'XX1', 'XX2', 'Is evaluated by');
INSERT INTO ontology.properties VALUES ('-YY3', 'XX1', 'E5', 'Would be produced by');

-- Add the following missing properties in order to load 3-tier graphs.
-- The values below should be inspected and in some case must be updated.
INSERT INTO ontology.properties VALUES ('O14', 'S16', 'E5', '<needs to be updated>');
INSERT INTO ontology.properties VALUES ('YY2', 'S16', 'E5', '<needs to be updated>');
INSERT INTO ontology.properties VALUES ('YY3', 'S16', 'E5', '<needs to be updated>');
33 changes: 32 additions & 1 deletion eamena/eamena/media/css/package.css
Original file line number Diff line number Diff line change
Expand Up @@ -434,4 +434,35 @@ input.file {
.upload-msg-box {
margin-top: 10px;
}
/* end bulk upload style */
/* end bulk upload style */


.required-input span {
color: green;
}

.required-input input {
color: green;
}

.required-input ::-webkit-input-placeholder { /* WebKit, Blink, Edge */
color: green;
}
.required-input :-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color: green;
opacity: 1;
}
.required-input ::-moz-placeholder { /* Mozilla Firefox 19+ */
color: green;
opacity: 1;
}
.required-input :-ms-input-placeholder { /* Internet Explorer 10-11 */
color: green;
}
.required-input ::-ms-input-placeholder { /* Microsoft Edge */
color: green;
}

.required-input ::placeholder { /* Most modern browsers support this now. */
color: green;
}
1 change: 1 addition & 0 deletions eamena/eamena/media/js/bulk-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ $( document ).ready(function() {
$('#folder-msg').text("Uploading files... this may take a while.");
});
$('#folderupload').fileupload({
async: false,
beforeSend: function(request) {
request.setRequestHeader("X-CSRFToken",csrftoken);
},
Expand Down
4 changes: 2 additions & 2 deletions eamena/eamena/media/js/map/base-layers.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ define([
layer: new ol.layer.Tile({
visible: false,
source: new ol.source.XYZ({
url: 'http://mt0.google.com/vt/lyrs=y&hl=en&x={x}&y={y}&z={z}&s=Ga'
url: 'https://mt0.google.com/vt/lyrs=y&hl=en&x={x}&y={y}&z={z}&s=Ga'
})
})
});
Expand Down Expand Up @@ -58,4 +58,4 @@ define([
}

return baseLayers;
});
});
4 changes: 1 addition & 3 deletions eamena/eamena/media/js/map/resource-layer-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ define([
})

if (config.entitytypeid !== null) {
$('.map-loading').show();
layerConfig.url = arches.urls.map_markers + config.entitytypeid;

//fetch the raw geojson data and act on it
Expand All @@ -103,9 +104,6 @@ define([
}
})
}


$('.map-loading').show();

var clusterStyle = function(feature, resolution) {
if(feature.get('features')) {
Expand Down
10 changes: 10 additions & 0 deletions eamena/eamena/media/js/views/crypto/components/aes-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading