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
26496544
Commit
26496544
authored
May 09, 2017
by
Samuel Padgett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DataService.delete should cascade by default
parent
23923bd9
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
19 deletions
+33
-19
origin-web-common-services.js
dist/origin-web-common-services.js
+9
-5
origin-web-common.js
dist/origin-web-common.js
+9
-5
origin-web-common.min.js
dist/origin-web-common.min.js
+6
-4
dataService.js
src/services/dataService.js
+9
-5
No files found.
dist/origin-web-common-services.js
View file @
26496544
...
...
@@ -1146,14 +1146,18 @@ angular.module('openshiftCommonServices')
var
deferred
=
$q
.
defer
();
var
self
=
this
;
var
data
,
headers
=
{};
// Differentiate between 0 and undefined
if
(
_
.
has
(
opts
,
'gracePeriodSeconds'
))
{
data
=
{
var
data
=
{
kind
:
"DeleteOptions"
,
apiVersion
:
"v1"
,
gracePeriodSeconds
:
opts
.
gracePeriodSeconds
// Default to "Foreground" (cascading) if no propagationPolicy was given.
propagationPolicy
:
opts
.
propagationPolicy
||
"Foreground"
};
var
headers
=
{
'Content-Type'
:
'application/json'
};
headers
[
'Content-Type'
]
=
'application/json'
;
// Differentiate between 0 and undefined
if
(
_
.
has
(
opts
,
'gracePeriodSeconds'
))
{
data
.
gracePeriodSeconds
=
opts
.
gracePeriodSeconds
;
}
this
.
_getNamespace
(
resource
,
context
,
opts
).
then
(
function
(
ns
){
$http
(
angular
.
extend
({
...
...
dist/origin-web-common.js
View file @
26496544
...
...
@@ -2492,14 +2492,18 @@ angular.module('openshiftCommonServices')
var
deferred
=
$q
.
defer
();
var
self
=
this
;
var
data
,
headers
=
{};
// Differentiate between 0 and undefined
if
(
_
.
has
(
opts
,
'gracePeriodSeconds'
))
{
data
=
{
var
data
=
{
kind
:
"DeleteOptions"
,
apiVersion
:
"v1"
,
gracePeriodSeconds
:
opts
.
gracePeriodSeconds
// Default to "Foreground" (cascading) if no propagationPolicy was given.
propagationPolicy
:
opts
.
propagationPolicy
||
"Foreground"
};
var
headers
=
{
'Content-Type'
:
'application/json'
};
headers
[
'Content-Type'
]
=
'application/json'
;
// Differentiate between 0 and undefined
if
(
_
.
has
(
opts
,
'gracePeriodSeconds'
))
{
data
.
gracePeriodSeconds
=
opts
.
gracePeriodSeconds
;
}
this
.
_getNamespace
(
resource
,
context
,
opts
).
then
(
function
(
ns
){
$http
(
angular
.
extend
({
...
...
dist/origin-web-common.min.js
View file @
26496544
...
...
@@ -1025,12 +1025,14 @@ var key = this._uniqueKey(resource, null, context, _.get(opts, "http.params")),
return
callback
&&
deferred
.
promise
.
then
(
callback
),
this
.
_isCached
(
key
)
?
deferred
.
resolve
(
this
.
_data
(
key
))
:
this
.
_listInFlight
(
key
)
||
this
.
_startListOp
(
resource
,
context
,
opts
),
deferred
.
promise
;
},
DataService
.
prototype
[
"delete"
]
=
function
(
resource
,
name
,
context
,
opts
)
{
resource
=
APIService
.
toResourceGroupVersion
(
resource
),
opts
=
opts
||
{};
var
data
,
deferred
=
$q
.
defer
(),
self
=
this
,
headers
=
{};
return
_
.
has
(
opts
,
"gracePeriodSeconds"
)
&&
(
data
=
{
var
data
,
deferred
=
$q
.
defer
(),
self
=
this
,
headers
=
{},
data
=
{
kind
:
"DeleteOptions"
,
apiVersion
:
"v1"
,
gracePeriodSeconds
:
opts
.
gracePeriodSeconds
},
headers
[
"Content-Type"
]
=
"application/json"
),
this
.
_getNamespace
(
resource
,
context
,
opts
).
then
(
function
(
ns
)
{
propagationPolicy
:
opts
.
propagationPolicy
||
"Foreground"
},
headers
=
{
"Content-Type"
:
"application/json"
};
return
_
.
has
(
opts
,
"gracePeriodSeconds"
)
&&
(
data
.
gracePeriodSeconds
=
opts
.
gracePeriodSeconds
),
this
.
_getNamespace
(
resource
,
context
,
opts
).
then
(
function
(
ns
)
{
$http
(
angular
.
extend
({
method
:
"DELETE"
,
auth
:{},
...
...
src/services/dataService.js
View file @
26496544
...
...
@@ -147,14 +147,18 @@ angular.module('openshiftCommonServices')
var
deferred
=
$q
.
defer
();
var
self
=
this
;
var
data
,
headers
=
{};
// Differentiate between 0 and undefined
if
(
_
.
has
(
opts
,
'gracePeriodSeconds'
))
{
data
=
{
var
data
=
{
kind
:
"DeleteOptions"
,
apiVersion
:
"v1"
,
gracePeriodSeconds
:
opts
.
gracePeriodSeconds
// Default to "Foreground" (cascading) if no propagationPolicy was given.
propagationPolicy
:
opts
.
propagationPolicy
||
"Foreground"
};
var
headers
=
{
'Content-Type'
:
'application/json'
};
headers
[
'Content-Type'
]
=
'application/json'
;
// Differentiate between 0 and undefined
if
(
_
.
has
(
opts
,
'gracePeriodSeconds'
))
{
data
.
gracePeriodSeconds
=
opts
.
gracePeriodSeconds
;
}
this
.
_getNamespace
(
resource
,
context
,
opts
).
then
(
function
(
ns
){
$http
(
angular
.
extend
({
...
...
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