Skip to content

Commit

Permalink
GDB-5254: Added v=xxx support for most CSS/JS/image files that are lo…
Browse files Browse the repository at this point in the history
…aded by URL via CopyPlugin's transform option to mimic the mechanism used for template loading via $templateRequest

Removed wrongly committed change to webpack config.
  • Loading branch information
Pavel Mihaylov committed Nov 25, 2020
1 parent 0e162ab commit 0b22676
Show file tree
Hide file tree
Showing 28 changed files with 115 additions and 104 deletions.
6 changes: 3 additions & 3 deletions src/js/angular/core/directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ontoLoader.$inject = [];
function ontoLoader() {
return {
template: function (elem, attr) {
return '<object width="' + attr.size + '" height="' + attr.size + '" data="js/angular/templates/loader/ot-loader.svg">Loading...</object>';
return '<object width="' + attr.size + '" height="' + attr.size + '" data="js/angular/templates/loader/ot-loader.svg?v=[AIV]{version}[/AIV]">Loading...</object>';
}
};
}
Expand All @@ -26,7 +26,7 @@ ontoLoaderFancy.$inject = [];
function ontoLoaderFancy() {
return {
template: function (elem, attr) {
return '<object width="' + attr.size + '" height="' + attr.size + '" data="js/angular/templates/loader/ot-loader.svg"></object>'
return '<object width="' + attr.size + '" height="' + attr.size + '" data="js/angular/templates/loader/ot-loader.svg?v=[AIV]{version}[/AIV]"></object>'
+ '<div>Loading...<div>';
}
};
Expand Down Expand Up @@ -108,7 +108,7 @@ function ontoLoaderNew($timeout) {
});
},
template: '<div class="ot-loader-new-content">'
+ '<img width="{{size}}" height="{{size}}" src="js/angular/templates/loader/ot-loader.svg"/>'
+ '<img width="{{size}}" height="{{size}}" src="js/angular/templates/loader/ot-loader.svg?v=[AIV]{version}[/AIV]"/>'
+ '<div style="font-size: {{size/4}}px">{{currentMessage}}<div>'
+ '</div>'
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2024,7 +2024,7 @@ function GraphsVisualizationsCtrl($scope, $rootScope, $repositories, toastr, $ti
.style("opacity", "0.7");

d3.select(parentNode).append("image")
.attr("xlink:href", "js/angular/templates/loader/ot-loader.svg")
.attr("xlink:href", "js/angular/templates/loader/ot-loader.svg?v=[AIV]{version}[/AIV]")
.attr("x", function () {
return node.x - node.size + 5;
})
Expand Down
2 changes: 1 addition & 1 deletion src/js/angular/import/directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ importDirectives.directive('filesOntoLoader', function () {
scope.$watch('file.status', function () {
if (scope.file.status === 'IMPORTING' || scope.file.status === 'UPLOADING') {
if (!$(element).has('object').length > 0) {
$(element).append('<object width="' + attr.size + '" height="' + attr.size + '" data="js/angular/templates/loader/ot-loader.svg">Loading...</object>');
$(element).append('<object width="' + attr.size + '" height="' + attr.size + '" data="js/angular/templates/loader/ot-loader.svg?v=[AIV]{version}[/AIV]">Loading...</object>');
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion src/pages/autocomplete.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<link href="css/autocomplete.css" rel="stylesheet">
<link href="css/autocomplete.css?v=[AIV]{version}[/AIV]" rel="stylesheet">
<div id="autocomplete" class="page">
<h1>
{{title}}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/clusterInfo.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<link href="css/clustermanagement.css" rel="stylesheet" />
<link href="css/clustermanagement.css?v=[AIV]{version}[/AIV]" rel="stylesheet" />
<title>Cluster Management</title>

<h1>
Expand Down
8 changes: 4 additions & 4 deletions src/pages/create-index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<link href="css/lib/angular-xeditable/xeditable.min.css" rel="stylesheet">
<link href="css/lib/angular-xeditable/xeditable.min.css?v=[AIV]{version}[/AIV]" rel="stylesheet">

<link href="css/lib/yasqe.min.css" rel="stylesheet"/>
<link href="css/lib/yasqe.min.css?v=[AIV]{version}[/AIV]" rel="stylesheet"/>

<link href="css/new-sparql.css" rel="stylesheet"/>
<link href="css/new-sparql.css?v=[AIV]{version}[/AIV]" rel="stylesheet"/>

<link href="css/graphs-config.css" rel="stylesheet"/>
<link href="css/graphs-config.css?v=[AIV]{version}[/AIV]" rel="stylesheet"/>


<div class="container-fluid">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/dependencies.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<link href="css/dependencies.css" rel="stylesheet">
<link href="css/dependencies.css?v=[AIV]{version}[/AIV]" rel="stylesheet">


<title>Explore Class Dependencies</title>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/domainRangeInfo.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<link href="css/domain-range-graph.css" rel="stylesheet"/>
<link href="css/rdf-details-side-panel.css" rel="stylesheet"/>
<link href="css/domain-range-graph.css?v=[AIV]{version}[/AIV]" rel="stylesheet"/>
<link href="css/rdf-details-side-panel.css?v=[AIV]{version}[/AIV]" rel="stylesheet"/>

<title>Explore Data Graph</title>

Expand Down
2 changes: 1 addition & 1 deletion src/pages/edit.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<link href="css/lib/angular-xeditable/xeditable.min.css" rel="stylesheet">
<link href="css/lib/angular-xeditable/xeditable.min.css?v=[AIV]{version}[/AIV]" rel="stylesheet">

<div core-errors></div>
<div class="page" ng-show="getActiveRepository()">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/explore.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<link href="css/explore.css" rel="stylesheet"/>
<link href="css/explore.css?v=[AIV]{version}[/AIV]" rel="stylesheet"/>
<div core-errors></div>
<div class="page" ng-show="getActiveRepository()">
<div class="resource-info" ng-if="!isTripleResource()">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/export.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<link href="css/export.css" rel="stylesheet">
<link href="css/export.css?v=[AIV]{version}[/AIV]" rel="stylesheet">

<div id="wb-export">

Expand Down
4 changes: 2 additions & 2 deletions src/pages/find.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<link href="css/find.css" rel="stylesheet"/>
<link href="css/find.css?v=[AIV]{version}[/AIV]" rel="stylesheet"/>

<div class="page">
<h1>
Expand Down Expand Up @@ -37,4 +37,4 @@ <h1>
</div>
</div>
</form>
</div>
</div>
22 changes: 11 additions & 11 deletions src/pages/graph-config/saveGraphConfig.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<link href="css/lib/angular-xeditable/xeditable.min.css" rel="stylesheet">
<link href="css/lib/angular-xeditable/xeditable.min.css?v=[AIV]{version}[/AIV]" rel="stylesheet">

<link href="css/lib/yasqe.min.css" rel="stylesheet"/>
<link href="css/lib/yasqe.min.css?v=[AIV]{version}[/AIV]" rel="stylesheet"/>

<link href="css/new-sparql.css" rel="stylesheet"/>
<link href="css/new-sparql.css?v=[AIV]{version}[/AIV]" rel="stylesheet"/>

<link href="css/graphs-config.css" rel="stylesheet"/>
<link href="css/graphs-config.css?v=[AIV]{version}[/AIV]" rel="stylesheet"/>

<h1>
{{title}}
Expand Down Expand Up @@ -67,7 +67,7 @@ <h1>
<div class="image-label-container mb-3" ng-show="page == 1">
<label class="image-label d-flex" ng-class="{'active': newConfig.startMode == 'search'}">
<input type="radio" class="form-check-input" id="checkboxSuccess" ng-model="newConfig.startMode" value="search">
<img class="image-label-image" src="css/images/search.png" alt="search image" width="100%">
<img class="image-label-image" src="css/images/search.png?v=[AIV]{version}[/AIV]" alt="search image" width="100%">
<div class="image-label-content">
<h5>Start with a search box</h5>
<div>Choose the starting point of your visual graph every time</div>
Expand All @@ -76,7 +76,7 @@ <h5>Start with a search box</h5>

<label class="image-label d-flex" ng-class="{'active': newConfig.startMode == 'node'}">
<input type="radio" class="form-check-input" id="checkboxSuccess" ng-model="newConfig.startMode" value="node">
<img class="image-label-image" src="css/images/node.png" alt="node image" width="100%">
<img class="image-label-image" src="css/images/node.png?v=[AIV]{version}[/AIV]" alt="node image" width="100%">
<div class="image-label-content">
<h5>Start with a fixed node</h5>
<div>The visual graph will always start from the chosen node.</div>
Expand All @@ -85,7 +85,7 @@ <h5>Start with a fixed node</h5>

<label class="image-label d-flex" ng-class="{'active': newConfig.startMode == 'query'}">
<input type="radio" class="form-check-input" id="checkboxSuccess" ng-model="newConfig.startMode" value="query">
<img class="image-label-image" src="css/images/query.png" alt="query image" width="100%">
<img class="image-label-image" src="css/images/query.png?v=[AIV]{version}[/AIV]" alt="query image" width="100%">
<div class="image-label-content">
<h5>Start with graph query results</h5>
<div>The results from your query will be the starting point of the visual graph.</div>
Expand Down Expand Up @@ -126,7 +126,7 @@ <h5>Start with graph query results</h5>
<p>This query is optional. If empty, the <em>{{getSampleName(samples[0], 'expandQuery')}}</em> sample query will be used.</p>
</div>
<div>
<img src="css/images/expand.png" class="info-box-img" height="220" alt="expand image">
<img src="css/images/expand.png?v=[AIV]{version}[/AIV]" class="info-box-img" height="220" alt="expand image">
</div>
</div>

Expand All @@ -153,7 +153,7 @@ <h5>Start with graph query results</h5>
<p>This query is optional. If empty, the <em>{{getSampleName(samples[0], 'resourceQuery')}}</em> sample query will be used.</p>
</div>
<div>
<img src="css/images/labels-size.png" class="info-box-img" height="220" alt="labels size image">
<img src="css/images/labels-size.png?v=[AIV]{version}[/AIV]" class="info-box-img" height="220" alt="labels size image">
</div>
</div>

Expand All @@ -172,7 +172,7 @@ <h5>Start with graph query results</h5>
<p>This query is optional. If empty, the edge IRI's local name is used.</p>
</div>
<div>
<img src="css/images/predicates.png" class="info-box-img" height="220" alt="predicates image">
<img src="css/images/predicates.png?v=[AIV]{version}[/AIV]" class="info-box-img" height="220" alt="predicates image">
</div>
</div>

Expand All @@ -197,7 +197,7 @@ <h5>Start with graph query results</h5>
<p>This query is optional. If empty, the <em>{{getSampleName(samples[0], 'resourcePropertiesQuery')}}</em> sample query will be used.</p>
</div>
<div>
<img src="css/images/side-panel.png" class="info-box-img" height="220" alt="side panel image">
<img src="css/images/side-panel.png?v=[AIV]{version}[/AIV]" class="info-box-img" height="220" alt="side panel image">
</div>
</div>

Expand Down
14 changes: 7 additions & 7 deletions src/pages/graphs-visualizations.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<link href="css/graphs-vizualizations.css" rel="stylesheet"/>
<link href="css/rdf-details-side-panel.css" rel="stylesheet"/>
<link href="css/lib/ng-tags-input/ng-tags-input.min.css" rel="stylesheet"/>
<link href="js/lib/d3-tip/d3-tip.css" rel="stylesheet"/>
<link href="css/graphs-vizualizations.css?v=[AIV]{version}[/AIV]" rel="stylesheet"/>
<link href="css/rdf-details-side-panel.css?v=[AIV]{version}[/AIV]" rel="stylesheet"/>
<link href="css/lib/ng-tags-input/ng-tags-input.min.css?v=[AIV]{version}[/AIV]" rel="stylesheet"/>
<link href="js/lib/d3-tip/d3-tip.css?v=[AIV]{version}[/AIV]" rel="stylesheet"/>

<div class="container-fluid">

Expand Down Expand Up @@ -134,9 +134,9 @@ <h3>Advanced graph configurations</h3>
<tr ng-repeat="config in graphConfigs">
<td width="20">
<a href ng-click="goToGraphConfig(config)">
<img ng-if="config.startMode == 'search'" src="css/images/search.png" alt="" width="64" popover="Starting point - Search box" popover-trigger="mouseenter">
<img ng-if="config.startMode == 'node'" src="css/images/node.png" alt="" width="64" popover="Starting point - Fixed resource" popover-trigger="mouseenter">
<img ng-if="config.startMode == 'query'" src="css/images/query.png" alt="" width="64" popover="Starting point - Query results" popover-trigger="mouseenter">
<img ng-if="config.startMode == 'search'" src="css/images/search.png?v=[AIV]{version}[/AIV]" alt="" width="64" popover="Starting point - Search box" popover-trigger="mouseenter">
<img ng-if="config.startMode == 'node'" src="css/images/node.png?v=[AIV]{version}[/AIV]" alt="" width="64" popover="Starting point - Fixed resource" popover-trigger="mouseenter">
<img ng-if="config.startMode == 'query'" src="css/images/query.png?v=[AIV]{version}[/AIV]" alt="" width="64" popover="Starting point - Query results" popover-trigger="mouseenter">
</a>
</td>
<td>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/import.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<link rel="stylesheet" type="text/css" href="css/import.css">
<link rel="stylesheet" type="text/css" href="css/import.css?v=[AIV]{version}[/AIV]">

<div id="wb-import">
<h1>
Expand Down
10 changes: 5 additions & 5 deletions src/pages/jdbc-create.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<link href="css/lib/angular-xeditable/xeditable.min.css" rel="stylesheet">
<link href="css/lib/angular-xeditable/xeditable.min.css?v=[AIV]{version}[/AIV]" rel="stylesheet">

<link href="css/lib/yasqe.min.css" rel="stylesheet"/>
<link href="css/lib/yasqe.min.css?v=[AIV]{version}[/AIV]" rel="stylesheet"/>

<link href="css/new-sparql.css" rel="stylesheet"/>
<link href="css/new-sparql.css?v=[AIV]{version}[/AIV]" rel="stylesheet"/>

<link href="css/graphs-config.css" rel="stylesheet"/>
<link href="css/graphs-config.css?v=[AIV]{version}[/AIV]" rel="stylesheet"/>

<link href="css/jdbc.css" rel="stylesheet"/>
<link href="css/jdbc.css?v=[AIV]{version}[/AIV]" rel="stylesheet"/>

<div class="container-fluid">
<h1>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/monitor/queries.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<title>${messages.app.title} : ${messages.jmx.QueryMonitoringPage.title}</title>

<link href="css/jmx.css" rel="stylesheet" />
<link href="css/jmx.css?v=[AIV]{version}[/AIV]" rel="stylesheet" />

<h1>
{{title}}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/monitor/resources.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

<link href="css/jmx.css" rel="stylesheet" />
<link href="css/jmx.css?v=[AIV]{version}[/AIV]" rel="stylesheet" />

<!-- nvd3 css and js starts-->
<link href="js/lib/nvd3/nv.d3.css" rel="stylesheet" />
<link href="js/lib/nvd3/nv.d3.css?v=[AIV]{version}[/AIV]" rel="stylesheet" />


<div class="hiddenVariables" style="display: none;">
Expand Down
4 changes: 2 additions & 2 deletions src/pages/namespaces.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<link href="css/lib/angular-xeditable/xeditable.min.css" rel="stylesheet">
<link href="css/export.css" rel="stylesheet">
<link href="css/lib/angular-xeditable/xeditable.min.css?v=[AIV]{version}[/AIV]" rel="stylesheet">
<link href="css/export.css?v=[AIV]{version}[/AIV]" rel="stylesheet">

<title>Namespaces</title>

Expand Down
14 changes: 7 additions & 7 deletions src/pages/rdfClassHierarchyInfo.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<link href="css/rdf-class-hierarchy.css" rel="stylesheet"/>
<link href="css/rdf-class-hierarchy-labels.css" rel="stylesheet"/>
<link href="css/rdf-details-side-panel.css" rel="stylesheet"/>
<link href="js/lib/rzslider/rzslider.min.css" rel="stylesheet"/>
<link href="js/lib/angucomplete-alt/angucomplete-alt.css" rel="stylesheet"/>
<link href="js/lib/d3-tip/d3-tip.css" rel="stylesheet"/>
<link href="css/lib/animate/3.2.0/animate.min.css" rel="stylesheet"/>
<link href="css/rdf-class-hierarchy.css?v=[AIV]{version}[/AIV]" rel="stylesheet"/>
<link href="css/rdf-class-hierarchy-labels.css?v=[AIV]{version}[/AIV]" rel="stylesheet"/>
<link href="css/rdf-details-side-panel.css?v=[AIV]{version}[/AIV]" rel="stylesheet"/>
<link href="js/lib/rzslider/rzslider.min.css?v=[AIV]{version}[/AIV]" rel="stylesheet"/>
<link href="js/lib/angucomplete-alt/angucomplete-alt.css?v=[AIV]{version}[/AIV]" rel="stylesheet"/>
<link href="js/lib/d3-tip/d3-tip.css?v=[AIV]{version}[/AIV]" rel="stylesheet"/>
<link href="css/lib/animate/3.2.0/animate.min.css?v=[AIV]{version}[/AIV]" rel="stylesheet"/>

<title>Explore Data Graph</title>

Expand Down
4 changes: 2 additions & 2 deletions src/pages/rdfrank.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<link href="css/rdfrank.css" rel="stylesheet">
<link href="css/lib/ng-tags-input/ng-tags-input.min.css" rel="stylesheet"/>
<link href="css/rdfrank.css?v=[AIV]{version}[/AIV]" rel="stylesheet">
<link href="css/lib/ng-tags-input/ng-tags-input.min.css?v=[AIV]{version}[/AIV]" rel="stylesheet"/>

<div id="rdfRank" class="page">
<h1>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/repositories.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<link href="css/repositories.min.css" rel="stylesheet">
<link href="css/repositories.min.css?v=[AIV]{version}[/AIV]" rel="stylesheet">

<link href="css/lib/bootstrap-switch/bootstrap-switch.min.css" rel="stylesheet">
<link href="css/lib/bootstrap-switch/bootstrap-switch.min.css?v=[AIV]{version}[/AIV]" rel="stylesheet">

<h1>
{{title}}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/repository.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@


<link href="css/repositories.min.css" rel="stylesheet">
<link href="css/repositories.min.css?v=[AIV]{version}[/AIV]" rel="stylesheet">

<link href="css/lib/bootstrap-switch/bootstrap-switch.min.css" rel="stylesheet">
<link href="css/lib/bootstrap-switch/bootstrap-switch.min.css?v=[AIV]{version}[/AIV]" rel="stylesheet">

<div id="wb-repository">
<h1>{{pageTitle}}</h1>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/similarity-indexes.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<link href="css/similarity.css" rel='stylesheet' type='text/css'/>
<link href="css/similarity.css?v=[AIV]{version}[/AIV]" rel='stylesheet' type='text/css'/>

<div class="container-fluid">

Expand Down
6 changes: 3 additions & 3 deletions src/pages/sparql.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<link href="css/lib/angular-xeditable/xeditable.min.css" rel="stylesheet">
<link href="css/lib/angular-xeditable/xeditable.min.css?v=[AIV]{version}[/AIV]" rel="stylesheet">

<link href="css/lib/yasqe.min.css" rel="stylesheet"/>
<link href="css/lib/yasqe.min.css?v=[AIV]{version}[/AIV]" rel="stylesheet"/>

<link href="css/new-sparql.css" rel="stylesheet"/>
<link href="css/new-sparql.css?v=[AIV]{version}[/AIV]" rel="stylesheet"/>
<div id="wb-sparql">

<div ng-show="getActiveRepositoryNoError()" class="pull-right mt-1">
Expand Down
4 changes: 2 additions & 2 deletions src/pages/webapi.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

<link href='css/lib/swagger-ui.min.css' rel='stylesheet' type='text/css'/>
<link href='css/swagger.custom.css' rel='stylesheet' type='text/css'/>
<link href='css/lib/swagger-ui.min.css?v=[AIV]{version}[/AIV]' rel='stylesheet' type='text/css'/>
<link href='css/swagger.custom.css?v=[AIV]{version}[/AIV]' rel='stylesheet' type='text/css'/>

<h1>
{{title}}
Expand Down
Loading

0 comments on commit 0b22676

Please sign in to comment.