Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
origin-web-common
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Java-于龙
origin-web-common
Commits
4939a96e
Commit
4939a96e
authored
Mar 24, 2017
by
Samuel Padgett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add generateName filter
parent
99b8a398
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
0 deletions
+36
-0
origin-web-common-ui.js
dist/origin-web-common-ui.js
+12
-0
origin-web-common.js
dist/origin-web-common.js
+12
-0
origin-web-common.min.js
dist/origin-web-common.min.js
+0
-0
util.js
src/filters/util.js
+12
-0
No files found.
dist/origin-web-common-ui.js
View file @
4939a96e
...
@@ -1022,4 +1022,16 @@ angular.module('openshiftCommonUI')
...
@@ -1022,4 +1022,16 @@ angular.module('openshiftCommonUI')
if
(
!
hash
)
{
return
0
;
}
if
(
!
hash
)
{
return
0
;
}
return
Object
.
keys
(
hash
).
length
;
return
Object
.
keys
(
hash
).
length
;
};
};
})
.
filter
(
'generateName'
,
function
()
{
return
function
(
prefix
,
length
)
{
if
(
!
prefix
)
{
prefix
=
""
;
}
if
(
!
length
)
{
length
=
5
;
}
var
randomString
=
Math
.
round
((
Math
.
pow
(
36
,
length
+
1
)
-
Math
.
random
()
*
Math
.
pow
(
36
,
length
))).
toString
(
36
).
slice
(
1
);
return
prefix
+
randomString
;
};
});
});
dist/origin-web-common.js
View file @
4939a96e
...
@@ -1227,6 +1227,18 @@ angular.module('openshiftCommonUI')
...
@@ -1227,6 +1227,18 @@ angular.module('openshiftCommonUI')
if
(
!
hash
)
{
return
0
;
}
if
(
!
hash
)
{
return
0
;
}
return
Object
.
keys
(
hash
).
length
;
return
Object
.
keys
(
hash
).
length
;
};
};
})
.
filter
(
'generateName'
,
function
()
{
return
function
(
prefix
,
length
)
{
if
(
!
prefix
)
{
prefix
=
""
;
}
if
(
!
length
)
{
length
=
5
;
}
var
randomString
=
Math
.
round
((
Math
.
pow
(
36
,
length
+
1
)
-
Math
.
random
()
*
Math
.
pow
(
36
,
length
))).
toString
(
36
).
slice
(
1
);
return
prefix
+
randomString
;
};
});
});
;
'use strict'
;
;
'use strict'
;
...
...
dist/origin-web-common.min.js
View file @
4939a96e
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/filters/util.js
View file @
4939a96e
...
@@ -24,4 +24,16 @@ angular.module('openshiftCommonUI')
...
@@ -24,4 +24,16 @@ angular.module('openshiftCommonUI')
if
(
!
hash
)
{
return
0
;
}
if
(
!
hash
)
{
return
0
;
}
return
Object
.
keys
(
hash
).
length
;
return
Object
.
keys
(
hash
).
length
;
};
};
})
.
filter
(
'generateName'
,
function
()
{
return
function
(
prefix
,
length
)
{
if
(
!
prefix
)
{
prefix
=
""
;
}
if
(
!
length
)
{
length
=
5
;
}
var
randomString
=
Math
.
round
((
Math
.
pow
(
36
,
length
+
1
)
-
Math
.
random
()
*
Math
.
pow
(
36
,
length
))).
toString
(
36
).
slice
(
1
);
return
prefix
+
randomString
;
};
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment