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
ac8f8d04
Commit
ac8f8d04
authored
Jan 29, 2018
by
Samuel Padgett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 1539566 - Add DataService methods for getting server version
See
https://bugzilla.redhat.com/show_bug.cgi?id=1539566
parent
495aa646
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
81 additions
and
0 deletions
+81
-0
origin-web-common-services.js
dist/origin-web-common-services.js
+22
-0
origin-web-common.js
dist/origin-web-common.js
+22
-0
origin-web-common.min.js
dist/origin-web-common.min.js
+15
-0
dataService.js
src/services/dataService.js
+22
-0
No files found.
dist/origin-web-common-services.js
View file @
ac8f8d04
...
@@ -2768,6 +2768,28 @@ DataService.prototype.createStream = function(resource, name, context, opts, isR
...
@@ -2768,6 +2768,28 @@ DataService.prototype.createStream = function(resource, name, context, opts, isR
return
new
URI
({
protocol
:
protocol
,
hostname
:
hostPort
}).
toString
();
return
new
URI
({
protocol
:
protocol
,
hostname
:
hostPort
}).
toString
();
};
};
DataService
.
prototype
.
_getAPIServerVersion
=
function
(
path
)
{
var
protocol
=
window
.
location
.
protocol
===
"http:"
?
"http"
:
"https"
;
var
versionURL
=
new
URI
({
protocol
:
protocol
,
hostname
:
API_CFG
.
k8s
.
hostPort
,
path
:
path
}).
toString
();
return
$http
.
get
(
versionURL
,
{
headers
:
{
Accept
:
'application/json'
}
});
};
DataService
.
prototype
.
getKubernetesMasterVersion
=
function
()
{
return
this
.
_getAPIServerVersion
(
'/version'
);
};
DataService
.
prototype
.
getOpenShiftMasterVersion
=
function
()
{
return
this
.
_getAPIServerVersion
(
'/version/openshift'
);
};
// Used by ProjectsService when a list fails.
// Used by ProjectsService when a list fails.
DataService
.
prototype
.
createData
=
function
(
array
)
{
DataService
.
prototype
.
createData
=
function
(
array
)
{
return
new
Data
(
array
);
return
new
Data
(
array
);
...
...
dist/origin-web-common.js
View file @
ac8f8d04
...
@@ -4819,6 +4819,28 @@ DataService.prototype.createStream = function(resource, name, context, opts, isR
...
@@ -4819,6 +4819,28 @@ DataService.prototype.createStream = function(resource, name, context, opts, isR
return
new
URI
({
protocol
:
protocol
,
hostname
:
hostPort
}).
toString
();
return
new
URI
({
protocol
:
protocol
,
hostname
:
hostPort
}).
toString
();
};
};
DataService
.
prototype
.
_getAPIServerVersion
=
function
(
path
)
{
var
protocol
=
window
.
location
.
protocol
===
"http:"
?
"http"
:
"https"
;
var
versionURL
=
new
URI
({
protocol
:
protocol
,
hostname
:
API_CFG
.
k8s
.
hostPort
,
path
:
path
}).
toString
();
return
$http
.
get
(
versionURL
,
{
headers
:
{
Accept
:
'application/json'
}
});
};
DataService
.
prototype
.
getKubernetesMasterVersion
=
function
()
{
return
this
.
_getAPIServerVersion
(
'/version'
);
};
DataService
.
prototype
.
getOpenShiftMasterVersion
=
function
()
{
return
this
.
_getAPIServerVersion
(
'/version/openshift'
);
};
// Used by ProjectsService when a list fails.
// Used by ProjectsService when a list fails.
DataService
.
prototype
.
createData
=
function
(
array
)
{
DataService
.
prototype
.
createData
=
function
(
array
)
{
return
new
Data
(
array
);
return
new
Data
(
array
);
...
...
dist/origin-web-common.min.js
View file @
ac8f8d04
...
@@ -2128,6 +2128,21 @@ return new URI({
...
@@ -2128,6 +2128,21 @@ return new URI({
protocol
:
protocol
,
protocol
:
protocol
,
hostname
:
hostPort
hostname
:
hostPort
}).
toString
();
}).
toString
();
},
DataService
.
prototype
.
_getAPIServerVersion
=
function
(
path
)
{
var
protocol
=
"http:"
===
window
.
location
.
protocol
?
"http"
:
"https"
,
versionURL
=
new
URI
({
protocol
:
protocol
,
hostname
:
API_CFG
.
k8s
.
hostPort
,
path
:
path
}).
toString
();
return
$http
.
get
(
versionURL
,
{
headers
:{
Accept
:
"application/json"
}
});
},
DataService
.
prototype
.
getKubernetesMasterVersion
=
function
()
{
return
this
.
_getAPIServerVersion
(
"/version"
);
},
DataService
.
prototype
.
getOpenShiftMasterVersion
=
function
()
{
return
this
.
_getAPIServerVersion
(
"/version/openshift"
);
},
DataService
.
prototype
.
createData
=
function
(
array
)
{
},
DataService
.
prototype
.
createData
=
function
(
array
)
{
return
new
Data
(
array
);
return
new
Data
(
array
);
};
};
...
...
src/services/dataService.js
View file @
ac8f8d04
...
@@ -1370,6 +1370,28 @@ DataService.prototype.createStream = function(resource, name, context, opts, isR
...
@@ -1370,6 +1370,28 @@ DataService.prototype.createStream = function(resource, name, context, opts, isR
return
new
URI
({
protocol
:
protocol
,
hostname
:
hostPort
}).
toString
();
return
new
URI
({
protocol
:
protocol
,
hostname
:
hostPort
}).
toString
();
};
};
DataService
.
prototype
.
_getAPIServerVersion
=
function
(
path
)
{
var
protocol
=
window
.
location
.
protocol
===
"http:"
?
"http"
:
"https"
;
var
versionURL
=
new
URI
({
protocol
:
protocol
,
hostname
:
API_CFG
.
k8s
.
hostPort
,
path
:
path
}).
toString
();
return
$http
.
get
(
versionURL
,
{
headers
:
{
Accept
:
'application/json'
}
});
};
DataService
.
prototype
.
getKubernetesMasterVersion
=
function
()
{
return
this
.
_getAPIServerVersion
(
'/version'
);
};
DataService
.
prototype
.
getOpenShiftMasterVersion
=
function
()
{
return
this
.
_getAPIServerVersion
(
'/version/openshift'
);
};
// Used by ProjectsService when a list fails.
// Used by ProjectsService when a list fails.
DataService
.
prototype
.
createData
=
function
(
array
)
{
DataService
.
prototype
.
createData
=
function
(
array
)
{
return
new
Data
(
array
);
return
new
Data
(
array
);
...
...
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