Skip to content

Commit 8a79360

Browse files
committed
Bump origin-web-common to 0.0.8, origin-web-catalog to 0.0.4
1 parent c402c32 commit 8a79360

File tree

11 files changed

+399
-439
lines changed

11 files changed

+399
-439
lines changed

app/index.html

-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,6 @@ <h1>JavaScript Required</h1>
316316
<script src="scripts/directives/actionChip.js"></script>
317317
<script src="scripts/directives/templateopt.js"></script>
318318
<script src="scripts/directives/tasks.js"></script>
319-
<script src="scripts/directives/truncate.js"></script>
320319
<script src="scripts/directives/catalog.js"></script>
321320
<script src="scripts/directives/catalog/categoryContent.js"></script>
322321
<script src="scripts/directives/catalog/catalogImage.js"></script>

app/scripts/directives/truncate.js

-33
This file was deleted.

app/scripts/filters/util.js

-77
Original file line numberDiff line numberDiff line change
@@ -348,41 +348,6 @@ angular.module('openshiftConsole')
348348
.replace(/^./, function(str){ return str.toUpperCase(); });
349349
};
350350
})
351-
.filter('parseJSON', function() {
352-
return function(json) {
353-
// return original value if its null or undefined
354-
if (!json) {
355-
return null;
356-
}
357-
358-
// return the parsed obj if its valid
359-
try {
360-
var jsonObj = JSON.parse(json);
361-
if (typeof jsonObj === "object") {
362-
return jsonObj;
363-
}
364-
else {
365-
return null;
366-
}
367-
}
368-
catch (e) {
369-
// it wasn't valid json
370-
return null;
371-
}
372-
};
373-
})
374-
.filter('prettifyJSON', function(parseJSONFilter) {
375-
return function(json) {
376-
var jsonObj = parseJSONFilter(json);
377-
if (jsonObj) {
378-
return JSON.stringify(jsonObj, null, 4);
379-
}
380-
else {
381-
// it wasn't a json object, return the original value
382-
return json;
383-
}
384-
};
385-
})
386351
// Resource is either a resource object, or a name. If resource is a name, kind and namespace must be specified
387352
// Note that builds and deployments can only have their URL built correctly (including their config in the URL)
388353
// if resource is an object
@@ -415,18 +380,6 @@ angular.module('openshiftConsole')
415380
return array.join(separator);
416381
};
417382
})
418-
.filter('generateName', function() {
419-
return function(prefix, length) {
420-
if (!prefix) {
421-
prefix = "";
422-
}
423-
if (!length) {
424-
length = 5;
425-
}
426-
var randomString = Math.round((Math.pow(36, length + 1) - Math.random() * Math.pow(36, length))).toString(36).slice(1);
427-
return prefix + randomString;
428-
};
429-
})
430383
.filter('accessModes', function() {
431384
return function(value, format) {
432385
if (!value) {
@@ -454,36 +407,6 @@ angular.module('openshiftConsole')
454407
return _.uniq(accessModes);
455408
};
456409
})
457-
.filter('truncate', function() {
458-
return function(str, charLimit, useWordBoundary, newlineLimit) {
459-
if (!str) {
460-
return str;
461-
}
462-
463-
var truncated = str;
464-
465-
if (charLimit) {
466-
truncated = truncated.substring(0, charLimit);
467-
}
468-
469-
if (newlineLimit) {
470-
var nthNewline = str.split("\n", newlineLimit).join("\n").length;
471-
truncated = truncated.substring(0, nthNewline);
472-
}
473-
474-
if (useWordBoundary !== false) {
475-
// Find the last word break, but don't look more than 10 characters back.
476-
// Make sure we show at least the first 5 characters.
477-
var startIndex = Math.max(4, charLimit - 10);
478-
var lastSpace = truncated.lastIndexOf(/\s/, startIndex);
479-
if (lastSpace !== -1) {
480-
truncated = truncated.substring(0, lastSpace);
481-
}
482-
}
483-
484-
return truncated;
485-
};
486-
})
487410
.filter('middleEllipses', function() {
488411
/* Adapted from https://github.com/jviotti/angular-middle-ellipses
489412
* Usage: {{ 'MyVeryLongString' | middleEllipses:5:' ... ' }}

app/styles/_core.less

-15
Original file line numberDiff line numberDiff line change
@@ -1285,11 +1285,6 @@ pre.clipped {
12851285
}
12861286
}
12871287

1288-
.pretty-json {
1289-
font-family: @font-family-monospace;
1290-
white-space: pre-wrap;
1291-
}
1292-
12931288
.info-popover, .warnings-popover {
12941289
cursor: help;
12951290
vertical-align: middle;
@@ -1314,13 +1309,3 @@ copy-to-clipboard .input-group.limit-width {
13141309
width: 100%;
13151310
}
13161311
}
1317-
1318-
// Within truncation directive controls spacing between content and toggle link
1319-
.truncation-block {
1320-
margin-right: 10px;
1321-
}
1322-
1323-
.truncation-collapse-link {
1324-
margin-left: 10px;
1325-
white-space: nowrap;
1326-
}

app/views/directives/truncate-long-text.html

-19
This file was deleted.

bower.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
"angular-utf8-base64": "0.0.5",
4848
"file-saver": "1.3.3",
4949
"bootstrap-switch": "3.3.3",
50-
"origin-web-common": "0.0.7",
51-
"origin-web-catalog": "0.0.3"
50+
"origin-web-common": "0.0.8",
51+
"origin-web-catalog": "0.0.4"
5252
},
5353
"devDependencies": {
5454
"angular-mocks": "1.5.11",

dist/scripts/scripts.js

+2-58
Original file line numberDiff line numberDiff line change
@@ -11188,28 +11188,7 @@ return {
1118811188
restrict:"E",
1118911189
templateUrl:"views/_tasks.html"
1119011190
};
11191-
}), angular.module("openshiftConsole").directive("truncateLongText", [ "truncateFilter", function(a) {
11192-
return {
11193-
restrict:"E",
11194-
scope:{
11195-
content:"=",
11196-
limit:"=",
11197-
newlineLimit:"=",
11198-
useWordBoundary:"=",
11199-
expandable:"=",
11200-
keywords:"=highlightKeywords",
11201-
prettifyJson:"="
11202-
},
11203-
templateUrl:"views/directives/truncate-long-text.html",
11204-
link:function(b) {
11205-
b.toggles = {
11206-
expanded:!1
11207-
}, b.$watch("content", function(c) {
11208-
c ? (b.truncatedContent = a(c, b.limit, b.useWordBoundary, b.newlineLimit), b.truncated = b.truncatedContent.length !== c.length) :(b.truncatedContent = null, b.truncated = !1);
11209-
});
11210-
}
11211-
};
11212-
} ]), angular.module("openshiftConsole").directive("catalog", [ "CatalogService", "Constants", "KeywordService", "Logger", function(a, b, c, d) {
11191+
}), angular.module("openshiftConsole").directive("catalog", [ "CatalogService", "Constants", "KeywordService", "Logger", function(a, b, c, d) {
1121311192
return {
1121411193
restrict:"E",
1121511194
scope:{
@@ -14916,22 +14895,7 @@ return a.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b([A-Z]+)([A-Z])([a-z])/,
1491614895
return a.toUpperCase();
1491714896
});
1491814897
};
14919-
}).filter("parseJSON", function() {
14920-
return function(a) {
14921-
if (!a) return null;
14922-
try {
14923-
var b = JSON.parse(a);
14924-
return "object" == typeof b ? b :null;
14925-
} catch (c) {
14926-
return null;
14927-
}
14928-
};
14929-
}).filter("prettifyJSON", [ "parseJSONFilter", function(a) {
14930-
return function(b) {
14931-
var c = a(b);
14932-
return c ? JSON.stringify(c, null, 4) :b;
14933-
};
14934-
} ]).filter("navigateResourceURL", [ "Navigate", function(a) {
14898+
}).filter("navigateResourceURL", [ "Navigate", function(a) {
1493514899
return function(b, c, d, e) {
1493614900
return a.resourceURL(b, c, d, null, {
1493714901
apiVersion:e
@@ -14954,12 +14918,6 @@ return a.yamlURL(b, c);
1495414918
return function(a, b) {
1495514919
return b || (b = ","), a.join(b);
1495614920
};
14957-
}).filter("generateName", function() {
14958-
return function(a, b) {
14959-
a || (a = ""), b || (b = 5);
14960-
var c = Math.round(Math.pow(36, b + 1) - Math.random() * Math.pow(36, b)).toString(36).slice(1);
14961-
return a + c;
14962-
};
1496314921
}).filter("accessModes", function() {
1496414922
return function(a, b) {
1496514923
if (!a) return a;
@@ -14985,20 +14943,6 @@ d = a;
1498514943
c.push(d);
1498614944
}), _.uniq(c);
1498714945
};
14988-
}).filter("truncate", function() {
14989-
return function(a, b, c, d) {
14990-
if (!a) return a;
14991-
var e = a;
14992-
if (b && (e = e.substring(0, b)), d) {
14993-
var f = a.split("\n", d).join("\n").length;
14994-
e = e.substring(0, f);
14995-
}
14996-
if (c !== !1) {
14997-
var g = Math.max(4, b - 10), h = e.lastIndexOf(/\s/, g);
14998-
h !== -1 && (e = e.substring(0, h));
14999-
}
15000-
return e;
15001-
};
1500214946
}).filter("middleEllipses", function() {
1500314947
return function(a, b, c) {
1500414948
if (b < 3) return a;

dist/scripts/templates.js

-23
Original file line numberDiff line numberDiff line change
@@ -8919,29 +8919,6 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
89198919
);
89208920

89218921

8922-
$templateCache.put('views/directives/truncate-long-text.html',
8923-
"<span ng-if=\"!truncated\" ng-bind-html=\"content | highlightKeywords : keywords\" class=\"truncated-content\"></span>\n" +
8924-
"<span ng-if=\"truncated\">\n" +
8925-
"<span ng-if=\"!toggles.expanded\">\n" +
8926-
"<span ng-attr-title=\"{{content}}\" class=\"truncation-block\">\n" +
8927-
"<span ng-bind-html=\"truncatedContent | highlightKeywords : keywords\" class=\"truncated-content\"></span>&hellip;\n" +
8928-
"</span>\n" +
8929-
"<a ng-if=\"expandable\" href=\"\" ng-click=\"toggles.expanded = true\" class=\"nowrap\">See All</a>\n" +
8930-
"</span>\n" +
8931-
"<span ng-if=\"toggles.expanded\">\n" +
8932-
"<div ng-if=\"prettifyJson\" class=\"well\">\n" +
8933-
"<span class=\"pull-right\" style=\"margin-top: -10px\"><a href=\"\" ng-click=\"toggles.expanded = false\" class=\"truncation-collapse-link\">Collapse</a></span>\n" +
8934-
"<span ng-bind-html=\"content | prettifyJSON | highlightKeywords : keywords\" class=\"pretty-json truncated-content\"></span>\n" +
8935-
"</div>\n" +
8936-
"<span ng-if=\"!prettifyJson\">\n" +
8937-
"<span class=\"pull-right\"><a href=\"\" ng-click=\"toggles.expanded = false\" class=\"truncation-collapse-link\">Collapse</a></span>\n" +
8938-
"<span ng-bind-html=\"content | highlightKeywords : keywords\" class=\"truncated-content\"></span>\n" +
8939-
"</span>\n" +
8940-
"</span>\n" +
8941-
"</span>"
8942-
);
8943-
8944-
89458922
$templateCache.put('views/edit/autoscaler.html',
89468923
"<default-header class=\"top-header\"></default-header>\n" +
89478924
"<div class=\"wrap no-sidebar\">\n" +

0 commit comments

Comments
 (0)