Skip to content

Commit

Permalink
Merge pull request #840 from oceanzus/redesign_sprint14_13107
Browse files Browse the repository at this point in the history
Sprint 13 Hotfix #3
  • Loading branch information
oceanzus authored Jun 15, 2018
2 parents 2282fdc + 076d949 commit 78322f2
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 12 deletions.
6 changes: 6 additions & 0 deletions ooiui/static/js/models/science/StreamModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ var StreamModel = Backbone.Model.extend({
'assembly': data.assembly_name
};
data.unique_id = data.reference_designator + data.stream_name;
if(data.stream_name !== null){
data.stream_identifier = data.stream_name.split('_')[1].replace(/-/g,'_');
}else{
data.stream_identifier = '';
}

return data;
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<thead>
<tr>
<td><%= model.get('long_display_name')%></td>
<td><%= model.get('stream_name').replace('_','-')%></td>
<td><%= model.get('stream_identifier')%></td>

<% _.each(plotTypeModel.get('inputs'), function(input){ %>
<td value="<%=input.value%>"><%=input.name%></td>
Expand Down
3 changes: 2 additions & 1 deletion ooiui/static/js/partials/science/plot/PlotInstruments.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<th></th>
<th>Ref Des</th>
<th>Long Display Name</th>
<th>Stream Name</th>
<th hidden>Stream Name</th>
<th>Stream Identifier</th>
<th>Start / End</th>
</tr>
</thead>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
<td>
<%= model.get('long_display_name') %>
</td>
<td>
<td hidden>
<%= model.get('stream_name') %>
</td>
<td>
<%= model.get('stream_name').split('_')[1].replace(/-/g,'_') %>
</td>
<td>
<%= model.get('start') %> : <%= model.get('end') %>
</td>
4 changes: 0 additions & 4 deletions ooiui/static/js/views/science/AnnotationTableView.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ var AnnotationTableView = Backbone.View.extend({
{
name : 'referenceDesignator',
label : 'Reference Designator'
},
{
name : 'stream_name',
label : 'Stream Name'
}
],
initialize: function() {
Expand Down
7 changes: 7 additions & 0 deletions ooiui/static/json/uiPatchNotes.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
[
{
"VersionNumber": "1.4.9.3",
"VersionDate": "2018-06-14",
"VersionDescription": [
"Data Catalog: Replaces Stream Name with Stream Identifier in selected stream table. (13107)"
]
},
{
"VersionNumber": "1.4.9.2",
"VersionDate": "2018-05-23",
Expand Down
33 changes: 28 additions & 5 deletions ooiui/templates/science/data_access.html
Original file line number Diff line number Diff line change
Expand Up @@ -864,8 +864,8 @@ <h5 style="font-size: 14px;float: left;padding-left: 5px;"><b>Click annotation o
var rowId = val = o.model.get('ref_des') + o.model.get('stream_name');
$($dcGrid.getGridRowById(rowId)).find('.instrument-to-plot i').removeClass('fa-plus-square').addClass('fa-minus-square')
}
var selectedStreamUrl = "#" + o.model.get('ref_des') + "/" + o.model.get('stream_name');
var selectedStreamObj = {"ref_des": o.model.get('ref_des'), "stream_name": o.model.get('stream_name')};
var selectedStreamUrl = "#" + o.model.get('ref_des') + "/" + o.model.get('stream_identifier');
var selectedStreamObj = {"ref_des": o.model.get('ref_des'), "stream_name": o.model.get('stream_name'), "stream_identifier": o.model.get('stream_identifier')};
// console.log("add_catalog_model");
// console.log(selectedStreamObj);
// console.log(selectedStreamUrl);
Expand Down Expand Up @@ -2191,6 +2191,7 @@ <h5 style="font-size: 14px;float: left;padding-left: 5px;"><b>Click annotation o
'Latitude',
'Longitude',
'Reference Designator',
'Stream Name',
'Stream Identifier',
'Unique ID',
'IRIS Link',
Expand Down Expand Up @@ -2416,20 +2417,41 @@ <h5 style="font-size: 14px;float: left;padding-left: 5px;"><b>Click annotation o
index : 'stream_name',
{# key : true,#}
editable : false,
hidden : true,
{# width : 85,#}
sortable : true,
sorttype : 'string',
searchoptions : {sopt:['cn','eq','ne','lt','le','gt','ge','bw','bn','in','ni','ew','en','nc']},
align : 'center'
//formatter : streamNameFormatter
{#unformat : function (cellvalue, options, cell) {
console.log(cellvalue);
console.log(options);
console.log(cell);
return $('input', cell).val() || cellvalue;
}#}
//unformat : streamNameUnFormatter
},
{
name : 'stream_identifier',
index : 'stream_identifier',
{# key : true,#}
editable : false,
hidden : false,
{# width : 85,#}
sortable : true,
sorttype : 'string',
search: true,
searchoptions : {sopt:['cn','eq','ne','lt','le','gt','ge','bw','bn','in','ni','ew','en','nc']},
align : 'center',
formatter : streamNameFormatter,
align : 'center'
//formatter : streamNameFormatter
{#unformat : function (cellvalue, options, cell) {
console.log(cellvalue);
console.log(options);
console.log(cell);
return $('input', cell).val() || cellvalue;
}#}
unformat : streamNameUnFormatter
//unformat : streamNameUnFormatter
},
{
name : 'unique_id',
Expand Down Expand Up @@ -2792,6 +2814,7 @@ <h5 style="font-size: 14px;float: left;padding-left: 5px;"><b>Click annotation o
//jqGrid
var jqCollection = collection;
jqCollection['actions'] = '';

// ooi.collections.dataAvailabilityCollection.fetch();
//console.log(ooi.collections.dataAvailabilityCollection);
placeJqGrid(jqCollection, ooi.collections.dataAvailabilityCollection);
Expand Down

0 comments on commit 78322f2

Please sign in to comment.