“V_1.0”

This commit is contained in:
wm 2016-06-28 10:22:53 +08:00
commit 98ff399ee6
257 changed files with 55538 additions and 0 deletions

3
.bowerrc Normal file
View File

@ -0,0 +1,3 @@
{
"directory" : "libs"
}

9
.gitignore vendored Normal file
View File

@ -0,0 +1,9 @@
node_modules/
libs/
site/
.idea
*.cer
*.req
*.key
serial
osconsole/config.js

22
Dockerfile Normal file
View File

@ -0,0 +1,22 @@
FROM centos:centos7
MAINTAINER Jimmi Dyson <jimmidyson@gmail.com>
ENTRYPOINT ["/kuisp"]
CMD [ "-p", "9090", \
"-c", "/site/osconsole/config.js.tmpl=/site/osconsole/config.js", \
"--default-page=/index.html", \
"--max-age=24h", \
"--compress" ]
EXPOSE 9090
ENV KUISP_VERSION 0.10
RUN yum install -y tar && \
yum clean all && \
curl -L https://github.com/jimmidyson/kuisp/releases/download/v${KUISP_VERSION}/kuisp-${KUISP_VERSION}-linux-amd64.tar.gz | \
tar xzv
COPY site /site/
RUN chmod 777 /site/osconsole/
WORKDIR /site/
USER nobody

202
LICENSE.txt Normal file
View File

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

61
ReadMe.md Normal file
View File

@ -0,0 +1,61 @@
## hawtio-kubernetes [![Circle CI](https://circleci.com/gh/hawtio/hawtio-kubernetes.svg?style=svg)](https://circleci.com/gh/hawtio/hawtio-kubernetes)
This plugin provides a [Kubernetes](http://kubernetes.io/) console for hawtio
![controllers tab screenshot](http://fabric8.io/v2/images/controllers.png)
### Running
#### Running a release
If you have a [Kubernetes](http://kubernetes.io/) or [OpenShift](http://www.openshift.org/) environment, the easiest way to try out this console is to just run the app directly in kubernetes via [these instructions](http://fabric8.io/v2/console.html#running-the-console-on-kubernetesopenshift)
Or you can try running the [fabric8/hawtio-kubernetes docker image](https://registry.hub.docker.com/u/fabric8/hawtio-kubernetes/):
docker pull fabric8/hawtio-kubernetes
docker run -it -p 9090:9090 -e KUBERNETES_SERVICE_HOST=$DOCKER_IP fabric8/hawtio-kubernetes
Where **DOCKER_IP** is the IP address or host running the kubernetes master.
#### Running this plugin locally
First clone the source
git clone https://github.com/hawtio/hawtio-kubernetes.git
cd hawtio-kubernetes
Next you'll need to [install NodeJS](http://nodejs.org/download/) and then install the default global npm dependencies:
npm install -g bower gulp slush slush-hawtio-javascript slush-hawtio-typescript typescript
Then install all local nodejs packages and update bower dependencies via:
npm install
bower update
Next you need to setup the **KUBERNETES_MASTER** environment variable to point to the kubernetes master you want to run against. e.g.
export KUBERNETES_MASTER=https://$DOCKER_IP:8443
Where **DOCKER_IP** is the IP address or host running the kubernetes master.
If you need to disable OAUTH authentication in development try use **DISABLE_OAUTH**:
export DISABLE_OAUTH=true
Then to run the web application:
gulp
#### Install the bower package
`bower install --save hawtio-kubernetes`
#### Output build to a different directory
When developing this plugin in a dependent console you can change the output directory where the compiled .js and .css go. Just use the 'out' flag to set a different output directory, for example:
`gulp watch --out=../fabric8-console/libs/hawtio-kubernetes/dist/`
Whenever the build completes the compiled .js file will be put into the target directory. Don't forget to first do a `gulp build` without this flag before committing changes!

0
app/controllerHelp.js Normal file
View File

37
app/my.js Normal file
View File

@ -0,0 +1,37 @@
function Recursion(node){
var count=0;
for (var key in node) {
count++;
var value = node[key];
delete node[key];
//如果node为叶子节点
if (key.toString() == '$') {
for (var attr in value)
node[attr] = value[attr];
} else {
if (value instanceof Array) {
if (value.length > 0) {
node["children"] = value;
for (var obj in value)
Recursion(value[obj]);
}
}
}
}
if(count==1)
node["children"]=[];
}
function randomString(len) {
len = len || 32;
var $chars = 'abcdefhijkmnprstwxyz'; // 默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1
var maxPos = $chars.length;
var pwd = '';
for (i = 0; i < len; i++) {
pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
}
return pwd;
}
exports.randomString=randomString;
exports.Recursion=Recursion;

213
app/resumable-node.js Normal file
View File

@ -0,0 +1,213 @@
var fs = require('fs'), path = require('path'), util = require('util'), Stream = require('stream').Stream;
module.exports = resumable = function(temporaryFolder){
var $ = this;
$.temporaryFolder = temporaryFolder;
$.maxFileSize = null;
$.fileParameterName = 'file';
try {
fs.mkdirSync($.temporaryFolder);
}catch(e){}
var cleanIdentifier = function(identifier){
return identifier.replace(/^0-9A-Za-z_-/img, '');
}
var getChunkFilename = function(chunkNumber, identifier){
// Clean up the identifier
identifier = cleanIdentifier(identifier);
// What would the file name be?
return path.join($.temporaryFolder, './resumable-'+identifier+'.'+chunkNumber);
}
var validateRequest = function(chunkNumber, chunkSize, totalSize, identifier, filename, fileSize){
// Clean up the identifier
identifier = cleanIdentifier(identifier);
// Check if the request is sane
if (chunkNumber==0 || chunkSize==0 || totalSize==0 || identifier.length==0 || filename.length==0) {
return 'non_resumable_request';
}
var numberOfChunks = Math.max(Math.floor(totalSize/(chunkSize*1.0)), 1);
if (chunkNumber>numberOfChunks) {
return 'invalid_resumable_request1';
}
// Is the file too big?
if($.maxFileSize && totalSize>$.maxFileSize) {
return 'invalid_resumable_request2';
}
if(typeof(fileSize)!='undefined') {
if(chunkNumber<numberOfChunks && fileSize!=chunkSize) {
// The chunk in the POST request isn't the correct size
return 'invalid_resumable_request3';
}
if(numberOfChunks>1 && chunkNumber==numberOfChunks && fileSize!=((totalSize%chunkSize)+chunkSize)) {
// The chunks in the POST is the last one, and the fil is not the correct size
return 'invalid_resumable_request4';
}
if(numberOfChunks==1 && fileSize!=totalSize) {
// The file is only a single chunk, and the data size does not fit
return 'invalid_resumable_request5';
}
}
return 'valid';
}
//'found', filename, original_filename, identifier
//'not_found', null, null, null
$.get = function(req, callback){
var chunkNumber = req.param('resumableChunkNumber', 0);
var chunkSize = req.param('resumableChunkSize', 0);
var totalSize = req.param('resumableTotalSize', 0);
var identifier = req.param('resumableIdentifier', "");
var filename = req.param('resumableFilename', "");
if(validateRequest(chunkNumber, chunkSize, totalSize, identifier, filename)=='valid') {
var chunkFilename = getChunkFilename(chunkNumber, identifier);
fs.exists(chunkFilename, function(exists){
if(exists){
callback('found', chunkFilename, filename, identifier);
} else {
callback('not_found', chunkFilename, filename, identifier);
}
});
} else {
callback('not_found2', chunkFilename, filename, identifier);
}
}
//'partly_done', filename, original_filename, identifier
//'done', filename, original_filename, identifier
//'invalid_resumable_request', null, null, null
//'non_resumable_request', null, null, null
$.post = function(req, callback){
var fields = req.body;
var files = req.files;
var chunkNumber = fields['resumableChunkNumber'];
var chunkSize = fields['resumableChunkSize'];
var totalSize = fields['resumableTotalSize'];
var identifier = cleanIdentifier(fields['resumableIdentifier']);
var filename = fields['resumableFilename'];
var original_filename = fields['resumableIdentifier'];
if(!files[$.fileParameterName] || !files[$.fileParameterName].size) {
callback('invalid_resumable_request', null, null, null);
return;
}
var validation = validateRequest(chunkNumber, chunkSize, totalSize, identifier, files[$.fileParameterName].size);
if(validation=='valid') {
var chunkFilename = getChunkFilename(chunkNumber, identifier);
// Save the chunk (TODO: OVERWRITE)
fs.rename(files[$.fileParameterName].path, chunkFilename, function(){
// Do we have all the chunks?
var currentTestChunk = 1;
var numberOfChunks = Math.max(Math.floor(totalSize/(chunkSize*1.0)), 1);
var testChunkExists = function(){
fs.exists(getChunkFilename(currentTestChunk, identifier), function(exists){
if(exists){
currentTestChunk++;
if(currentTestChunk>numberOfChunks) {
callback('done', filename, original_filename, identifier);
} else {
// Recursion
testChunkExists();
}
} else {
callback('partly_done', filename, original_filename, identifier);
}
});
}
testChunkExists();
});
} else {
callback(validation, filename, original_filename, identifier);
}
}
// Pipe chunks directly in to an existsing WritableStream
// r.write(identifier, response);
// r.write(identifier, response, {end:false});
//
// var stream = fs.createWriteStream(filename);
// r.write(identifier, stream);
// stream.on('data', function(data){...});
// stream.on('end', function(){...});
$.write = function(identifier, writableStream, options) {
options = options || {};
options.end = (typeof options['end'] == 'undefined' ? true : options['end']);
// Iterate over each chunk
var pipeChunk = function(number) {
var chunkFilename = getChunkFilename(number, identifier);
fs.exists(chunkFilename, function(exists) {
if (exists) {
// If the chunk with the current number exists,
// then create a ReadStream from the file
// and pipe it to the specified writableStream.
var sourceStream = fs.createReadStream(chunkFilename);
sourceStream.pipe(writableStream, {
end: false
});
sourceStream.on('end', function() {
// When the chunk is fully streamed,
// jump to the next one
pipeChunk(number + 1);
});
} else {
// When all the chunks have been piped, end the stream
if (options.end) writableStream.end();
if (options.onDone) options.onDone();
}
});
}
pipeChunk(1);
}
$.clean = function(identifier, options) {
options = options || {};
// Iterate over each chunk
var pipeChunkRm = function(number) {
var chunkFilename = getChunkFilename(number, identifier);
//console.log('removing pipeChunkRm ', number, 'chunkFilename', chunkFilename);
fs.exists(chunkFilename, function(exists) {
if (exists) {
console.log('exist removing ', chunkFilename);
fs.unlink(chunkFilename, function(err) {
if (err && options.onError) options.onError(err);
});
pipeChunkRm(number + 1);
} else {
if (options.onDone) options.onDone();
}
});
}
pipeChunkRm(1);
}
return $;
}

1086
app/resumable.js Normal file

File diff suppressed because it is too large Load Diff

216
app/style.css Normal file
View File

@ -0,0 +1,216 @@
/* 样式重置 */
body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{ margin:0; padding:0;}
body,table,input,textarea,select,button { font-family: "微软雅黑","宋体"; font-size:12px;line-height:1.5; background:#fff;}
div,img,tr,td,table{ border:0;}
table,tr,td{border:0;cellspacing:0; cellpadding:0;}
ol,ul,li{ list-style-type:none}
a:link,a:visited{color:#7f7f7f;text-decoration:none;}
a:hover,a:active{color:#000;}
.fl{ float:left;}
.fr{ float:right;}
.cl{ clear:both; overflow:hidden;}
/* 数据页面 */
.data_container{
width:100%;
margin:0 auto;
}
.data_heaer{
height:66px;
width:100%;
background-color:#3499db;
text-align:center;
}
.data_heaer h2{
font-size:30px;
font-weight:300;
color:#fff;
line-height:66px;
}
.data_content{
width:1280px;
height:838px;
margin:0 auto;
background-color:#fff;
border:1px solid #e0dede;
border-top:none;
}
.data_leftside{
width:612px;
border-right:1px solid #e0dede;
}
.data_h3{
width:100%;
text-align:center;
height:50px;
font-size:18px;
color:#444;
line-height:50px;
}
.data_leftside_files{
border-right:1px solid #e0dede;
border-bottom:1px solid #e0dede;
height:710px;
overflow :auto;
}
.data_leftside_files input{
margin-top:15px;
width:15px;
height:15px;
}
.data_leftside_files li{
height:40px;
line-height:40px;
border-bottom:1px solid #e0dede;
padding:0 10px;
}
.data_leftside_files li.data_title{
width:210px; height:36px;
line-height:36px;
text-align:center;
background-color:#e9f3fb;
border:none;
overflow:hidden;
text-overflow:ellipsis;
-o-text-overflow:ellipsis;
white-space:nowrap;
}
.date_label{
display:block;
width:168px;
overflow:hidden;
text-overflow:ellipsis;
-o-text-overflow:ellipsis;
white-space:nowrap;
}
.data_leftside_shu{
border-right:none;
}
.data_leftside_shu li{
border-bottom:none;
}
.data_conbar{ width:149px;
height:834px;
border-right:1px solid #e0dede;
border-left:1px solid #e0dede;
}
.date_btns{
width:260px;
margin:20px auto;
}
.date_btns_w{
width:390px;
}
.date_btns button{
margin:10px 20px;
}
.data_btn{
border:none;
width:108px;
height:35px;
line-height:35px;
text-align:center;
background-color:#3499db;
color:#fff;
font-size:14px;
-webkit-border-radius:5px;
-moz-border-radius:5px;
-o-border-radius:5px;
border-radius:5px;
}
.data_btn:hover{
background-color:#2989da;
}
.data_rightside{
width:667px;
}
.data_rightside_w{
width:407px;
}
.data_leftside_files li.data_title_w{
width:183px;
}
.date_label_w{
width:150px;
}
.data_leftside_shu li{
border-bottom:none;
}
a.data_file_btn{ display:block; position:relative; width:108px; height:35px; margin:15px auto; line-height:35px; font-size:14px; color: #fff; text-align:center;
background-color: #79b4e7;
background-image: -webkit-linear-gradient(#79b4e7, #1377cf);
background-image: linear-gradient(#79b4e7, #1377cf);
border-color: #076bc2;
-webkit-border-radius:5px;
-moz-border-radius:5px;
-o-border-radius:5px;
border-radius:5px;
vertical-align: middle;
cursor: pointer;
margin:0 10px;
}
a:hover.data_file_btn{
background-color: #076bc2;
background-image: -webkit-linear-gradient(#79b4e7, #076bc2);
background-image: linear-gradient(#79b4e7, #076bc2);
border-color: #076bc2;}
.data_file_btn input{ position:absolute; left:0px;opacity:0; filter:alpha(opacity=0); width:108px; height:35px;}
.data_conbox{
width:407px;
height:709px;
border-top:1px solid #e0dede;
border-bottom:1px solid #e0dede;
overflow: auto;
}
.data_con_title{
width:49.8%;
height:36px;
line-height:36px;
text-align:center;
background-color:#e9f3fb;
overflow:hidden;
text-overflow:ellipsis;
-o-text-overflow:ellipsis;
white-space:nowrap;
}
.data_con_line{
border-right:1px solid #e0dede;
}
.data_con_li{
width:49.8%;
height:36px;
line-height:36px;
overflow:hidden;
text-overflow:ellipsis;
-o-text-overflow:ellipsis;
white-space:nowrap;
border-bottom:1px solid #e0dede;
}
.mt15{ margin-top:15px;}
/* 树形结构 */
.data_rightside_tree{
width:259px;
height:709px;
border-right:1px solid #e0dede;
border-top:1px solid #e0dede;
border-bottom:1px solid #e0dede;
overflow: auto;
}
.tree { min-height:20px;padding:15px;padding-left:30px;border-bottom:1px dashed #ccc;}
.tree li {list-style-type:none;margin:0; padding:10px 5px 0 20px; position:relative}
.tree li::before, .tree li::after { content:'';left:-30px;position:absolute; right:auto}
.tree li::before { border-left:1px solid #999; bottom:50px;height:100%; top:0; width:0px}
.tree li::after {border-top:1px solid #999;height:20px; top:25px; width:35px}
.tree li p {display:inline-block;padding:3px 10px;border:1px solid #fff; margin-left:-15px; width:150px; }
.tree li.parent_li>p {cursor:pointer}
.tree>ul>li::before, .tree>ul>li::after {border:0}
.tree li:last-child::before { height:30px}
.tree li.parent_li>p:hover, .tree li.parent_li>p:hover+ul li p { }
.icon-plus-sign{ margin-left:-15px; background:url(../img/icons1.gif) -5px 10px no-repeat; }
.icon-minus-sign{ margin-left:-15px; background:url(../img/icons2.gif) -6px 9px no-repeat;}

558
app/xmloperation.js Normal file
View File

@ -0,0 +1,558 @@
var fs = require('fs');
var dom = require("xmldom").DOMParser;
var select = require('xpath.js');
var dataDetailPath = "/home/server_data/data-detail.xml"
var dataPath = "/home/server_data/data.xml"
var versionPath = "/home/server_data/version.txt"
//<2F><><EFBFBD><EFBFBD>fileId<49><64><EFBFBD><EFBFBD>ȡ<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>ŵ<EFBFBD>λ<EFBFBD><CEBB>
function getVersionPath(fileId){
fileId = fileId.replace(/\"/g, "");
var item = "<item";
// fs<66><73>ȡ<EFBFBD><C8A1> xmldomת<6D><D7AA><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>
var filedata = fs.readFileSync(dataDetailPath, "utf-8");
var itemArray = filedata.split(item);
var itemsize = itemArray.length;
var version = {value:0};
// ͬһ<CDAC><D2BB>id,<2C><>Ӧ<EFBFBD><D3A6>item<65>ж<EFBFBD><D0B6>ٸ<EFBFBD><D9B8><EFBFBD>
for(var i = 1; i < itemsize; i++){
if(itemArray[i].indexOf(fileId)!= -1){
var oldBigVersion = itemArray[i].split("<version>")[1].split("</version>")[0];
if(version.value < oldBigVersion){
version.value = oldBigVersion;
}
}
}
version.value ++;
return version.value;
}
function mkdataForPage(collecttime, realtype, realpath, realbatch, realid, realname, version){
// var resultXmlData = "";
// var realpath = "/uplaods/";
// var realtype = "01";
// var realbatch = "01_A";
// var realid = "32550_111";
// var realname = "<22>Ͼ<EFBFBD><CFBE><EFBFBD>_<EFBFBD><5F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>_<EFBFBD><5F>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>ϵͳ";
//json<6F><6E><EFBFBD>Եĸ<D4B5>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>@
var type ="id=\""+realtype+"\"";
var batch = "id=\""+realtype+"_"+realbatch+"\"";
var id = realtype+"_"+realbatch+"_"+realid+"\"";
var versionid = realtype+"_"+realbatch + "_"+realid + "_" + version +"\"";
var name = "name=\""+realname+"\"";
var path = "path=\""+realpath+"\"";
var versionstrutf = fs.readFileSync(versionPath, "utf-8");
console.log(typeof versionstrutf);
console.log("------------- mkdataForPage --------------");
fs.readFile(dataPath, "utf-8", function(err, data){
if(err){
console.log("<22><>ȡ<EFBFBD>ļ<EFBFBD> "+dataDetailPath+" fail " + err);
}
else{
var dataNodes = data.split("<node");
var istype ="0";
var isbatch ="0";
var isexist ="0";
var sizel = dataNodes.length;
for(var i=0; i < sizel; i++){
if(dataNodes[i].indexOf(type) != -1)
{
istype ="1";
}
if((istype == "1") && (dataNodes[i].indexOf(batch) != -1))
{
isbatch ="1";
}
//id<69><64><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ψһ<CEA8>ģ<EFBFBD> <node id="32550_113"
if(isbatch == "1")
{//<2F><><EFBFBD><EFBFBD><EFBFBD>ӵİ汾
var nodestr = "";
if(dataNodes[i].indexOf(id) != -1){
nodestr = nodestr + "<node id=\""+ versionid + " name=\"" + realname+"("+ versionstrutf + version + ")\"";
nodestr = nodestr + " path=\""+ realpath +"\"" + " time=\""+collecttime+ "\"></node>\n";
isexist = "1";
dataNodes[i] = dataNodes[i] + nodestr;
}
}
}
if(isexist.indexOf("1") == -1){
var nodestr = "";
for(var i=0; i < sizel; i++){
if(dataNodes[i].indexOf(batch) != -1){
var items = dataNodes[i].split("</");
if(items.length == 1){
//<2F><><EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD>ϵͳ<CFB5><CDB3>---<2D><EFBFBD><E6B1BE>Ϣ<EFBFBD><CFA2>
nodestr = nodestr + "<node id=\"" + id +" "+ name + ">\n";
nodestr = nodestr + "<node id=\""+ versionid + " name=\"" + realname +"(" + versionstrutf + version + ")\"";
nodestr = nodestr + " path=\""+ realpath +"\"" + " time=\""+collecttime+ "\"></node>\n</node>\n";
isexist = "1";
dataNodes[i] = dataNodes[i] + nodestr;
break;
}
else{
var items = dataNodes[i].split("</node");
nodestr = nodestr + "<node id=\"" + id +" "+ name + ">\n";
nodestr = nodestr + "<node id=\""+ versionid + " name=\"" + realname+"(" + versionstrutf + version + ")\"";
nodestr = nodestr + " path=\""+ realpath +"\"" + " time=\""+collecttime+ "\"></node>\n</node>\n";
isexist = "1";
nodestr = items[0] +"\n" + nodestr +"\n</node>\n";
dataNodes[i] = nodestr;
break;
}
}
}
}
var resultdatastr = "";
for(var j=0; j < sizel-1; j++){
resultdatastr = resultdatastr + dataNodes[j] + "<node";
}
resultdatastr = resultdatastr + dataNodes[sizel-1]+"";
console.log("--------22222222-----------------");
console.log(resultdatastr);
console.log(typeof resultdatastr);
fs.writeFile(dataPath, resultdatastr, function(err){
if(err)
console.log(err);
else
console.log('has finished');
});
}
});
}
//saveByIdToXml("01", "B", "321200_0", "̩<><CCA9><EFBFBD><EFBFBD>_<EFBFBD><5F>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>ϵͳ2","<22><><EFBFBD><EFBFBD>" , "̩<><CCA9>2", "<22>б<EFBFBD><D0B1><EFBFBD>", "<22><>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>ϵͳ", "321200_0", "0000", "lim", "13323225656",5);
function saveByIdToXml(collecttime, type, dataTimes, id, name, province, city, county, system, areacode, systemcode, contacts, phone, version, realpath){
var dataTimetemstr = "batch=\""+ type +"_" + dataTimes + "\"";
typestr = "type=\""+type+"\"";
var datatype = "<datatype";
var dataTimestr = "<dataTimes";
var dataTimeEndstr = "</dataTimes>";
var item = "<item";
var itemEnd = "</item>";
var dataEnd = "</data>";
id = type +"_" + dataTimes + "_" + id;
// <20><>ȡ
// var data = fs.readFileSync(dataDetailPath, "utf-8");
// <20><>ȡ
fs.readFile(dataDetailPath, "utf-8", function(err, data){
//fs.readFile("data.txt", function(err, data){
if(err){
console.log("<22><>ȡ<EFBFBD>ļ<EFBFBD> "+dataDetailPath+" fail " + err);
}
else{
console.log(data);
var resultStr = "";
// gbk <20><><EFBFBD><EFBFBD> linux<75><78><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//var str = iconv.decode(data,'gbk');
//data = str;
var typeArray = data.split(datatype);
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E7B1A3>{typeArray[0]:ͷ<><CDB7> typeArray[1]:<3A><EFBFBD><E7B1A3> typeArray[2]:<3A><><EFBFBD><EFBFBD>}
if(typeArray[1].indexOf(typestr)== -1){
resultStr += typeArray[0];
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E7B1A3>
resultStr += datatype;
resultStr += typeArray[1];
//<2F><><EFBFBD><EFBFBD> <20><>typeArray[2]
var timesArray = typeArray[2].split(dataTimestr);
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:<3A><><EFBFBD>ǵ<EFBFBD>һ<EFBFBD><D2BB><EFBFBD>εģ<CEB5><C4A3>ǵ<EFBFBD>2<EFBFBD><32><EFBFBD><EFBFBD>; {timesArray[0]:ͷ<><CDB7> timesArray[1]:1<><31><EFBFBD>Σ<EFBFBD> timesArray[2]:2<><32><EFBFBD><EFBFBD>}
if(timesArray[1].indexOf(dataTimetemstr)== -1){
resultStr += datatype;
resultStr += timesArray[0];
// <20><><EFBFBD>ϵ<EFBFBD>1<EFBFBD><31><EFBFBD><EFBFBD>
resultStr += dataTimestr;
resultStr += timesArray[1];
var itemArray = timesArray[2].split(item);
var itemsize = itemArray.length;
var nowDate = new Date();
// itemԪ<6D><D4AA>
var itemStr = "<item id=\""+id+"_"+version+"\">\n";
itemStr += "\t\t\t\t<name>"+name+"</name>\n";
itemStr += "\t\t\t\t<collecttime>"+collecttime+"</collecttime>\n";
itemStr += "\t\t\t\t<time>"+nowDate.getFullYear()+"-"+(nowDate.getMonth()+1)+"-"+nowDate.getDate()+" "+nowDate.getHours()+":"+nowDate.getMinutes()+"</time>\n";
itemStr += "\t\t\t\t<province>"+province+"</province>\n";
itemStr += "\t\t\t\t<city>"+city+"</city>\n";
itemStr += "\t\t\t\t<county>"+county+"</county>\n";
itemStr += "\t\t\t\t<system>"+system+"</system>\n";
itemStr += "\t\t\t\t<version>"+version+"</version>\n";
itemStr += "\t\t\t\t<path>"+realpath+"</path>\n";
itemStr += "\t\t\t\t<areacode>"+areacode+"</areacode>\n";
itemStr += "\t\t\t\t<systemcode>"+systemcode+"</systemcode>\n";
itemStr += "\t\t\t\t<contacts>"+contacts+"</contacts>\n";
itemStr += "\t\t\t\t<phone>"+phone+"</phone>\n";
itemStr += "\t\t\t\t<type>"+type+"</type>\n\t\t\t"+itemEnd+"\n\t\t";
// <20><><EFBFBD> <20><> resultStr
// û<><C3BB> item<65><6D> itemsize ==1
if(itemsize ==1){
var dataTimebeginstr = itemArray[0].split(dataTimeEndstr);
resultStr += dataTimestr;
resultStr += dataTimebeginstr[0];
resultStr += "\t" + itemStr;
resultStr += dataTimeEndstr;
for(var i = 1; i < dataTimebeginstr.length;i++){
resultStr += dataTimebeginstr[i];
}
}
// <20><> item<65><6D>
else{
resultStr += dataTimestr;
resultStr += itemArray[0];
if(version == 1){
for(var i=1; i < itemsize-1; i++){
resultStr += item;
resultStr += itemArray[i];
}
resultStr += itemStr + "\t";
resultStr += item;
// itemArray[itemsize-1]: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></dataTimes>
resultStr += itemArray[itemsize-1];
}
else{
var addtimes = 0;
var isadd = 0;
for(var i=1; i < itemsize-1; i++){
isadd++;
if(addtimes == 0){
if(itemArray[i].indexOf(id)!= -1){
resultStr += itemStr + "\t";
addtimes = 1;
}
}
resultStr += item;
resultStr += itemArray[i];
}
if(isadd == 0){
if(addtimes == 0){
if(itemArray[i].indexOf(id)!= -1){
resultStr += itemStr + "\t";
addtimes = 1;
}
}
}
// itemArray[itemsize-1]: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></dataTimes>
resultStr += item;
resultStr += itemArray[itemsize-1];
}
}
}
// <20><>1<EFBFBD><31><EFBFBD><EFBFBD>ʱ
else{
resultStr += datatype;
resultStr += timesArray[0];
resultStr += dataTimestr;
// item Ԫ<><D4AA>
var itemArray = timesArray[1].split(item);
var itemsize = itemArray.length;
var nowDate = new Date();
// itemԪ<6D><D4AA>
var itemStr = "<item id=\""+id+"_"+version+"\">\n";
itemStr += "\t\t\t\t<name>"+name+"</name>\n";
itemStr += "\t\t\t\t<collecttime>"+collecttime+"</collecttime>\n";
itemStr += "\t\t\t\t<time>"+nowDate.getFullYear()+"-"+(nowDate.getMonth()+1)+"-"+nowDate.getDate()+" "+nowDate.getHours()+":"+nowDate.getMinutes()+"</time>\n";
itemStr += "\t\t\t\t<province>"+province+"</province>\n";
itemStr += "\t\t\t\t<city>"+city+"</city>\n";
itemStr += "\t\t\t\t<county>"+county+"</county>\n";
itemStr += "\t\t\t\t<system>"+system+"</system>\n";
itemStr += "\t\t\t\t<version>"+version+"</version>\n";
itemStr += "\t\t\t\t<path>"+realpath+"</path>\n";
itemStr += "\t\t\t\t<areacode>"+areacode+"</areacode>\n";
itemStr += "\t\t\t\t<systemcode>"+systemcode+"</systemcode>\n";
itemStr += "\t\t\t\t<contacts>"+contacts+"</contacts>\n";
itemStr += "\t\t\t\t<phone>"+phone+"</phone>\n";
itemStr += "\t\t\t\t<type>"+type+"</type>\n\t\t\t"+itemEnd+"\n\t\t";
// <20><><EFBFBD> <20><> resultStr
// û<><C3BB> item<65><6D> itemsize ==1
if(itemsize ==1){
var dataTimebeginstr = itemArray[0].split(dataTimeEndstr);
resultStr += dataTimebeginstr[0];
resultStr += "\t" + itemStr;
resultStr += dataTimeEndstr;
for(var i = 1; i < dataTimebeginstr.length;i++){
resultStr += dataTimebeginstr[i];
}
}
// <20><> item<65><6D>
else{
resultStr += itemArray[0];
if(version == 1){
for(var i=1; i < itemsize-1; i++){
resultStr += item;
resultStr += itemArray[i];
}
resultStr += itemStr + "\t";
resultStr += item;
// itemArray[itemsize-1]: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></dataTimes>
resultStr += itemArray[itemsize-1];
}
else{
var addtimes = 0;
var isadd = 0;
for(var i=1; i < itemsize-1; i++){
isadd++;
if(addtimes == 0){
if(itemArray[i].indexOf(id)!= -1){
resultStr += itemStr + "\t";
addtimes = 1;
}
}
resultStr += item;
resultStr += itemArray[i];
}
if(isadd == 0){
if(addtimes == 0){
if(itemArray[i].indexOf(id)!= -1){
resultStr += itemStr + "\t";
addtimes = 1;
}
}
}
// itemArray[itemsize-1]: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></dataTimes>
resultStr += item;
resultStr += itemArray[itemsize-1];
}
}
//Ȼ<><C8BB><EFBFBD><EFBFBD>ϵ<EFBFBD>2<EFBFBD><32><EFBFBD><EFBFBD>
resultStr += dataTimestr;
resultStr += timesArray[2];
}
}
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
else{
resultStr += typeArray[0];
//<2F><20><>typeArray[1]
var timesArray = typeArray[1].split(dataTimestr);
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:<3A><><EFBFBD>ǵ<EFBFBD>һ<EFBFBD><D2BB><EFBFBD>εģ<CEB5><C4A3>ǵ<EFBFBD>2<EFBFBD><32><EFBFBD><EFBFBD>; {timesArray[0]:ͷ<><CDB7> timesArray[1]:1<><31><EFBFBD>Σ<EFBFBD> timesArray[2]:2<><32><EFBFBD><EFBFBD>}
if(timesArray[1].indexOf(dataTimetemstr)== -1){
resultStr += datatype;
resultStr += timesArray[0];
// <20><><EFBFBD>ϵ<EFBFBD>1<EFBFBD><31><EFBFBD><EFBFBD>
resultStr += dataTimestr;
resultStr += timesArray[1];
var itemArray = timesArray[2].split(item);
var itemsize = itemArray.length;
var nowDate = new Date();
// itemԪ<6D><D4AA>
var itemStr = "<item id=\""+id+"_"+version+"\">\n";
itemStr += "\t\t\t\t<name>"+name+"</name>\n";
itemStr += "\t\t\t\t<collecttime>"+collecttime+"</collecttime>\n";
itemStr += "\t\t\t\t<time>"+nowDate.getFullYear()+"-"+(nowDate.getMonth()+1)+"-"+nowDate.getDate()+" "+nowDate.getHours()+":"+nowDate.getMinutes()+"</time>\n";
itemStr += "\t\t\t\t<province>"+province+"</province>\n";
itemStr += "\t\t\t\t<city>"+city+"</city>\n";
itemStr += "\t\t\t\t<county>"+county+"</county>\n";
itemStr += "\t\t\t\t<system>"+system+"</system>\n";
itemStr += "\t\t\t\t<version>"+version+"</version>\n";
itemStr += "\t\t\t\t<path>"+realpath+"</path>\n";
itemStr += "\t\t\t\t<areacode>"+areacode+"</areacode>\n";
itemStr += "\t\t\t\t<systemcode>"+systemcode+"</systemcode>\n";
itemStr += "\t\t\t\t<contacts>"+contacts+"</contacts>\n";
itemStr += "\t\t\t\t<phone>"+phone+"</phone>\n";
itemStr += "\t\t\t\t<type>"+type+"</type>\n\t\t\t"+itemEnd+"\n\t\t";
// <20><><EFBFBD> <20><> resultStr
// û<><C3BB> item<65><6D> itemsize ==1
if(itemsize ==1){
var dataTimebeginstr = itemArray[0].split(dataTimeEndstr);
resultStr += dataTimestr;
resultStr += dataTimebeginstr[0];
resultStr = resultStr + "\t" + itemStr;
resultStr += dataTimeEndstr;
for(var i = 1; i < dataTimebeginstr.length;i++){
resultStr += dataTimebeginstr[i];
}
}
// <20><> item<65><6D>
else{
resultStr += dataTimestr;
resultStr += itemArray[0];
if(version == 1){
for(var i=1; i < itemsize-1; i++){
resultStr += item;
resultStr += itemArray[i];
}
resultStr += itemStr + "\t";
resultStr += item;
// itemArray[itemsize-1]: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></dataTimes>
resultStr += itemArray[itemsize-1];
}
else{
var addtimes = 0;
var isadd = 0;
for(var i=1; i < itemsize-1; i++){
isadd++;
if(addtimes == 0){
if(itemArray[i].indexOf(id)!= -1){
resultStr += itemStr + "\t";
addtimes = 1;
}
}
resultStr += item;
resultStr += itemArray[i];
}
if(isadd == 0){
if(addtimes == 0){
if(itemArray[i].indexOf(id)!= -1){
resultStr += itemStr + "\t";
addtimes = 1;
}
}
}
// itemArray[itemsize-1]: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></dataTimes>
resultStr += item;
resultStr += itemArray[itemsize-1];
}
}
}
// <20><>1<EFBFBD><31><EFBFBD><EFBFBD>ʱ
else{
resultStr += datatype;
resultStr += timesArray[0];
resultStr += dataTimestr;
// item Ԫ<><D4AA>
var itemArray = timesArray[1].split(item);
var itemsize = itemArray.length;
var nowDate = new Date();
// itemԪ<6D><D4AA>
var itemStr = "<item id=\""+id+"_"+version+"\">\n";
itemStr += "\t\t\t\t<name>"+name+"</name>\n";
itemStr += "\t\t\t\t<collecttime>"+collecttime+"</collecttime>\n";
itemStr += "\t\t\t\t<time>"+nowDate.getFullYear()+"-"+(nowDate.getMonth()+1)+"-"+nowDate.getDate()+" "+nowDate.getHours()+":"+nowDate.getMinutes()+"</time>\n";
itemStr += "\t\t\t\t<province>"+province+"</province>\n";
itemStr += "\t\t\t\t<city>"+city+"</city>\n";
itemStr += "\t\t\t\t<county>"+county+"</county>\n";
itemStr += "\t\t\t\t<system>"+system+"</system>\n";
itemStr += "\t\t\t\t<version>"+version+"</version>\n";
itemStr += "\t\t\t\t<path>"+realpath+"</path>\n";
itemStr += "\t\t\t\t<areacode>"+areacode+"</areacode>\n";
itemStr += "\t\t\t\t<systemcode>"+systemcode+"</systemcode>\n";
itemStr += "\t\t\t\t<contacts>"+contacts+"</contacts>\n";
itemStr += "\t\t\t\t<phone>"+phone+"</phone>\n";
itemStr += "\t\t\t\t<type>"+type+"</type>\n\t\t\t"+itemEnd+"\n\t\t";
// <20><><EFBFBD> <20><> resultStr
// û<><C3BB> item<65><6D> itemsize ==1
if(itemsize ==1){
var dataTimebeginstr = itemArray[0].split(dataTimeEndstr);
resultStr += dataTimebeginstr[0];
resultStr = resultStr + "\t" + itemStr;
resultStr += dataTimeEndstr;
for(var i = 1; i < dataTimebeginstr.length;i++){
resultStr += dataTimebeginstr[i];
}
}
// <20><> item<65><6D>
else{
resultStr += itemArray[0];
if(version == 1){
for(var i=1; i < itemsize-1; i++){
resultStr += item;
resultStr += itemArray[i];
}
resultStr += itemStr+"\t";
resultStr += item;
// itemArray[itemsize-1]: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></dataTimes>
resultStr += itemArray[itemsize-1];
}
else{
var addtimes = 0;
var isadd = 0;
for(var i=1; i < itemsize-1; i++){
isadd++;
if(addtimes == 0){
if(itemArray[i].indexOf(id)!= -1){
resultStr += itemStr + "\t";
addtimes = 1;
}
}
resultStr += item;
resultStr += itemArray[i];
}
if(isadd == 0){
if(addtimes == 0){
if(itemArray[i].indexOf(id)!= -1){
resultStr += itemStr + "\t";
addtimes = 1;
}
}
}
// itemArray[itemsize-1]: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></dataTimes>
resultStr += item;
resultStr += itemArray[itemsize-1];
}
}
//Ȼ<><C8BB><EFBFBD><EFBFBD>ϵ<EFBFBD>2<EFBFBD><32><EFBFBD><EFBFBD>
resultStr += dataTimestr;
resultStr += timesArray[2];
}
//<2F><><EFBFBD>ϲ<EFBFBD><CFB2><EFBFBD><EFBFBD><EFBFBD>
resultStr += datatype;
resultStr += typeArray[2];
}
console.log("-----------------------------------------------");
console.log(resultStr);
console.log(typeof resultStr);
// д<><D0B4><EFBFBD>ļ<EFBFBD>
fs.writeFile(dataDetailPath, resultStr, function(err){
if(err)
console.log(err);
else
console.log('has finished');
});
}
});
}
exports.getVersionPath = getVersionPath;
exports.mkdataForPage = mkdataForPage
exports.saveByIdToXml = saveByIdToXml

63
bower.json Normal file
View File

@ -0,0 +1,63 @@
{
"name": "hawtio-kubernetes",
"version": "2.1.179",
"keywords": [
"hawtio"
],
"main": [
"dist/hawtio-kubernetes.css",
"dist/hawtio-kubernetes.js"
],
"ignore": [
".*",
"**/.*",
"node_modules",
"bower_components",
"libs",
"test",
"tests",
"plugins"
],
"dependencies": {
"angular-nvd3": "~1.0.2",
"angular": "~1.4.4",
"angular-resource": "~1.4.7",
"angular-ui-codemirror": "~0.3.0",
"angular-ui-validate": "~1.2.1",
"angularjs-scroll-glue": "~0.0.1",
"hawtio-core": "~2.0.16",
"hawtio-forms": "~2.0.15",
"hawtio-oauth": "~2.0.21",
"hawtio-template-cache": "*",
"hawtio-ui": "~2.0.67",
"hawtio-utilities": "~2.0.21",
"kubernetes-container-terminal": "~0.0.3",
"term.js": "~0.0.3",
"urijs": "~1.17.0",
"hawtio-kubernetes-api": "~2.0.0",
"human-date": "^1.3.2",
"js-yaml": "^3.5.4"
},
"overrides": {
"term.js": {
"main": [
"./src/term.js"
]
}
},
"devDependencies": {
"bootstrap": "~3.3.6",
"patternfly": "~2.7.0",
"hawtio-core-dts": "~2.0.0",
"angular-mocks": "~1.3.7",
"hawtio-preferences": "~2.0.1",
"hawtio-extension-service": "~2.0.1"
},
"resolutions": {
"codemirror": "^5.0",
"angular": "~1.3.5",
"angular-resource": "~1.3.9",
"urijs": "~1.17.0",
"lodash": "3.10.1"
}
}

29
circle.yml Normal file
View File

@ -0,0 +1,29 @@
machine:
node:
version: 0.10.33
services:
- docker
dependencies:
pre:
- npm install -g bower gulp slush slush-hawtio-javascript slush-hawtio-typescript typescript
- npm install
- bower update
- bower prune
override:
- gulp site
test:
override:
- echo yes
##deployment:
## hub:
## branch: master
## owner: hawtio
## commands:
## - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
## - docker build -t fabric8/hawtio-kubernetes .
## - docker push fabric8/hawtio-kubernetes

7
d.ts/developer/ts/FileMode.d.ts vendored Normal file
View File

@ -0,0 +1,7 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="../../kubernetes/ts/kubernetesHelpers.d.ts" />
/// <reference path="developerEnrichers.d.ts" />
/// <reference path="developerHelpers.d.ts" />
/// <reference path="developerNavigation.d.ts" />
declare module Developer {
}

7
d.ts/developer/ts/dataInfnModel.d.ts vendored Normal file
View File

@ -0,0 +1,7 @@
/// <reference path="../../includes.d.ts" />
declare module Developer {
class dataInfoModelService {
serverData: {};
serverData: Object;
}
}

View File

@ -0,0 +1,16 @@
/// <reference path="../../includes.d.ts" />
declare module Developer {
function enrichWorkspaces(projects: any): any;
function enrichWorkspace(build: any): any;
function asDate(value: any): Date;
function enrichJenkinsJobs(jobsData: any, projectId: any, jobName: any): any;
function enrichJenkinsJob(job: any, projectId: any, jobName: any): any;
function createBuildStatusIconClass(result: any): string;
function createBuildStatusBackgroundClass(result: any): string;
function enrichJenkinsBuild(job: any, build: any): any;
function jenkinsLink(): any;
function forgeReadyLink(): any;
function enrichJenkinsPipelineJob(job: any, projectId: any, jobId: any): void;
function enrichJenkinsStages(build: any, projectId: any, jobName: any): any;
function enrichJenkinsStage(stage: any, build?: any): void;
}

25
d.ts/developer/ts/developerHelpers.d.ts vendored Normal file
View File

@ -0,0 +1,25 @@
/// <reference path="../../includes.d.ts" />
declare module Developer {
var context: string;
var hash: string;
var pluginName: string;
var pluginPath: string;
var templatePath: string;
var log: Logging.Logger;
var jenkinsServiceName: string;
var jenkinsServiceNameAndPort: string;
var jenkinsHttpConfig: {
headers: {
Accept: string;
};
};
/**
* Returns true if the value hasn't changed from the last cached JSON version of this object
*/
function hasObjectChanged(value: any, state: any): boolean;
function projectForScope($scope: any): any;
/**
* Lets load the project versions for the given namespace
*/
function loadProjectVersions($scope: any, $element: any, project: any, env: any, ns: any, answer: any, caches: any): void;
}

View File

@ -0,0 +1,28 @@
/// <reference path="../../includes.d.ts" />
declare module Developer {
function workspaceLink(): string;
function projectLink(projectId: any): string;
function createWorkspacesBreadcrumbs(developPerspective: any): any[];
function createWorkspacesSubNavBars(developPerspective: any): any;
function createWorkspaceBreadcrumbs(children?: any, workspaceName?: any): any;
function createEnvironmentBreadcrumbs($scope: any, $location: any, $routeParams: any): any;
function createProjectBreadcrumbs(projectName?: any, children?: any, workspaceName?: any): any;
function createProjectSettingsBreadcrumbs(projectName: any, workspaceName?: any): any;
function createWorkspaceSubNavBars(): any;
function createProjectSubNavBars(projectName: any, jenkinsJobId?: any, $scope?: any): any;
function createProjectSettingsSubNavBars(projectName: any, jenkinsJobId?: any): any;
function forgeProjectHasBuilder(name: any): any;
function forgeProjectHasPerspective(name: any): any;
function editPipelineLinkScope($scope: any): string;
function createProjectLink(workspaceName?: any): string;
function editPipelineLink(workspaceName: any, projectName: any): string;
function editMavenBuildLink(workspaceName: any, projectName: any): string;
function projectSecretsLink(workspaceName: any, projectName: any): string;
function secretsNamespaceLink(workspaceName: any, projectName: any, secretsNamespace: any): string;
function projectWorkspaceLink(workspaceName: any, projectName: any, path: any, ignoreBlankProject?: boolean): string;
var customProjectSubTabFactories: any[];
function createJenkinsBreadcrumbs(projectName: any, jobId: any, buildId: any): any;
function createJenkinsSubNavBars(projectName: any, jenkinsJobId: any, buildId: any, extraOption?: any): any;
function createEnvironmentSubNavBars($scope: any, $location: any, $routeParams: any): any;
function namespaceLink($scope: any, $routeParams: any, path?: any): string;
}

10
d.ts/developer/ts/developerPlugin.d.ts vendored Normal file
View File

@ -0,0 +1,10 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="developerHelpers.d.ts" />
declare module Developer {
var _module: ng.IModule;
var controller: (name: string, inlineAnnotatedConstructor: any[]) => ng.IModule;
var route: (templateName: string, reloadOnSearch?: boolean) => {
templateUrl: string;
reloadOnSearch: boolean;
};
}

View File

@ -0,0 +1,3 @@
/// <reference path="developerPlugin.d.ts" />
declare module Developer {
}

8
d.ts/developer/ts/home.d.ts vendored Normal file
View File

@ -0,0 +1,8 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="../../kubernetes/ts/kubernetesHelpers.d.ts" />
/// <reference path="developerEnrichers.d.ts" />
/// <reference path="developerHelpers.d.ts" />
/// <reference path="developerNavigation.d.ts" />
declare module Developer {
var HomeController: ng.IModule;
}

8
d.ts/developer/ts/jenkinsJob.d.ts vendored Normal file
View File

@ -0,0 +1,8 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="../../kubernetes/ts/kubernetesHelpers.d.ts" />
/// <reference path="developerEnrichers.d.ts" />
/// <reference path="developerHelpers.d.ts" />
/// <reference path="developerNavigation.d.ts" />
declare module Developer {
var JenkinsJobController: ng.IModule;
}

8
d.ts/developer/ts/jenkinsJobs.d.ts vendored Normal file
View File

@ -0,0 +1,8 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="../../kubernetes/ts/kubernetesHelpers.d.ts" />
/// <reference path="developerEnrichers.d.ts" />
/// <reference path="developerHelpers.d.ts" />
/// <reference path="developerNavigation.d.ts" />
declare module Developer {
var JenkinsJobsController: ng.IModule;
}

12
d.ts/developer/ts/jenkinsLog.d.ts vendored Normal file
View File

@ -0,0 +1,12 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="../../kubernetes/ts/kubernetesHelpers.d.ts" />
/// <reference path="../../kubernetes/ts/kubernetesInterfaces.d.ts" />
/// <reference path="../../kubernetes/ts/kubernetesModel.d.ts" />
/// <reference path="developerPlugin.d.ts" />
/// <reference path="developerEnrichers.d.ts" />
/// <reference path="developerHelpers.d.ts" />
/// <reference path="developerNavigation.d.ts" />
declare module Developer {
function clickApprove(element: any, url: any): void;
var JenkinsLogController: ng.IModule;
}

8
d.ts/developer/ts/jenkinsMetrics.d.ts vendored Normal file
View File

@ -0,0 +1,8 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="../../kubernetes/ts/kubernetesHelpers.d.ts" />
/// <reference path="developerEnrichers.d.ts" />
/// <reference path="developerHelpers.d.ts" />
/// <reference path="developerNavigation.d.ts" />
declare module Developer {
var JenkinsMetricsController: ng.IModule;
}

8
d.ts/developer/ts/navbar.d.ts vendored Normal file
View File

@ -0,0 +1,8 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="../../kubernetes/ts/kubernetesHelpers.d.ts" />
/// <reference path="developerEnrichers.d.ts" />
/// <reference path="developerHelpers.d.ts" />
/// <reference path="developerNavigation.d.ts" />
declare module Developer {
var NavBarController: ng.IModule;
}

8
d.ts/developer/ts/pipeline.d.ts vendored Normal file
View File

@ -0,0 +1,8 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="../../kubernetes/ts/kubernetesHelpers.d.ts" />
/// <reference path="developerEnrichers.d.ts" />
/// <reference path="developerHelpers.d.ts" />
/// <reference path="developerNavigation.d.ts" />
declare module Developer {
var PipelineController: ng.IModule;
}

View File

@ -0,0 +1,7 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="../../kubernetes/ts/kubernetesHelpers.d.ts" />
/// <reference path="developerEnrichers.d.ts" />
/// <reference path="developerHelpers.d.ts" />
/// <reference path="developerNavigation.d.ts" />
declare module Developer {
}

9
d.ts/developer/ts/pipelines.d.ts vendored Normal file
View File

@ -0,0 +1,9 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="../../kubernetes/ts/kubernetesHelpers.d.ts" />
/// <reference path="developerPlugin.d.ts" />
/// <reference path="developerEnrichers.d.ts" />
/// <reference path="developerHelpers.d.ts" />
/// <reference path="developerNavigation.d.ts" />
declare module Developer {
var PipelinesController: ng.IModule;
}

8
d.ts/developer/ts/project.d.ts vendored Normal file
View File

@ -0,0 +1,8 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="../../kubernetes/ts/kubernetesHelpers.d.ts" />
/// <reference path="developerEnrichers.d.ts" />
/// <reference path="developerHelpers.d.ts" />
/// <reference path="developerNavigation.d.ts" />
declare module Developer {
var ProjectController: ng.IModule;
}

View File

@ -0,0 +1,3 @@
/// <reference path="developerPlugin.d.ts" />
declare module Developer {
}

8
d.ts/developer/ts/projects.d.ts vendored Normal file
View File

@ -0,0 +1,8 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="../../kubernetes/ts/kubernetesHelpers.d.ts" />
/// <reference path="developerEnrichers.d.ts" />
/// <reference path="developerHelpers.d.ts" />
/// <reference path="developerNavigation.d.ts" />
declare module Developer {
var ProjectsController: ng.IModule;
}

8
d.ts/developer/ts/workspace.d.ts vendored Normal file
View File

@ -0,0 +1,8 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="../../kubernetes/ts/kubernetesHelpers.d.ts" />
/// <reference path="developerEnrichers.d.ts" />
/// <reference path="developerHelpers.d.ts" />
/// <reference path="developerNavigation.d.ts" />
declare module Developer {
var WorkspaceController: ng.IModule;
}

8
d.ts/developer/ts/workspaces.d.ts vendored Normal file
View File

@ -0,0 +1,8 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="../../kubernetes/ts/kubernetesHelpers.d.ts" />
/// <reference path="developerEnrichers.d.ts" />
/// <reference path="developerHelpers.d.ts" />
/// <reference path="developerNavigation.d.ts" />
declare module Developer {
var WorkspacesController: ng.IModule;
}

7
d.ts/includes.d.ts vendored Normal file
View File

@ -0,0 +1,7 @@
/// <reference path="../libs/hawtio-forms/defs.d.ts" />
/// <reference path="../libs/hawtio-kubernetes-api/defs.d.ts" />
/// <reference path="../libs/hawtio-oauth/defs.d.ts" />
/// <reference path="../libs/hawtio-ui/defs.d.ts" />
/// <reference path="../libs/hawtio-utilities/defs.d.ts" />
declare var humandate: any;
declare var jsyaml: any;

5
d.ts/kubernetes/ts/apps.d.ts vendored Normal file
View File

@ -0,0 +1,5 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var Apps: ng.IModule;
}

5
d.ts/kubernetes/ts/breadcrumbs.d.ts vendored Normal file
View File

@ -0,0 +1,5 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesHelpers.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
}

6
d.ts/kubernetes/ts/build.d.ts vendored Normal file
View File

@ -0,0 +1,6 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesHelpers.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var BuildController: ng.IModule;
}

6
d.ts/kubernetes/ts/buildConfig.d.ts vendored Normal file
View File

@ -0,0 +1,6 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesHelpers.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var BuildConfigController: ng.IModule;
}

View File

@ -0,0 +1,6 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesHelpers.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var BuildConfigEditController: ng.IModule;
}

5
d.ts/kubernetes/ts/buildConfigs.d.ts vendored Normal file
View File

@ -0,0 +1,5 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var BuildConfigsController: ng.IModule;
}

6
d.ts/kubernetes/ts/buildLogs.d.ts vendored Normal file
View File

@ -0,0 +1,6 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesHelpers.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var BuildLogsController: ng.IModule;
}

5
d.ts/kubernetes/ts/builds.d.ts vendored Normal file
View File

@ -0,0 +1,5 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var BuildsController: ng.IModule;
}

6
d.ts/kubernetes/ts/connect.d.ts vendored Normal file
View File

@ -0,0 +1,6 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesHelpers.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var ConnectController: ng.IModule;
}

33
d.ts/kubernetes/ts/dataInfnModel.d.ts vendored Normal file
View File

@ -0,0 +1,33 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
class dataInfoModelService {
serverdata: {};
promiseobject: {};
localdata: {};
selectednodes: any[];
resumablejs: any[];
selecteditems: any[];
serveritems: any[];
uploadprocess: {};
uploadedStatus: string;
uploadProcess: Object;
folderList: {
length: number;
};
serverItems: Array<any>;
resumableJs: Array<any>;
selectedItems: Array<any>;
selectedNodes: Array<any>;
isContainsNodes(node: Object): boolean;
findNodes(node: any): string;
findItemIndex(item: any): number | string;
createFolderList(files: Object, rootPath: string): void;
updateNodeById(nodeId: any, key: any, value: any): void;
serverData: Object;
promiseObject: Object;
promise: Object;
localData: Object;
updataDataModel(): void;
}
}

5
d.ts/kubernetes/ts/deployConfigs.d.ts vendored Normal file
View File

@ -0,0 +1,5 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var BuildConfigsController: ng.IModule;
}

View File

@ -0,0 +1,6 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesHelpers.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var DeploymentConfigController: ng.IModule;
}

View File

@ -0,0 +1,5 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var DeploymentConfigsController: ng.IModule;
}

6
d.ts/kubernetes/ts/editPod.d.ts vendored Normal file
View File

@ -0,0 +1,6 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesHelpers.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var PodController: ng.IModule;
}

6
d.ts/kubernetes/ts/events.d.ts vendored Normal file
View File

@ -0,0 +1,6 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesHelpers.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var EventsController: ng.IModule;
}

7
d.ts/kubernetes/ts/host.d.ts vendored Normal file
View File

@ -0,0 +1,7 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesHelpers.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
/// <reference path="kubernetesModel.d.ts" />
declare module Kubernetes {
var HostController: ng.IModule;
}

7
d.ts/kubernetes/ts/hosts.d.ts vendored Normal file
View File

@ -0,0 +1,7 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
/// <reference path="kubernetesModel.d.ts" />
/// <reference path="utilHelpers.d.ts" />
declare module Kubernetes {
var HostsController: ng.IModule;
}

View File

@ -0,0 +1,5 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var ImageRepositoriesController: ng.IModule;
}

View File

@ -0,0 +1,208 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesInterfaces.d.ts" />
declare module Kubernetes {
var context: string;
var hash: string;
var defaultRoute: string;
var pluginName: string;
var pluginPath: string;
var templatePath: string;
var log: Logging.Logger;
var keepPollingModel: boolean;
var defaultIconUrl: string;
var hostIconUrl: string;
var osConfig: KubernetesConfig;
var masterUrl: string;
var defaultApiVersion: string;
var defaultOSApiVersion: string;
var labelFilterTextSeparator: string;
var defaultNamespace: string;
var appSuffix: string;
var kibanaServiceName: string;
var fabric8ForgeServiceName: string;
var gogsServiceName: string;
var jenkinsServiceName: string;
var apimanServiceName: string;
var isOpenShift: boolean;
var sshSecretDataKeys: string[];
var httpsSecretDataKeys: string[];
function kubernetesNamespacePath(): string;
function apiPrefix(): string;
function osApiPrefix(): string;
function masterApiUrl(): string;
/** WARNING - this excludes the host name - you probably want to use: kubernetesApiUrl() instead!! */
function kubernetesApiPrefix(): string;
function openshiftApiPrefix(): string;
function prefixForType(type: string): string;
function kubernetesApiUrl(): string;
function openshiftApiUrl(): string;
function resourcesUriForKind(type: any, ns?: any): string;
function uriTemplateForKubernetesKind(type: any): string;
function namespacePathForKind(type: any, ns: any): string;
/**
* Returns thevalue from the injector if its available or null
*/
function inject<T>(name: any): T;
function createResource(thing: string, urlTemplate: string, $resource: ng.resource.IResourceService, KubernetesModel: any): ng.resource.IResourceClass<ng.resource.IResource<any>>;
function imageRepositoriesRestURL(): string;
function deploymentConfigsRestURL(): string;
function buildsRestURL(): string;
function buildConfigHooksRestURL(): string;
function buildConfigsRestURL(): string;
function routesRestURL(): string;
function templatesRestURL(): string;
function getNamespace(entity: any): any;
function getLabels(entity: any): any;
function getName(entity: any): any;
function getKind(entity: any): any;
function getSelector(entity: any): any;
function getHost(pod: any): any;
function getStatus(pod: any): any;
function getPorts(service: any): any;
function getCreationTimestamp(entity: any): any;
var mbean: string;
var managerMBean: string;
var appViewMBean: string;
function isKubernetes(workspace?: any): boolean;
function isKubernetesTemplateManager(workspace?: any): boolean;
function isAppView(workspace?: any): boolean;
function getStrippedPathName(): string;
function linkContains(...words: String[]): boolean;
/**
* Returns true if the given link is active. The link can omit the leading # or / if necessary.
* The query parameters of the URL are ignored in the comparison.
* @method isLinkActive
* @param {String} href
* @return {Boolean} true if the given link is active
*/
function isLinkActive(href: string): boolean;
function setJson($scope: any, id: any, collection: any): void;
/**
* Returns the labels text string using the <code>key1=value1,key2=value2,....</code> format
*/
function labelsToString(labels: any, seperatorText?: string): string;
function initShared($scope: any, $location: any, $http: any, $timeout: any, $routeParams: any, KubernetesModel: any, KubernetesState: any, KubernetesApiURL: any): void;
/**
* Returns the number of pods that are ready
*/
function readyPodCount(service: any): number;
/**
* Returns the service link URL for either the service name or the service object
*/
function serviceLinkUrl(service: any, httpOnly?: boolean): any;
/**
* Returns the total number of counters for the podCounters object
*/
function podCounterTotal($podCounters: any): number;
/**
* Given the list of pods lets iterate through them and find all pods matching the selector
* and return counters based on the status of the pod
*/
function createPodCounters(selector: any, pods: any, outputPods?: any[], podLinkQuery?: any, podLinkUrl?: any): {
podsLink: string;
ready: number;
valid: number;
waiting: number;
error: number;
};
/**
* Converts the given json into an array of items. If the json contains a nested set of items then that is sorted; so that services
* are processed first; then turned into an array. Otherwise the json is put into an array so it can be processed polymorphically
*/
function convertKubernetesJsonToItems(json: any): any[];
function isV1beta1Or2(): boolean;
/**
* Returns a link to the detail page for the given entity
*/
function entityPageLink(obj: any): any;
function resourceKindToUriPath(kind: any): string;
/**
* Returns the root URL for the kind
*/
function kubernetesUrlForKind(KubernetesApiURL: any, kind: any, namespace?: any, path?: any): string;
/**
* Returns the base URL for the kind of kubernetes resource or null if it cannot be found
*/
function kubernetesUrlForItemKind(KubernetesApiURL: any, json: any): string;
function kubernetesProxyUrlForService(KubernetesApiURL: any, service: any, path?: any): string;
function kubernetesProxyUrlForServiceCurrentNamespace(service: any, path?: any): string;
function buildConfigRestUrl(id: any): string;
function deploymentConfigRestUrl(id: any): string;
function imageRepositoryRestUrl(id: any): string;
function buildRestUrl(id: any): string;
function buildLogsRestUrl(id: any): string;
/**
* Runs the given application JSON
*/
function runApp($location: any, $scope: any, $http: any, KubernetesApiURL: any, json: any, name?: string, onSuccessFn?: any, namespace?: any, onCompleteFn?: any): void;
/**
* Returns true if the current status of the pod is running
*/
function isRunning(podCurrentState: any): any;
/**
* Returns true if the labels object has all of the key/value pairs from the selector
*/
function selectorMatches(selector: any, labels: any): boolean;
/**
* Returns the service registry
*/
function getServiceRegistry(): any;
/**
* Returns a link to the kibana logs web application
*/
function kibanaLogsLink(ServiceRegistry: any): string;
function openLogsForPods(ServiceRegistry: any, $window: any, namespace: any, pods: any): void;
function resizeController($http: any, KubernetesApiURL: any, replicationController: any, newReplicas: any, onCompleteFn?: any): void;
function statusTextToCssClass(text: any, ready?: boolean): string;
function podStatus(pod: any): any;
function isReady(pod: any): boolean;
function createAppViewPodCounters(appView: any): any[];
function createAppViewServiceViews(appView: any): any[];
/**
* converts a git path into an accessible URL for the browser
*/
function gitPathToUrl(iconPath: any, branch?: string): string;
function enrichBuildConfig(buildConfig: any, sortedBuilds: any): void;
function enrichBuildConfigs(buildConfigs: any, sortedBuilds?: any): any;
function enrichBuilds(builds: any): {}[];
function enrichBuild(build: any): any;
function enrichDeploymentConfig(deploymentConfig: any): void;
function enrichDeploymentConfigs(deploymentConfigs: any): any;
function enrichEvent(event: any): void;
function enrichEvents(events: any, model?: any): any;
function enrichImageRepository(imageRepository: any): void;
function enrichImageRepositories(imageRepositories: any): any;
function containerLabelClass(labelType: string): string;
/**
* Returns true if the fabric8 forge plugin is enabled
*/
function isForgeEnabled(): boolean;
/**
* Returns the current kubernetes selected namespace or the default one
*/
function currentKubernetesNamespace(): any;
function setCurrentKubernetesNamespace(ns: any): void;
/**
* Configures the json schema
*/
function configureSchema(): void;
/**
* Lets remove any enriched data to leave the original json intact
*/
function unenrich(item: any): any;
/**
* Returns the unenriched JSON representation of an object
*/
function toRawJson(item: any): string;
/**
* Returns the unenriched YAML representation of an object
*/
function toRawYaml(item: any): any;
function watch($scope: any, $element: any, kind: any, ns: any, fn: any, labelSelector?: any): void;
function createKubernetesClient(kind: any, ns?: any): any;
function currentUserName(): any;
function createNamespace(ns: any, client?: any): void;
function createRC(obj: any, onCompleteFn?: any): void;
function updateReplicationControllerLabels($http: any, KubernetesApiURL: any, replicationController: any, newLabels: any, onCompleteFn?: any): void;
function connectOracle($http: any, $timeout: any, url: any, connectParam: any, rcName: any, delayTime: any): void;
}

View File

@ -0,0 +1,98 @@
declare module Kubernetes {
class consts {
NAMESPACE_STORAGE_KEY: string;
}
var Constants: consts;
interface ApiLocation {
proto?: string;
hostPort: string;
prefix: string;
}
interface ApiLocations {
openshift?: ApiLocation;
k8s?: ApiLocation;
}
interface KubernetesConfig {
master_uri?: string;
api?: ApiLocations;
openshift?: OpenShiftOAuthConfig;
google?: GoogleOAuthConfig;
keycloak?: KeyCloakAuthConfig;
}
interface OpenShiftOAuthConfig {
oauth_authorize_uri: string;
oauth_client_id: string;
}
interface GoogleOAuthConfig {
authenticationURI: string;
authorizationURI: string;
clientId: string;
clientSecret: string;
redirectURI: string;
scope: string;
tokenURI?: string;
}
interface KeyCloakAuthConfig {
oauth_authorize_uri: string;
oauth_client_id: string;
}
interface KubernetesState {
namespaces: Array<string>;
selectedNamespace: string;
}
class WatchTypes {
static ENDPOINTS: string;
static EVENTS: string;
static NAMESPACES: string;
static NODES: string;
static PERSISTENT_VOLUMES: string;
static PERSISTENT_VOLUME_CLAIMS: string;
static PODS: string;
static REPLICATION_CONTROLLERS: string;
static RESOURCE_QUOTAS: string;
static OAUTH_CLIENTS: string;
static SECRETS: string;
static SERVICES: string;
static SERVICE_ACCOUNTS: string;
static TEMPLATES: string;
static ROUTES: string;
static BUILD_CONFIGS: string;
static BUILDS: string;
static DEPLOYMENT_CONFIGS: string;
static IMAGE_STREAMS: string;
static POLICIES: string;
static POLICY_BINDINGS: string;
static PROJECTS: string;
static ROLE_BINDINGS: string;
static ROLES: string;
}
class NamespacedTypes {
static k8sTypes: Array<string>;
static osTypes: Array<string>;
}
class WatchActions {
static ANY: string;
static ADDED: string;
static MODIFIED: string;
static DELETED: string;
}
interface ObjectMap {
[uid: string]: any;
}
interface WatcherService {
hasWebSocket: boolean;
addCustomizer: (type: string, customizer: (obj: any) => void) => void;
getTypes: () => Array<string>;
getNamespace: () => string;
setNamespace: (namespace: string) => void;
getObjects: (type: string) => Array<any>;
getObjectMap: (type: string) => ObjectMap;
addAction: (type: string, action: string, fn: (obj: any) => void) => void;
registerListener: (fn: (objects: ObjectMap) => void) => void;
registerCustomUrlFunction: (kind: string, url: (kind: string) => string) => void;
}
interface KubePod {
id: string;
namespace: string;
}
}

View File

@ -0,0 +1,6 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesHelpers.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var KubernetesJsonDirective: ng.IModule;
}

54
d.ts/kubernetes/ts/kubernetesModel.d.ts vendored Normal file
View File

@ -0,0 +1,54 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var FABRIC8_PROJECT_JSON: string;
/**
* The object which keeps track of all the pods, replication controllers, services and their associations
*/
class KubernetesModelService {
kubernetes: KubernetesState;
apps: any[];
services: any[];
replicationcontrollers: any[];
replicationControllers: Array<any>;
pods: any[];
hosts: any[];
namespaces: Array<string>;
routes: any[];
templates: any[];
redraw: boolean;
resourceVersions: {};
podsByHost: {};
servicesByKey: {};
replicationControllersByKey: {};
podsByKey: {};
appInfos: any[];
appViews: any[];
appFolders: any[];
fetched: boolean;
showRunButton: boolean;
buildconfigs: any[];
events: any[];
workspaces: any[];
projects: any[];
project: any;
serviceApps: Array<any>;
$keepPolling(): boolean;
orRedraw(flag: any): void;
getService(namespace: any, id: any): any;
getReplicationController(namespace: any, id: any): any;
getPod(namespace: any, id: any): any;
podsForNamespace(namespace?: any): any[];
getBuildConfig(name: any): any;
getProject(name: any, ns?: any): any;
setProject(buildConfig: any): void;
/**
* Returns the current selected namespace or the default namespace
*/
currentNamespace(): any;
protected updateIconUrlAndAppInfo(entity: any, nameField: string): void;
maybeInit(): void;
protected updateApps(): void;
protected discoverPodConnections(entity: any): void;
}
}

View File

@ -0,0 +1,5 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesHelpers.d.ts" />
declare module Kubernetes {
function selectSubNavBar($scope: any, tabName: any, newSubTabLabel: any): void;
}

View File

@ -0,0 +1,13 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesHelpers.d.ts" />
declare var OSOAuthConfig: any;
declare var GoogleOAuthConfig: any;
declare var KeycloakConfig: any;
declare module Kubernetes {
var _module: ng.IModule;
var controller: (name: string, inlineAnnotatedConstructor: any[]) => ng.IModule;
var route: (templateName: string, reloadOnSearch?: boolean) => {
templateUrl: string;
reloadOnSearch: boolean;
};
}

View File

@ -0,0 +1,4 @@
/// <reference path="schema.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
}

View File

@ -0,0 +1,3 @@
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
}

View File

@ -0,0 +1,9 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesHelpers.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
/// <reference path="kubernetesModel.d.ts" />
declare module Kubernetes {
var FileDropController: ng.IModule;
var NamespaceController: ng.IModule;
var TopLevel: ng.IModule;
}

4
d.ts/kubernetes/ts/namespace.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var NamespaceController: ng.IModule;
}

View File

@ -0,0 +1,9 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
class oracleModelService {
oraclecontrollers: any[];
oracleControllers: Array<any>;
findIndexOfOracleControllers(oracleControllers: Array<any>, name: string): number;
}
}

5
d.ts/kubernetes/ts/overview.d.ts vendored Normal file
View File

@ -0,0 +1,5 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesHelpers.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
}

5
d.ts/kubernetes/ts/pipelines.d.ts vendored Normal file
View File

@ -0,0 +1,5 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var PipelinesController: ng.IModule;
}

6
d.ts/kubernetes/ts/pod.d.ts vendored Normal file
View File

@ -0,0 +1,6 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesHelpers.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var PodController: ng.IModule;
}

6
d.ts/kubernetes/ts/podEdit.d.ts vendored Normal file
View File

@ -0,0 +1,6 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesHelpers.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var PodEditController: ng.IModule;
}

4
d.ts/kubernetes/ts/podLogs.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
/// <reference path="kubernetesPlugin.d.ts" />
/// <reference path="term.d.ts" />
declare module Kubernetes {
}

7
d.ts/kubernetes/ts/pods.d.ts vendored Normal file
View File

@ -0,0 +1,7 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
/// <reference path="utilHelpers.d.ts" />
declare module Kubernetes {
var EnvItem: ng.IModule;
var Pods: ng.IModule;
}

View File

@ -0,0 +1,6 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesHelpers.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var ReplicationControllerController: ng.IModule;
}

View File

@ -0,0 +1,6 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesHelpers.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var ReplicationControllerEditController: ng.IModule;
}

View File

@ -0,0 +1,6 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesHelpers.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var ReplicationControllers: ng.IModule;
}

6677
d.ts/kubernetes/ts/schema.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

5
d.ts/kubernetes/ts/schemaHelpers.d.ts vendored Normal file
View File

@ -0,0 +1,5 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesInterfaces.d.ts" />
declare module Kubernetes {
function schemaSetRequired(schema: any, propertyName: any, isRequired?: boolean): void;
}

6
d.ts/kubernetes/ts/secret.d.ts vendored Normal file
View File

@ -0,0 +1,6 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesHelpers.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var SecretController: ng.IModule;
}

7
d.ts/kubernetes/ts/secrets.d.ts vendored Normal file
View File

@ -0,0 +1,7 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
/// <reference path="kubernetesModel.d.ts" />
/// <reference path="utilHelpers.d.ts" />
declare module Kubernetes {
var SecretsController: ng.IModule;
}

6
d.ts/kubernetes/ts/service.d.ts vendored Normal file
View File

@ -0,0 +1,6 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesHelpers.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var ServiceController: ng.IModule;
}

6
d.ts/kubernetes/ts/serviceEdit.d.ts vendored Normal file
View File

@ -0,0 +1,6 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesHelpers.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var ServiceEditController: ng.IModule;
}

39
d.ts/kubernetes/ts/serviceRegistry.d.ts vendored Normal file
View File

@ -0,0 +1,39 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesHelpers.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
/// <reference path="kubernetesModel.d.ts" />
declare module Kubernetes {
/**
* Represents a simple interface to service discovery that can be used early on in the application lifecycle before the
* underlying model has been created via dependency injection
*/
class ServiceRegistryService {
private model;
/**
* Returns true if there is a service available for the given ID or false
*/
hasService(serviceName: string): boolean;
/**
* Returns the service for the given service name (ID) or null if it cannot be found
*
* @param serviceName the name of the service to look for
* @return {null}
*/
findService(serviceName: string): any;
/**
* Returns the service link for the given service name
*
* @param serviceName the name of the service
* @return {null}
*/
serviceLink(serviceName: string): string;
/**
* Returns the service link for the given service name if its ready (has at least one ready pod)
*
* @param serviceName the name of the service
* @return {null}
*/
serviceReadyLink(serviceName: string): string;
private getModel();
}
}

7
d.ts/kubernetes/ts/services.d.ts vendored Normal file
View File

@ -0,0 +1,7 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesHelpers.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var ServiceApps: ng.IModule;
var Services: ng.IModule;
}

View File

@ -0,0 +1,8 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesHelpers.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var PodStatus: ng.IModule;
var Labels: ng.IModule;
var Status: ng.IModule;
}

5
d.ts/kubernetes/ts/tabs.d.ts vendored Normal file
View File

@ -0,0 +1,5 @@
/// <reference path="../../includes.d.ts" />
/// <reference path="kubernetesHelpers.d.ts" />
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
}

4
d.ts/kubernetes/ts/templates.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
var TemplateController: ng.IModule;
}

5
d.ts/kubernetes/ts/term.d.ts vendored Normal file
View File

@ -0,0 +1,5 @@
/// <reference path="kubernetesPlugin.d.ts" />
/// <reference path="watcher.d.ts" />
declare module Kubernetes {
function addWindowActions(scope: any, element: any, TerminalService: any): void;
}

56
d.ts/kubernetes/ts/utilHelpers.d.ts vendored Normal file
View File

@ -0,0 +1,56 @@
/// <reference path="../../includes.d.ts" />
declare module Kubernetes {
var hostPorts: any[];
/**
* Sorts the the ip field
*
* @param ip the ip such as '10.1.2.13'
* @returns {any}
*/
function sortByPodIp(ip: any): any;
function ramdomPort(): number;
function getRandomString(len: number): string;
class resourceRCTemplate {
image: string;
names: string[];
createRC(Obj: any): {
"apiVersion": string;
"kind": string;
"metadata": {
"name": any;
"labels": {
"style": string;
"status": string;
};
};
"spec": {
replicas: any;
"template": {
"metadata": {
"labels": any;
};
"spec": {
"terminationGracePeriodSeconds": number;
"containers": any[];
"volumes": any[];
};
};
};
};
createVolumeMounts(): any[];
createVolumes(rootPath: string): any[];
createContainers(Obj: any): any[];
createTemplate(Obj: any): {
"metadata": {
"labels": any;
};
"spec": {
"terminationGracePeriodSeconds": number;
"containers": any[];
"volumes": any[];
};
};
}
function findLabelValue(value: string, key: string): string;
function labelToChinese(labels: any): {};
}

3
d.ts/kubernetes/ts/watcher.d.ts vendored Normal file
View File

@ -0,0 +1,3 @@
/// <reference path="kubernetesPlugin.d.ts" />
declare module Kubernetes {
}

View File

@ -0,0 +1,6 @@
/// <reference path="../../includes.d.ts" />
declare module Navigation {
var pluginName: string;
var log: Logging.Logger;
var _module: ng.IModule;
}

30
d.ts/service/ts/serviceHelpers.d.ts vendored Normal file
View File

@ -0,0 +1,30 @@
/// <reference path="../../includes.d.ts" />
declare module Service {
var pluginName: string;
var log: Logging.Logger;
/**
* Used to specify whether the "service" URL should be polled for services using kubernetes or kubernetes-like service discover.
* For more details see: https://github.com/hawtio/hawtio/blob/master/docs/Services.md
*/
var pollServices: boolean;
/**
* Returns true if there is a service available for the given ID or false
*/
function hasService(ServiceRegistry: any, serviceName: string): boolean;
/**
* Returns the service for the given service name (ID) or null if it cannot be found
*
* @param ServiceRegistry
* @param serviceName
* @return {null}
*/
function findService(ServiceRegistry: any, serviceName: string): any;
/**
* Returns the service link for the given service name
*
* @param ServiceRegistry
* @param serviceName
* @return {null}
*/
function serviceLink(ServiceRegistry: any, serviceName: string): string;
}

19
d.ts/service/ts/servicePlugin.d.ts vendored Normal file
View File

@ -0,0 +1,19 @@
/// <reference path="serviceHelpers.d.ts" />
/// <reference path="../../includes.d.ts" />
declare module Service {
interface SelectorMap {
[name: string]: string;
}
interface Service {
kind: string;
id: string;
portalIP: string;
selector?: SelectorMap;
port: number;
containerPort: number;
}
interface ServiceResponse {
items: Array<Service>;
}
var _module: ng.IModule;
}

71
defs.d.ts vendored Normal file
View File

@ -0,0 +1,71 @@
/// <reference path="d.ts/includes.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/kubernetesInterfaces.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/kubernetesHelpers.d.ts"/>
/// <reference path="d.ts/developer/ts/developerEnrichers.d.ts"/>
/// <reference path="d.ts/developer/ts/developerHelpers.d.ts"/>
/// <reference path="d.ts/developer/ts/developerNavigation.d.ts"/>
/// <reference path="d.ts/developer/ts/FileMode.d.ts"/>
/// <reference path="d.ts/developer/ts/developerPlugin.d.ts"/>
/// <reference path="d.ts/developer/ts/environmentPanel.d.ts"/>
/// <reference path="d.ts/developer/ts/home.d.ts"/>
/// <reference path="d.ts/developer/ts/jenkinsJob.d.ts"/>
/// <reference path="d.ts/developer/ts/jenkinsJobs.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/kubernetesPlugin.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/kubernetesModel.d.ts"/>
/// <reference path="d.ts/developer/ts/jenkinsLog.d.ts"/>
/// <reference path="d.ts/developer/ts/jenkinsMetrics.d.ts"/>
/// <reference path="d.ts/developer/ts/navbar.d.ts"/>
/// <reference path="d.ts/developer/ts/pipeline.d.ts"/>
/// <reference path="d.ts/developer/ts/pipelineDirective.d.ts"/>
/// <reference path="d.ts/developer/ts/pipelines.d.ts"/>
/// <reference path="d.ts/developer/ts/project.d.ts"/>
/// <reference path="d.ts/developer/ts/projectSelector.d.ts"/>
/// <reference path="d.ts/developer/ts/projects.d.ts"/>
/// <reference path="d.ts/developer/ts/workspace.d.ts"/>
/// <reference path="d.ts/developer/ts/workspaces.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/apps.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/breadcrumbs.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/build.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/buildConfig.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/buildConfigEdit.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/buildConfigs.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/buildLogs.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/builds.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/connect.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/dataInfnModel.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/deploymentConfig.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/deploymentConfigs.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/events.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/host.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/utilHelpers.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/hosts.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/imageRepositories.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/kubernetesNavigation.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/schema.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/kubernetesSchema.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/kubernetesServices.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/kubernetesTopLevel.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/namespace.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/oracleStatusModel.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/overview.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/pipelines.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/pod.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/podEdit.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/watcher.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/term.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/podLogs.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/pods.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/replicationController.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/replicationControllerEdit.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/replicationControllers.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/schemaHelpers.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/secret.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/secrets.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/service.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/serviceEdit.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/serviceRegistry.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/services.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/sharedControllers.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/tabs.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/templates.d.ts"/>
/// <reference path="d.ts/navigation/ts/navigationPlugin.d.ts"/>

108
dist/hawtio-console-assembly.css vendored Normal file
View File

@ -0,0 +1,108 @@
/* console specific stuff here */
body {
padding-top: 110px;
}
.pane {
top: 110px;
}
.navbar-brand > img {
height: 20px;
margin-top: -5px;
margin-bottom: -5px;
}
.navbar-persistent {
background: #f6f6f6;
border-bottom: 1px solid #cecdcd;
padding: 0;
width: 100%;
}
.navbar-persistent > li.active:before,
.navbar-persistent > li.active:hover:before {
background: #0099d3;
bottom: -1px;
content: '';
display: block;
height: 2px;
left: 20px;
position: absolute;
right: 20px;
}
.navbar-persistent > li.active > a,
.navbar-persistent > li.active > a:hover,
.navbar-persistent > li.active:hover > a {
background: transparent !important;
color: #0099d3 !important;
}
.navbar-persistent > li.active .active > a {
color: #f1f1f1;
}
.navbar-persistent > li.dropdown-submenu:hover > .dropdown-menu {
display: none;
}
.navbar-persistent > li.dropdown-submenu.open > .dropdown-menu {
display: block;
left: 20px;
margin-top: 1px;
top: 100%;
}
.navbar-persistent > li.dropdown-submenu.open > .dropdown-toggle {
color: #222222;
}
.navbar-persistent > li.dropdown-submenu.open > .dropdown-toggle:after {
border-top-color: #222222;
}
.navbar-persistent > li.dropdown-submenu > .dropdown-toggle {
padding-right: 35px !important;
}
.navbar-persistent > li.dropdown-submenu > .dropdown-toggle:after {
position: absolute;
right: 20px;
top: 10px;
}
.navbar-persistent > li:hover:before,
.navbar-persistent > li.open:before {
background: #aaaaaa;
bottom: -1px;
content: '';
display: block;
height: 2px;
left: 20px;
position: absolute;
right: 20px;
}
.navbar-persistent > li:hover > a,
.navbar-persistent > li.open > a {
color: #222222;
}
.navbar-persistent > li:hover > a:after,
.navbar-persistent > li.open > a:after {
border-top-color: #222222;
}
.navbar-persistent > li > a {
background-color: transparent;
display: block;
line-height: 1;
padding: 9px 20px !important;
}
.navbar-persistent > li > a.dropdown-toggle {
padding-right: 35px;
}
.navbar-persistent > li > a.dropdown-toggle:after {
font-size: 15px;
position: absolute;
right: 20px;
top: 9px;
}
.navbar-persistent > li > a:hover {
color: #222222 !important;
}
.navbar-persistent > li a {
color: #4d5258 !important;
}
.navbar-pf .navbar-primary > li > a {
border-bottom: 1px solid transparent;
border-top: 1px solid transparent;
position: relative;
margin: -1px 0 0;
}

1025
dist/hawtio-kubernetes.css vendored Normal file

File diff suppressed because it is too large Load Diff

17918
dist/hawtio-kubernetes.js vendored Normal file

File diff suppressed because one or more lines are too long

316
dist/img/host.svg vendored Normal file
View File

@ -0,0 +1,316 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:cc="http://web.resource.org/cc/"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:ns1="http://sozi.baierouge.fr"
id="svg1612"
sodipodi:docname="sagar_ns_server.svg"
viewBox="0 0 359.37 469.36"
sodipodi:version="0.32"
version="1.0"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
inkscape:version="0.45.1"
sodipodi:docbase="/Users/johnolsen/Pictures/svg"
>
<defs
id="defs1614"
>
<linearGradient
id="linearGradient29808"
y2="654.74"
xlink:href="#linearGradient24757"
gradientUnits="userSpaceOnUse"
x2="191.45"
gradientTransform="translate(225.21 -257.03)"
y1="654.74"
x1="177.95"
inkscape:collect="always"
/>
<linearGradient
id="linearGradient29806"
y2="611.48"
xlink:href="#linearGradient24757"
gradientUnits="userSpaceOnUse"
x2="306.18"
gradientTransform="translate(-9.0156 192.16)"
y1="596.63"
x1="309.71"
inkscape:collect="always"
/>
<linearGradient
id="linearGradient24757"
>
<stop
id="stop24759"
style="stop-color:#d5d5d5"
offset="0"
/>
<stop
id="stop24761"
style="stop-color:#848484;stop-opacity:0"
offset="1"
/>
</linearGradient
>
<linearGradient
id="linearGradient29804"
y2="560.57"
xlink:href="#linearGradient24757"
gradientUnits="userSpaceOnUse"
x2="379.72"
y1="560.57"
x1="253.14"
inkscape:collect="always"
/>
<linearGradient
id="linearGradient29802"
y2="949.11"
xlink:href="#linearGradient22094"
gradientUnits="userSpaceOnUse"
x2="659.71"
gradientTransform="translate(-220.88 106.92)"
y1="400.17"
x1="491.76"
inkscape:collect="always"
/>
<linearGradient
id="linearGradient29800"
y2="482.62"
gradientUnits="userSpaceOnUse"
x2="265.58"
gradientTransform="translate(-208.22 109.74)"
y1="306.18"
x1="705.01"
inkscape:collect="always"
>
<stop
id="stop22985"
style="stop-color:#000000"
offset="0"
/>
<stop
id="stop22987"
style="stop-color:#000000;stop-opacity:0"
offset="1"
/>
</linearGradient
>
<linearGradient
id="linearGradient22094"
>
<stop
id="stop22096"
style="stop-color:#000000"
offset="0"
/>
<stop
id="stop22098"
style="stop-color:#000000;stop-opacity:0"
offset="1"
/>
</linearGradient
>
<linearGradient
id="linearGradient29798"
y2="211.3"
xlink:href="#linearGradient22094"
gradientUnits="userSpaceOnUse"
x2="576.57"
gradientTransform="translate(-208.22 109.74)"
y1="133.76"
x1="575.89"
inkscape:collect="always"
/>
</defs
>
<sodipodi:namedview
id="base"
bordercolor="#666666"
inkscape:pageshadow="2"
inkscape:window-y="176"
pagecolor="#ffffff"
inkscape:window-height="581"
inkscape:zoom="0.7"
inkscape:window-x="176"
borderopacity="1.0"
inkscape:current-layer="layer1"
inkscape:cx="454.3678"
inkscape:cy="517.33549"
inkscape:window-width="756"
inkscape:pageopacity="0.0"
inkscape:document-units="px"
/>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer"
transform="translate(-226.03 -301.23)"
>
<g
id="g29774"
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="c:\documents and settings\602654809\My Documents\My Icons\text9507.png"
transform="matrix(.95252 0 0 .80631 78.742 104.9)"
>
<path
id="path29776"
style="fill-rule:evenodd;fill:#ffffff"
d="m154.75 296.11l209-52.5 167.75 5.75-3 363.25-125.25 213-233.75-56.5-14.75-473z"
/>
<g
id="g29778"
>
<path
id="path29780"
sodipodi:nodetypes="ccccc"
style="fill-rule:evenodd;fill:url(#linearGradient29798)"
d="m363.7 243.5l168.21 6.13-127.82 56.4-249.31-9.77 208.92-52.76z"
/>
<path
id="path29782"
sodipodi:nodetypes="ccccc"
style="fill-rule:evenodd;fill:url(#linearGradient29800)"
d="m531.39 249.13l-3.1 362.98-125.04 212.97 0.18-519.27 127.96-56.68z"
/>
<path
id="path29784"
sodipodi:nodetypes="ccccc"
style="fill-rule:evenodd;fill:url(#linearGradient29802)"
d="m154.63 296.26l249.02 9.38-0.18 519.59-233.54-56.28-15.3-472.69z"
/>
<path
id="path29786"
sodipodi:nodetypes="ccccc"
style="fill-rule:evenodd;fill:url(#linearGradient29804)"
d="m253.14 300l124.46 4.6 2.47 514.77-33.29-7.78-93.64-511.59z"
/>
<path
id="path29788"
sodipodi:nodetypes="ccccc"
style="fill-rule:evenodd;fill:url(#linearGradient29806)"
d="m169.88 768.99l-0.53-16.09 233.7 53.39-0.06 18.38-233.11-55.68z"
/>
<path
id="path29790"
sodipodi:nodetypes="ccccc"
style="fill-rule:evenodd;fill:url(#linearGradient29808)"
d="m403.76 306.01l12.9-5.48v502.75l-13.49 21.57 0.59-518.84z"
/>
<path
id="path29792"
sodipodi:nodetypes="ccccc"
style="fill-rule:evenodd;fill:#3c36d3"
d="m352.16 337.78l39.58 2.22-0.76 11.63-39.42-2.26 0.6-11.59z"
/>
<path
id="path29794"
sodipodi:nodetypes="ccccc"
style="fill-rule:evenodd;fill:#3c36d3"
d="m352.16 371.94l39.58 2.22-0.76 11.63-39.42-2.26 0.6-11.59z"
/>
<path
id="path29796"
sodipodi:nodetypes="ccccc"
style="fill-rule:evenodd;fill:#3c36d3"
d="m352.16 406.1l39.58 2.22-0.76 11.63-39.42-2.26 0.6-11.59z"
/>
</g
>
</g
>
</g
>
<metadata
>
<rdf:RDF
>
<cc:Work
>
<dc:format
>image/svg+xml</dc:format
>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage"
/>
<cc:license
rdf:resource="http://creativecommons.org/licenses/publicdomain/"
/>
<dc:publisher
>
<cc:Agent
rdf:about="http://openclipart.org/"
>
<dc:title
>Openclipart</dc:title
>
</cc:Agent
>
</dc:publisher
>
<dc:title
>Server Cabinet CPU</dc:title
>
<dc:date
>2007-09-03T13:59:19</dc:date
>
<dc:description
>Represents a server in Network Diagrams</dc:description
>
<dc:source
>https://openclipart.org/detail/5159/server-cabinet-cpu-by-sagar_ns</dc:source
>
<dc:creator
>
<cc:Agent
>
<dc:title
>sagar_ns</dc:title
>
</cc:Agent
>
</dc:creator
>
<dc:subject
>
<rdf:Bag
>
<rdf:li
>mainframe</rdf:li
>
<rdf:li
>server</rdf:li
>
</rdf:Bag
>
</dc:subject
>
</cc:Work
>
<cc:License
rdf:about="http://creativecommons.org/licenses/publicdomain/"
>
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction"
/>
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution"
/>
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks"
/>
</cc:License
>
</rdf:RDF
>
</metadata
>
</svg
>

After

Width:  |  Height:  |  Size: 8.5 KiB

451
dist/img/kubernetes.svg vendored Normal file
View File

@ -0,0 +1,451 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
width="138"
height="138"
id="svg2"
xml:space="preserve"
inkscape:version="0.48.5 r10040"
sodipodi:docname="kubernetes.svg"><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1918"
inkscape:window-height="1054"
id="namedview147"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="3.0970926"
inkscape:cx="203.09647"
inkscape:cy="61.870747"
inkscape:window-x="0"
inkscape:window-y="31"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" /><metadata
id="metadata8"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
id="defs6" /><g
id="g12"
transform="matrix(0,-0.23233006,0.22843688,0,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:118.52590179;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path14"
d="m 6196.6587,-1043.6173 -94.2902,-195.4939 -211.9113,-48.3046 -169.9617,135.2607 -0.025,216.9692 169.9297,135.2974 211.9254,-48.257 94.3336,-195.4718 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#336ee5;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path16"
d="M 69.164415,13.544412 24.50791,35.450754 13.47369,84.683616 l 30.897917,39.486744 49.562617,0 L 124.84026,84.691321 113.81667,35.45512 69.164415,13.539019 z" /><g
id="g18"
transform="matrix(0,-0.23233006,0.22843688,0,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#336ee5;stroke-width:74.74790192;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path20"
d="m 6196.6587,-1043.6173 -94.2902,-195.4939 -211.9113,-48.3046 -169.9617,135.2607 -0.025,216.9692 169.9297,135.2974 211.9254,-48.257 94.3336,-195.4718 z" /></g><g
id="g22"
transform="matrix(-0.22843688,0,0,-0.23468008,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:30.78089905;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path24"
d="m 1013.0746,6022.3961 c 73.5242,16.6963 146.8281,-29.4129 163.7263,-102.9867 16.9013,-73.5707 -29.0033,-146.7473 -102.5275,-163.4423 -73.5273,-16.6918 -146.8312,29.4174 -163.7308,102.9881 -16.8982,73.5738 29.0033,146.7505 102.532,163.4409 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path26"
d="m 72.040533,34.450779 -3.433866,0.01284 -0.21825,25.929869 5.082487,0.0488 -1.430371,-25.986244 z" /><g
id="g28"
transform="matrix(-0.21472442,0,0,-0.23468008,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.41159999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path30"
d="m 1096.8024,6045.6095 15.9899,-0.034 1.0191,-110.4911 -23.6699,-0.2094 6.6609,110.7345 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path32"
d="m 66.275173,34.450779 3.434616,0.01284 0.212499,25.929869 -5.081736,0.04751 1.434621,-25.985473 z" /><g
id="g34"
transform="matrix(-0.21472442,0,0,-0.23468008,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.41159999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path36"
d="m 1123.6518,6045.6098 -15.9947,-0.034 -0.9893,-110.4911 23.6664,-0.2029 -6.6824,110.7283 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path38"
d="m 66.486048,24.660222 c 0,1.684688 1.196246,3.050905 2.672367,3.050905 1.475746,0 2.672368,-1.366217 2.672368,-3.049749 0,-1.685074 -1.195497,-3.050777 -2.672368,-3.051933 -1.476121,0 -2.672367,1.365832 -2.672367,3.050777" /><g
id="g40"
transform="matrix(-0.20558695,-2.5683182e-5,2.4999933e-5,-0.23468008,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.2744;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path42"
d="m 1173.5053,6087.183 c -8e-4,-7.1804 -5.8238,-12.9997 -13.0019,-12.9988 -7.1785,8e-4 -12.998,5.8229 -12.9986,12.9971 0,7.1802 5.8204,12.9994 13.0023,13.0031 7.1801,-6e-4 12.9994,-5.8212 12.9982,-13.0014 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path44"
d="m 71.829658,24.619899 c -6.25e-4,0.240909 0.01125,0.58853 0.0025,0.82045 -0.03575,0.97198 -0.242749,1.716663 -0.366749,2.612493 -0.224999,1.915837 -0.413874,3.504342 -0.297999,4.980482 0.106375,0.738906 0.522999,1.030538 0.869873,1.372253 l -4.215114,2.865601 0.633623,-12.630219 3.373491,-0.02055 z" /><g
id="g46"
transform="matrix(0,0.22059285,-0.22843688,0,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.26840001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path48"
d="m -6476.0579,1031.9675 c 1.0925,0 2.6683,-0.048 3.7194,-0.012 4.4045,0.1551 7.7839,1.0624 11.8431,1.6053 8.6848,0.9836 15.8877,1.8119 22.5774,1.3045 3.35,-0.4652 4.6718,-2.2896 6.2229,-3.8095 l 12.9884,18.4538 -57.2553,-2.7734 -0.096,-14.7685 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path50"
d="m 66.486048,24.619899 c 7.5e-4,0.240909 -0.01125,0.58853 -0.0025,0.82045 0.0355,0.97198 0.242749,1.716663 0.366374,2.612493 0.225374,1.915837 0.414249,3.504342 0.298374,4.980482 -0.10625,0.738906 -0.522999,1.030538 -0.869873,1.372253 l 4.215114,2.865601 -0.633499,-12.630219 -3.373615,-0.02055 z" /><g
id="g52"
transform="matrix(0,0.22059285,-0.22843688,0,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.26840001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path54"
d="m -6476.0579,1055.3604 c 1.0925,0 2.6683,0.048 3.7194,0.013 4.4045,-0.1551 7.7839,-1.0627 11.8431,-1.6056 8.6848,-0.985 15.8877,-1.8133 22.5774,-1.3059 3.35,0.4669 4.6718,2.291 6.2229,3.8095 l 12.9884,-18.4538 -57.2553,2.7748 -0.096,14.7685 z" /></g><g
id="g56"
transform="matrix(-0.22843688,0,0,-0.23468008,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:30.34600067;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path58"
d="m 1073.7275,5865.2637 -30.1062,-14.4286 -30.1014,14.4363 -7.433,32.4408 20.8395,26.0096 33.4099,0 20.8321,-26.0158 -7.4409,-32.4374 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path60"
d="m 98.919585,50.580588 -2.146869,-2.752723 -19.869322,15.99189 3.131117,4.112262 18.885074,-17.351429 z" /><g
id="g62"
transform="matrix(-0.13387464,-0.17246257,0.17859952,-0.14631709,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.41159999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path64"
d="m 5577.0313,3012.37 15.9896,-0.035 1.0146,-110.4928 -23.6665,-0.2083 6.6623,110.7357 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path66"
d="M 95.325345,45.949654 97.459839,48.713549 77.859267,65.05152 74.654776,60.998971 95.325345,45.949654 z" /><g
id="g68"
transform="matrix(-0.13387464,-0.17246257,0.17859952,-0.14631709,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.41159999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path70"
d="m 5603.881,3012.3717 -15.9925,-0.037 -0.9946,-110.4931 23.6681,-0.201 -6.681,110.7309 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path72"
d="m 102.9072,40.014784 c -1.28224,1.050442 -1.57562,2.862904 -0.65588,4.04921 0.921,1.185279 2.70638,1.295203 3.98874,0.244633 1.28238,-1.050571 1.57575,-2.862905 0.65475,-4.048184 -0.91975,-1.18592 -2.70561,-1.295202 -3.98761,-0.245659" /><g
id="g74"
transform="matrix(-0.12816215,-0.16514286,0.17861202,-0.1462914,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.2744;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path76"
d="m 5852.363,3053.3992 c 0,-7.181 -5.8201,-12.9999 -13.0023,-13.0013 -7.1801,0 -13.0011,5.8235 -12.9999,13.0033 0,7.1788 5.8212,12.9986 13.0013,12.9949 7.1799,0 12.998,-5.8198 13.0009,-12.9969 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path78"
d="m 106.26944,44.282045 c -0.18388,0.150375 -0.44,0.376001 -0.62288,0.514305 -0.76111,0.577358 -1.45736,0.87554 -2.21636,1.333856 -1.59837,1.013716 -2.92537,1.852785 -3.976241,2.8665 -0.496124,0.545383 -0.457749,1.061486 -0.501374,1.553704 l -4.808612,-1.598778 10.006227,-7.365423 2.11924,2.695836 z" /><g
id="g80"
transform="matrix(-0.16787455,0.13753344,-0.14242462,-0.18348065,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.26840001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path82"
d="m -3249.2313,5243.3223 c 1.0933,0 2.664,-0.052 3.7219,-0.013 4.403,0.1539 7.7794,1.0602 11.8409,1.6067 8.6825,0.9833 15.8867,1.8108 22.5788,1.3017 3.3474,-0.4627 4.6661,-2.2856 6.2166,-3.8075 l 12.9912,18.4521 -57.2539,-2.7749 -0.095,-14.7648 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path84"
d="m 102.93845,39.99 c -0.18388,0.151402 -0.455,0.357381 -0.62613,0.509939 -0.71749,0.634118 -1.15586,1.265025 -1.75999,1.923157 -1.317746,1.375206 -2.408993,2.51708 -3.604865,3.344079 -0.628248,0.37613 -1.109122,0.222416 -1.58637,0.156539 L 95.808968,51.09605 105.02582,42.713573 102.93845,39.99 z" /><g
id="g86"
transform="matrix(-0.16787455,0.13753344,-0.14242462,-0.18348065,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.26840001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path88"
d="m -3249.2339,5266.7135 c 1.0976,0 2.668,0.05 3.7202,0.011 4.4071,-0.1545 7.7848,-1.0607 11.8446,-1.6044 8.6862,-0.9839 15.8862,-1.8108 22.578,-1.302 3.3491,0.4632 4.668,2.287 6.2194,3.8072 l 12.9861,-18.4518 -57.2505,2.7689 -0.098,14.771 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path90"
d="m 103.34907,82.246154 0.7565,-3.441418 -24.558183,-5.988805 -1.176746,5.079492 24.978429,4.350731 z" /><g
id="g92"
transform="matrix(-0.04778737,0.21505812,-0.2226994,-0.05222675,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.41159999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path94"
d="m -5847.3578,2171.5747 -15.9939,0.032 -1.0168,110.4913 23.6687,0.207 -6.658,-110.7301 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path96"
d="m 104.63282,76.471804 -0.77237,3.437694 -24.654687,-5.556942 1.085622,-5.10068 24.341435,7.219928 z" /><g
id="g98"
transform="matrix(-0.04778737,0.21505812,-0.2226994,-0.05222675,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.41159999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path100"
d="m -5874.2073,2171.5679 15.9931,0.04 0.9907,110.4919 -23.6673,0.203 6.6835,-110.7352 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path102"
d="m 113.87654,78.861881 c -1.59836,-0.376002 -3.16161,0.518672 -3.49011,1.997381 -0.32813,1.477553 0.70162,2.980148 2.30062,3.355122 1.59812,0.376002 3.16062,-0.519057 3.48987,-1.997766 0.32812,-1.477553 -0.70163,-2.979763 -2.30038,-3.354737" /><g
id="g104"
transform="matrix(-0.04577488,0.20590207,-0.2226994,-0.05225243,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.2744;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path106"
d="m -6133.9467,2130.5761 c 0,7.1785 5.8181,13 13.0008,12.9983 7.1756,0 12.9951,-5.8181 12.9934,-13 0.01,-7.177 -5.8169,-12.9952 -12.9988,-12.9988 -7.177,0 -12.9963,5.8218 -12.9954,13.0005 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path108"
d="m 112.72543,84.222731 c -0.22825,-0.05393 -0.56063,-0.120711 -0.77925,-0.179782 -0.9145,-0.251952 -1.57575,-0.625 -2.39738,-0.948608 -1.76886,-0.651968 -3.23399,-1.194782 -4.66048,-1.406283 -0.72462,-0.05907 -1.09312,0.293431 -1.49562,0.565672 l -1.78124,-4.859515 11.84483,3.443858 -0.73086,3.384658 z" /><g
id="g110"
transform="matrix(-0.20933694,-0.0490934,0.05083736,-0.22878579,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.26840001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path112"
d="m 2265.6285,5497.4356 c 1.0922,0 2.6646,-0.046 3.7191,-0.012 4.4067,0.157 7.7848,1.0615 11.842,1.6055 8.6871,0.9856 15.8868,1.813 22.5785,1.3017 3.3494,-0.4609 4.6676,-2.2825 6.219,-3.8053 l 12.9892,18.4519 -57.2525,-2.7689 -0.095,-14.773 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path114"
d="m 113.91479,78.870998 c -0.22925,-0.05393 -0.55587,-0.142285 -0.778,-0.186074 -0.93086,-0.18081 -1.68386,-0.13869 -2.56111,-0.213556 -1.86837,-0.201741 -3.41749,-0.365857 -4.79237,-0.81069 -0.67811,-0.270187 -0.86136,-0.752388 -1.10836,-1.176931 l -3.65737,3.584088 12.12621,2.177548 0.771,-3.374385 z" /><g
id="g116"
transform="matrix(-0.20933694,-0.0490934,0.05083736,-0.22878579,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.26840001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path118"
d="m 2265.6266,5520.8273 c 1.0955,0 2.6674,0.048 3.7204,0.015 4.4087,-0.1554 7.7848,-1.0642 11.8437,-1.6076 8.6865,-0.9822 15.8857,-1.8093 22.5766,-1.3005 3.3519,0.4629 4.6701,2.2867 6.2195,3.8092 l 12.9914,-18.4544 -57.255,2.7686 -0.097,14.7696 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path120"
d="M 82.060256,105.57792 85.151372,104.04 74.396776,80.580728 l -4.599487,2.22121 12.262967,22.775982 z" /><g
id="g122"
transform="matrix(-0.19346198,0.09570838,-0.09911223,-0.2114368,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.41159999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path124"
d="m -1704.3131,5602.1797 -15.9959,0.035 -1.0163,110.4899 23.6696,0.2089 -6.6574,-110.7337 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path126"
d="m 87.255492,103.00832 -3.098367,1.52274 -11.14222,-23.266646 4.558863,-2.308276 9.681724,24.052182 z" /><g
id="g128"
transform="matrix(-0.19346198,0.09570838,-0.09911223,-0.2114368,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.41159999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path130"
d="m -1731.1657,5602.1774 15.9936,0.038 0.9913,110.4894 -23.6685,0.2032 6.6836,-110.7309 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path132"
d="m 91.200231,111.92345 c -0.712248,-1.518 -2.366619,-2.21581 -3.69674,-1.55832 -1.329872,0.65813 -1.831245,2.42179 -1.120122,3.93967 0.711248,1.51826 2.366619,2.21582 3.696115,1.55756 1.330496,-0.65698 1.83187,-2.42103 1.120747,-3.93891" /><g
id="g134"
transform="matrix(-0.185237,0.09161191,-0.09907473,-0.21144964,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.2744;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path136"
d="m -1806.2385,5560.6793 c 0,7.1805 5.8215,13.0009 13.0028,13.0031 7.1782,0 12.9977,-5.8221 12.9983,-13.0005 0,-7.1799 -5.8204,-13.0003 -13,-12.9986 -7.1804,0 -13.0005,5.8176 -13.0011,12.996 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path138"
d="m 86.402244,114.3405 c -0.10175,-0.21728 -0.258999,-0.5242 -0.348999,-0.73787 -0.379124,-0.8907 -0.506749,-1.65439 -0.772873,-2.51606 -0.606623,-1.82698 -1.107247,-3.34241 -1.83537,-4.62002 -0.407499,-0.61883 -0.905748,-0.69601 -1.363496,-0.84933 l 2.587618,-4.46028 4.763362,11.66119 -3.030242,1.52237 z" /><g
id="g140"
transform="matrix(-0.09316225,-0.1987493,0.20581194,-0.10182098,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.26840001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path142"
d="m 5915.2105,1602.9556 c 1.093,5e-4 2.6634,-0.051 3.7187,-0.013 4.4056,0.1519 7.7811,1.0601 11.8386,1.6055 8.6885,0.9839 15.8874,1.8114 22.5786,1.3023 3.3522,-0.4658 4.6717,-2.2873 6.222,-3.8084 l 12.9909,18.4516 -57.2525,-2.7717 -0.096,-14.7668 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path144"
d="m 91.216106,111.95915 c -0.101625,-0.2174 -0.238124,-0.53445 -0.343374,-0.74044 -0.442499,-0.86013 -0.943873,-1.43864 -1.433871,-2.19026 -1.011998,-1.62613 -1.852495,-2.97296 -2.371869,-4.35433 -0.216874,-0.71309 0.03575,-1.16049 0.205125,-1.6242 l -5.008487,-0.70218 5.904609,11.09655 3.047867,-1.48514 z" /><g
id="g146"
transform="matrix(-0.09316225,-0.1987493,0.20581194,-0.10182098,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.26840001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path148"
d="m 5915.2102,1626.3454 c 1.093,5e-4 2.6634,0.049 3.719,0.015 4.4068,-0.1576 7.7814,-1.0642 11.8418,-1.6073 8.6876,-0.9845 15.8853,-1.8102 22.5771,-1.3051 3.3508,0.4632 4.6675,2.2868 6.2209,3.8126 l 12.9861,-18.4566 -57.2525,2.7734 -0.092,14.7677 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path150"
d="m 51.046089,102.96363 3.097242,1.52339 11.148595,-23.264855 -4.558738,-2.309303 -9.687099,24.050768 z" /><g
id="g152"
transform="matrix(-0.19346198,-0.09572122,0.09912473,-0.2114368,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.41159999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path154"
d="m 3732.2325,4696.5302 -15.9925,0.033 -1.0145,110.4942 23.669,0.2069 -6.662,-110.7343 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path156"
d="M 56.2402,105.53387 53.149459,103.9948 63.90968,80.538479 68.508542,82.761615 56.2402,105.53387 z" /><g
id="g158"
transform="matrix(-0.19346198,-0.09572122,0.09912473,-0.2114368,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.41159999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path160"
d="m 3705.3831,4696.5288 15.9973,0.037 0.9887,110.4928 -23.6687,0.2009 6.6827,-110.7306 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path162"
d="m 51.915337,114.26076 c 0.712123,-1.51788 0.210374,-3.2827 -1.118997,-3.93967 -1.329496,-0.65814 -2.984492,0.0385 -3.697115,1.55652 -0.711123,1.51788 -0.210125,3.28154 1.119372,3.94006 1.330121,0.65813 2.984492,-0.0398 3.69674,-1.55691" /><g
id="g164"
transform="matrix(-0.185212,-0.09166328,0.09914973,-0.21142395,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.2744;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path166"
d="m 3871.7606,4654.3567 c 8e-4,7.181 5.8243,13.003 13.0011,13.0008 7.1782,5e-4 12.9991,-5.8187 12.9997,-13.0006 0,-7.1784 -5.8195,-12.9982 -12.9994,-12.9982 -7.1819,-6e-4 -12.9974,5.8215 -13.0014,12.998 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path168"
d="m 47.08435,111.91511 c 0.10175,-0.21805 0.237374,-0.53549 0.343374,-0.74161 0.442874,-0.85973 0.944247,-1.43812 1.433996,-2.18987 1.011872,-1.62639 1.85237,-2.97219 2.371869,-4.35471 0.216874,-0.71309 -0.03588,-1.16049 -0.204125,-1.62305 l 5.007362,-0.70334 -5.904109,11.09656 -3.048367,-1.48398 z" /><g
id="g170"
transform="matrix(-0.09317475,0.1987493,-0.20581194,-0.10183382,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.26840001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path172"
d="m -4951.7391,3507.378 c -1.0975,0 -2.6668,0.053 -3.7224,0.017 -4.4065,-0.1571 -7.7837,-1.0644 -11.8432,-1.6058 -8.6862,-0.9848 -15.8811,-1.8114 -22.5771,-1.304 -3.3491,0.4626 -4.6666,2.2847 -6.2161,3.8075 l -12.992,-18.4507 57.2536,2.7686 0.097,14.7677 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path174"
d="m 51.897212,114.29685 c 0.10275,-0.21742 0.258999,-0.52575 0.350124,-0.73788 0.378374,-0.89223 0.506624,-1.65593 0.772373,-2.5176 0.606998,-1.82697 1.107622,-3.34125 1.83587,-4.62001 0.407749,-0.61885 0.905248,-0.69487 1.362996,-0.84781 l -2.587618,-4.46092 -4.763612,11.66043 3.029867,1.52379 z" /><g
id="g176"
transform="matrix(-0.09317475,0.1987493,-0.20581194,-0.10183382,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.26840001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path178"
d="m -4951.7379,3483.9904 c -1.0962,0 -2.6697,-0.048 -3.7205,-0.015 -4.4084,0.1573 -7.7868,1.0636 -11.8437,1.607 -8.6876,0.9856 -15.8839,1.8108 -22.5782,1.3033 -3.3517,-0.4643 -4.6684,-2.2869 -6.2195,-3.8094 l -12.989,18.4538 57.2514,-2.7692 0.1,-14.7702 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path180"
d="m 33.681885,76.408495 0.771618,3.437694 24.65644,-5.550521 -1.084998,-5.101579 -24.34306,7.214406 z" /><g
id="g182"
transform="matrix(-0.04777487,-0.21505812,0.2226994,-0.05221391,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.41159999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path184"
d="m 6368.633,136.4414 -15.9914,0.0349 -1.0179,110.4945 23.6696,0.2061 -6.6603,-110.7355 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path186"
d="m 34.964132,82.183101 -0.755748,-3.441289 24.560059,-5.98264 1.175997,5.079491 -24.980308,4.344438 z" /><g
id="g188"
transform="matrix(-0.04777487,-0.21505812,0.2226994,-0.05221391,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.41159999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path190"
d="m 6341.7858,136.44 15.9911,0.0369 0.9918,110.4913 -23.6678,0.2033 6.6849,-110.7315 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path192"
d="m 25.626907,84.150305 c 1.598996,-0.374975 2.628743,-1.876542 2.300244,-3.355123 -0.328499,-1.47858 -1.890745,-2.373383 -3.488741,-1.998408 -1.599116,0.373819 -2.629493,1.876413 -2.301364,3.355122 0.328499,1.478581 1.890735,2.372998 3.489861,1.998409" /><g
id="g194"
transform="matrix(-0.04571238,-0.20591491,0.2227119,-0.05217538,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.2744;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path196"
d="m 6624.6812,93.8699 c 0,7.1801 5.8189,12.9977 12.9999,12.9968 7.1805,6e-4 13.0009,-5.8207 12.9983,-12.9966 0,-7.1795 -5.8178,-13.0025 -12.9991,-12.9999 -7.1805,-6e-4 -13.0006,5.8209 -12.9991,12.9997 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path198"
d="m 24.39978,78.806534 c 0.22863,-0.05265 0.555249,-0.1419 0.778508,-0.184919 0.929748,-0.18158 1.682746,-0.139332 2.559993,-0.214327 1.868365,-0.20097 3.418241,-0.365214 4.793357,-0.809662 0.677128,-0.270444 0.861128,-0.752774 1.108377,-1.177188 l 3.65636,3.5855 -12.125587,2.17498 -0.771008,-3.374384 z" /><g
id="g200"
transform="matrix(-0.20934944,0.04908056,-0.05082486,-0.22879863,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.26840001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path202"
d="m -100.5077,5985.5958 c -1.0914,0 -2.6643,0.049 -3.7197,0.011 -4.4061,-0.1513 -7.7822,-1.0601 -11.8411,-1.603 -8.686,-0.985 -15.8899,-1.8127 -22.5805,-1.3053 -3.3472,0.464 -4.6684,2.2887 -6.2178,3.8114 l -12.987,-18.4558 57.2485,2.7726 0.0976,14.7696 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path204"
d="m 25.588537,84.158652 c 0.229249,-0.05394 0.560618,-0.119427 0.779988,-0.179782 0.913747,-0.251182 1.574996,-0.624359 2.396623,-0.947967 1.768496,-0.651967 3.233622,-1.194653 4.660488,-1.406154 0.724628,-0.05907 1.093877,0.29343 1.495616,0.565287 l 1.780875,-4.85913 -11.843468,3.443858 0.729878,3.383888 z" /><g
id="g206"
transform="matrix(-0.20934944,0.04908056,-0.05082486,-0.22879863,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.26840001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path208"
d="m -100.5077,5962.2049 c -1.0956,0 -2.6652,-0.052 -3.7219,-0.014 -4.4028,0.1551 -7.7792,1.0599 -11.8381,1.6036 -8.687,0.9862 -15.8862,1.8125 -22.5785,1.3028 -3.3494,-0.4606 -4.6721,-2.2844 -6.2206,-3.8052 l -12.9884,18.4524 57.2491,-2.772 0.0984,-14.7674 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path210"
d="M 43.009986,45.898287 40.874742,48.661155 60.471689,65.004263 63.67693,60.953126 43.009986,45.898287 z" /><g
id="g212"
transform="matrix(-0.13388714,0.17246257,-0.17858702,-0.14632993,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.41159999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path214"
d="m -4219.3791,4644.5956 15.993,-0.032 1.0131,-110.4936 -23.6625,-0.2061 6.6564,110.7318 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path216"
d="M 39.414246,50.52858 41.56249,47.775856 61.427311,63.772112 58.29532,67.883219 39.414246,50.52858 z" /><g
id="g218"
transform="matrix(-0.13388714,0.17246257,-0.17858702,-0.14632993,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.41159999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path220"
d="m -4192.5257,4644.6018 -15.9973,-0.04 -0.9896,-110.4882 23.665,-0.2044 -6.6781,110.7329 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path222"
d="m 32.095139,44.254692 c 1.282377,1.050185 3.068122,0.941417 3.98799,-0.243862 0.920497,-1.18515 0.627128,-2.998768 -0.654119,-4.04921 -1.282246,-1.050571 -3.067751,-0.941417 -3.988619,0.243861 -0.920247,1.185536 -0.627248,2.998384 0.654748,4.049211" /><g
id="g224"
transform="matrix(-0.12821215,0.16510434,-0.17857452,-0.14635561,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.2744;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path226"
d="m -4379.2058,4686.834 c -3e-4,-7.1787 -5.8215,-12.9999 -12.9986,-12.9979 -7.179,-6e-4 -13.0014,5.8226 -13.0031,12.9988 0,7.1802 5.8215,13 13.0009,13.0005 7.1793,0 13.0022,-5.8192 13.0008,-13.0014 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path228"
d="m 35.39676,39.937863 c 0.18387,0.150375 0.454989,0.35751 0.626499,0.508527 0.717498,0.634503 1.155487,1.266052 1.758495,1.923542 1.319242,1.375976 2.40949,2.518236 3.605361,3.345234 0.628249,0.375617 1.108997,0.222416 1.586371,0.156539 l -0.447874,5.171951 -9.215846,-8.383248 2.086994,-2.722545 z" /><g
id="g230"
transform="matrix(-0.16787455,-0.13754628,0.14243712,-0.18346781,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.26840001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path232"
d="m 4985.5952,3965.326 c -1.0933,0 -2.6668,0.051 -3.7182,0.016 -4.4047,-0.1539 -7.7865,-1.065 -11.8409,-1.607 -8.6896,-0.985 -15.8882,-1.8124 -22.5799,-1.3033 -3.3489,0.4609 -4.6664,2.2841 -6.2192,3.8072 l -12.9867,-18.4533 57.2485,2.7743 0.096,14.7662 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path234"
d="m 32.065019,44.22888 c 0.18387,0.150375 0.440739,0.376002 0.622869,0.514434 0.761128,0.577615 1.457746,0.875412 2.216374,1.33437 1.597996,1.014229 2.924992,1.852913 3.97636,2.866629 0.495999,0.545382 0.457374,1.061871 0.501374,1.55396 l 4.808612,-1.598649 -10.005594,-7.366579 -2.119995,2.695835 z" /><g
id="g236"
transform="matrix(-0.16787455,-0.13754628,0.14243712,-0.18346781,307.56315,1453.1993)"><path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:0.26840001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path238"
d="m 4985.5975,3941.9365 c -1.0933,3e-4 -2.6654,-0.049 -3.7205,-0.014 -4.4053,0.154 -7.7836,1.0656 -11.8429,1.6047 -8.6839,0.9848 -15.887,1.8114 -22.5788,1.3028 -3.3485,-0.4637 -4.6672,-2.2867 -6.2183,-3.8063 l -12.9901,18.4504 57.2505,-2.7686 0.1001,-14.7688 z" /></g><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path240"
d="m 73.354779,57.337705 c 0.0535,1.289039 1.085247,2.317393 2.352994,2.317393 0.519498,0 0.998497,-0.171435 1.387621,-0.463067 l 0.611248,0.299209 -1.251121,2.65731 -5.482236,-2.716253 1.244747,-2.657696 1.136747,0.563104 z" /><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path242"
d="m 82.303005,65.916787 c -0.947873,0.846389 -1.086747,2.317778 -0.297374,3.335089 0.323874,0.417223 0.753373,0.694987 1.218246,0.825971 l 0.153375,0.677779 -2.802742,0.651583 -1.350997,-6.096802 2.799118,-0.657361 0.280374,1.263741 z" /><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path244"
d="m 81.362632,78.447226 c -1.234246,-0.233589 -2.440618,0.571194 -2.722742,1.840842 -0.115875,0.519827 -0.0595,1.038885 0.131124,1.49322 l -0.420248,0.545639 -2.243994,-1.844437 3.798489,-4.885841 2.244994,1.837889 -0.787623,1.012688 z" /><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path246"
d="m 71.240035,85.50047 c -0.591624,-1.137637 -1.95687,-1.6043 -3.097867,-1.039656 -0.467749,0.231149 -0.827373,0.599831 -1.055122,1.035932 l -0.677123,0 0.005,-2.951768 6.087483,0 0,2.94997 -1.261871,-0.001 z" /><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path248"
d="m 59.572316,81.726711 c 0.496124,-1.185664 7.5e-4,-2.572556 -1.141247,-3.137457 -0.467748,-0.231534 -0.971872,-0.290477 -1.445621,-0.200586 l -0.423874,-0.542685 2.248619,-1.836862 3.792365,4.891234 -2.244244,1.840072 -0.785998,-1.013716 z" /><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path250"
d="m 55.117078,70.006576 c 1.210622,-0.34043 1.957245,-1.602373 1.675621,-2.87215 -0.11525,-0.519827 -0.384874,-0.961707 -0.748748,-1.286727 l 0.148124,-0.67855 2.800243,0.6607 -1.358122,6.09616 -2.799242,-0.655306 0.282124,-1.264127 z" /><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path252"
d="m 61.258562,59.140664 c 1.013747,0.760094 2.440368,0.572992 3.230491,-0.445089 0.323499,-0.416453 0.492499,-0.908671 0.512999,-1.403715 l 0.608498,-0.304217 1.241872,2.661933 -5.484986,2.709705 -1.246621,-2.657568 1.137747,-0.561049 z" /></svg>

After

Width:  |  Height:  |  Size: 36 KiB

703
gulpfile.js Normal file
View File

@ -0,0 +1,703 @@
var gulp = require('gulp'),
wiredep = require('wiredep').stream,
eventStream = require('event-stream'),
gulpLoadPlugins = require('gulp-load-plugins'),
fs = require('fs'),
path = require('path'),
url = require('url'),
uri = require('urijs'),
urljoin = require('url-join'),
s = require('underscore.string'),
stringifyObject = require('stringify-object'),
hawtio = require('hawtio-node-backend'),
argv = require('yargs').argv,
del = require('del'),
xml2js = require('xml2js'),
multipart = require('connect-multiparty'),
resumable = require('./app/resumable-node.js')(__dirname + '/uploads'),
app = hawtio.app,
shellprocess = require('child_process'),
xmloperation = require('./app/xmloperation'),
rootdir = process.env.STORAGE_PATH || '/home/server_data/',
k8s = require('k8s'),
crontab = require('node-crontab'),
myjs=require('./app/my.js');
var oracledb = require('oracledb');
var plugins = gulpLoadPlugins({});
var pkg = require('./package.json');
var time =0;
var schedule = [];
var kubectl = k8s.kubectl({
endpoint: process.env.KUBERNETES_MASTER
, binary: '/usr/bin/kubectl'
});
var config = {
main: '.',
ts: ['plugins/**/*.ts'],
less: ['plugins/**/*.less'],
templates: ['plugins/**/*.html'],
templateModule: pkg.name + '-templates',
dist: argv.out || './dist/',
js: pkg.name + '.js',
css: pkg.name + '.css',
tsProject: plugins.typescript.createProject({
target: 'ES5',
module: 'commonjs',
declarationFiles: true,
noExternalResolve: false
})
};
gulp.task('bower', function() {
return gulp.src('index.html')
.pipe(wiredep({}))
.pipe(gulp.dest('.'));
});
/** Adjust the reference path of any typescript-built plugin this project depends on */
gulp.task('path-adjust', function() {
return gulp.src('libs/**/includes.d.ts')
.pipe(plugins.replace(/"\.\.\/libs/gm, '"../../../libs'))
.pipe(gulp.dest('libs'));
});
gulp.task('clean-defs', function() {
return del('defs.d.ts');
});
gulp.task('tsc', ['clean-defs'], function() {
var cwd = process.cwd();
var tsResult = gulp.src(config.ts)
.pipe(plugins.sourcemaps.init())
.pipe(plugins.typescript(config.tsProject))
.on('error', plugins.notify.onError({
message: '<%= error.message =>',
title: 'Typescript compilation error'
}));
return eventStream.merge(
tsResult.js
.pipe(plugins.concat('compiled.js'))
.pipe(plugins.sourcemaps.write())
.pipe(gulp.dest('.')),
tsResult.dts
.pipe(gulp.dest('d.ts')))
.pipe(plugins.filter('**/*.d.ts'))
.pipe(plugins.concatFilenames('defs.d.ts', {
root: cwd,
prepend: '/// <reference path="',
append: '"/>'
}))
.pipe(gulp.dest('.'));
});
gulp.task('less', function () {
return gulp.src(config.less)
.pipe(plugins.less({
paths: [ path.join(__dirname, 'less', 'includes') ]
}))
.on('error', plugins.notify.onError({
message: '<%= error.message %>',
title: 'less file compilation error'
}))
.pipe(plugins.concat(config.css))
.pipe(gulp.dest(config.dist));
});
gulp.task('template', ['tsc'], function() {
return gulp.src(config.templates)
.pipe(plugins.angularTemplatecache({
filename: 'templates.js',
root: 'plugins/',
standalone: true,
module: config.templateModule,
templateFooter: '}]); hawtioPluginLoader.addModule("' + config.templateModule + '");'
}))
.pipe(gulp.dest('.'));
});
gulp.task('concat', ['template'], function() {
return gulp.src(['compiled.js', 'templates.js'])
.pipe(plugins.concat(config.js))
.pipe(plugins.ngAnnotate())
.pipe(gulp.dest(config.dist));
});
gulp.task('clean', ['concat'], function() {
return del(['templates.js', 'compiled.js', './site/']);
});
gulp.task('watch-less', function() {
plugins.watch(config.less, function() {
gulp.start('less');
});
});
gulp.task('watch', ['build', 'watch-less'], function() {
plugins.watch(['libs/**/*.js', 'libs/**/*.css', 'index.html', config.dist + '/*'], function() {
gulp.start('reload');
});
plugins.watch(['libs/**/*.d.ts', config.ts, config.templates], function() {
gulp.start(['tsc', 'template', 'concat', 'clean']);
});
});
gulp.task('connect', ['watch'], function() {
// lets disable unauthorised TLS issues with kube REST API
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
var kubeBase = process.env.KUBERNETES_MASTER || 'https://localhost:8443';
console.log("==== using KUBERNETES URL: " + kubeBase);
var kube = uri(urljoin(kubeBase, 'api'));
var oapi = uri(urljoin(kubeBase, 'oapi'));
console.log("Connecting to Kubernetes on: " + kube);
var staticAssets = [{
path: '/',
dir: '.'
}];
var dirs = fs.readdirSync('./libs');
dirs.forEach(function(dir) {
var dir = './libs/' + dir;
console.log("dir: ", dir);
if (fs.statSync(dir).isDirectory()) {
console.log("Adding directory to search path: ", dir);
staticAssets.push({
path: '/',
dir: dir
});
}
});
var localProxies = [];
if (process.env.LOCAL_APP_LIBRARY === "true") {
localProxies.push({
proto: "http",
port: "8588",
hostname: "localhost",
path: '/api/v1/proxy/namespaces/default/services/app-library',
targetPath: "/"
});
console.log("because of $LOCAL_APP_LIBRARY being true we are using a local proxy for /api/v1/proxy/namespaces/default/services/app-library" );
}
if (process.env.LOCAL_FABRIC8_FORGE === "true") {
localProxies.push({
proto: "http",
port: "8080",
hostname: "localhost",
path: '/api/v1/proxy/namespaces/default/services/fabric8-forge',
targetPath: "/"
});
console.log("because of LOCAL_FABRIC8_FORGE being true we are using a local proxy for /api/v1/proxy/namespaces/default/services/fabric8-forge" );
}
if (process.env.LOCAL_GOGS_HOST) {
var gogsPort = process.env.LOCAL_GOGS_PORT || "3000";
//var gogsHostName = process.env.LOCAL_GOGS_HOST + ":" + gogsPort;
var gogsHostName = process.env.LOCAL_GOGS_HOST;
console.log("Using gogs host: " + gogsHostName);
localProxies.push({
proto: "http",
port: gogsPort,
hostname: gogsHostName,
path: '/kubernetes/api/v1/proxy/services/gogs-http-service',
targetPath: "/"
});
console.log("because of LOCAL_GOGS_HOST being set we are using a local proxy for /kubernetes/api/v1/proxy/services/gogs-http-service to point to http://"
+ process.env.LOCAL_GOGS_HOST + ":" + gogsPort);
}
var defaultProxies = [{
proto: kube.protocol(),
port: kube.port(),
hostname: kube.hostname(),
path: '/kubernetes/api',
targetPath: kube.path()
}, {
proto: oapi.protocol(),
port: oapi.port(),
hostname: oapi.hostname(),
path: '/kubernetes/oapi',
targetPath: oapi.path()
}, {
proto: kube.protocol(),
hostname: kube.hostname(),
port: kube.port(),
path: '/jolokia',
targetPath: '/hawtio/jolokia'
}, {
proto: kube.protocol(),
hostname: kube.hostname(),
port: kube.port(),
path: '/git',
targetPath: '/hawtio/git'
}];
var staticProxies = localProxies.concat(defaultProxies);
hawtio.setConfig({
port: process.env.DEV_PORT || 9000,
staticProxies: staticProxies,
staticAssets: staticAssets,
fallback: 'index.html',
liveReload: {
enabled: true
}
});
var debugLoggingOfProxy = process.env.DEBUG_PROXY === "true";
var useAuthentication = process.env.DISABLE_OAUTH !== "true";
var googleClientId = process.env.GOOGLE_OAUTH_CLIENT_ID;
var googleClientSecret = process.env.GOOGLE_OAUTH_CLIENT_SECRET;
hawtio.use('/osconsole/config.js', function(req, res, next) {
var config = {
api: {
openshift: {
proto: oapi.protocol(),
hostPort: oapi.host(),
prefix: oapi.path()
},
k8s: {
proto: kube.protocol(),
hostPort: kube.host(),
prefix: kube.path()
}
}
};
if (googleClientId && googleClientSecret) {
config.master_uri = kubeBase;
config.google = {
clientId: googleClientId,
clientSecret: googleClientSecret,
authenticationURI: "https://accounts.google.com/o/oauth2/auth",
authorizationURI: "https://accounts.google.com/o/oauth2/auth",
scope: "profile",
redirectURI: "http://localhost:9000"
};
} else if (useAuthentication) {
config.master_uri = kubeBase;
config.openshift = {
oauth_authorize_uri: urljoin(kubeBase, '/oauth/authorize'),
oauth_client_id: 'fabric8'
};
}
var answer = "window.OPENSHIFT_CONFIG = " + stringifyObject(config);
res.set('Content-Type', 'application/javascript');
res.send(answer);
});
app.use(multipart());
hawtio.use('/', function(req, res, next) {
// console.log(req.connection.remoteAddress);
var path = req.originalUrl;
// avoid returning these files, they should get pulled from js
if (s.startsWith(path, '/plugins/') && s.endsWith(path, 'html')) {
console.log("returning 404 for: ", path);
res.statusCode = 404;
res.end();
} else {
if (debugLoggingOfProxy) {
console.log("allowing: ", path);
}
next();
}
});
hawtio.use('/xmlformserver',function(req,res,next){
if(req.method=='POST') {
var data = [];
var parser = new xml2js.Parser();
fs.readFile(rootdir + 'data.xml', function(err, xml) {
parser.parseString(xml, function (err, result) {
myjs.Recursion(result.node);
data.push(result.node);
res.send(data);
});
});
}
});
hawtio.use("/oracleAppPath",function(req,res){
var dataPath = "/home/ubuntu/data/";
var tmpPath = "/home/ubuntu/tmp/app";
var appSource="/home/app";
if(req.method="POST"){
var timestamp=new Date().getTime();
if((timestamp - time) >= 60*1000){
time = timestamp;
var dirName= myjs.randomString(10);
dataPath = dataPath + dirName+"/";
fs.mkdirSync(dataPath);
//path.exists(tmpPath,function(exists){if(exists) console.log("exists");});
fs.renameSync(tmpPath, dataPath+"app");
console.log("move 'home/ubuntu/tmp/app' to " + dataPath);
res.send(200,{path:dataPath+"app/"});
res.end();
shellprocess.exec("cp -rp " + appSource + " " + tmpPath);
}else{
res.send(403,{});
res.end();
}
}
//}
});
hawtio.use('/uploadfiles',function(req,res){
if(req.method==="POST"){
var relativePath = req.body.resumableRelativePath;
var fileName = req.body.resumableFilename;
var rootpath = req.body.resumableRootPath;
console.log("--------------------------req.body-----------------");
if(req.body.resumableTotalSize == "0"){
fs.writeFile("uploads/"+fileName,"");
// 去掉系统路径(地区及系统编号)eg: 321100_1/
relativePath = relativePath.replace(/^\w*\/*[0-9_]+\//, "");
console.log("*************-----clean------*****************");
var serverRelativePath = rootdir + rootpath + relativePath;
console.log(serverRelativePath);
fileName = "uploads/"+fileName;
console.log(fileName);
changefilename(fileName, serverRelativePath);
}
resumable.post(req, function(status, filename, original_filename, identifier){
if (status === 'done') {
var stream = fs.createWriteStream('./uploads/' + filename);
console.log("//ºÏ²¢Îļþ");
//ºÏ²¢Îļþ
resumable.write(identifier, stream);
stream.on('data', function(data){});
stream.on('end', function(){});
//ɾ³ý·Ö¿é
//µÈ´ýÁ÷½áÊø
stream.on('finish', function() {
console.log("*************-----clean------*****************");
// 去掉系统路径(地区及系统编号)eg: 321100_1/
relativePath = relativePath.replace(/^\w*\/*[0-9_]+\//, "");
relativePath = rootdir+ rootpath + relativePath;
console.log(relativePath);
fileName = "uploads/"+fileName;
console.log(fileName);
changefilename(fileName, relativePath);
resumable.clean(identifier);
});
}
console.log(status + "---------------------");
res.send(200, {
// NOTE: Uncomment this funciton to enable cross-domain request.
//'Access-Control-Allow-Origin': '*'
});
});
}
if(req.method==="GET"){
resumable.get(req, function(status, filename, original_filename, identifier){
console.log('GET',status);
res.send((status == 'found' ? 200 : 404), status);
});
}
//next();
});
hawtio.use('/download/:identifier', function(req, res){
resumable.write(req.params.identifier, res);
});
app.get('/getclientip', function(req, res){
var ip = req.connection.remoteAddress;
ip = ip.replace(/\./gim, "");
ip = ip.replace(/\:/gim, "");
res.send(ip);
});
app.get('/getversion', function(req, res){
var version = req.query;
var objid = version.id;
var realversion = xmloperation.getVersionPath(objid);
res.send(200, {id:realversion});
});
app.get('/sendDateMessage', function(req, res){
var jsonobj = req.query;
console.log("---------------------------------------------------");
console.log(jsonobj);
var objid = jsonobj.id;
var objname = jsonobj.name;
var objcity = jsonobj.city;
var objcounty = jsonobj.county;
var objsystem = jsonobj.system;
var objtype = jsonobj.type;
var objbatch = jsonobj.batch;
var province = jsonobj.province;
var code = jsonobj.code;
var character_set = jsonobj.character_set;
var sys_name_code = jsonobj.sys_name_code;
var contact = jsonobj.contact;
var phone = jsonobj.phone;
var collecttime = jsonobj.date;
var realversion = xmloperation.getVersionPath(objid);
var realpath = objtype+"/"+objbatch+"/"+objid+"/"+realversion+"/"
realpath = rootdir + realpath;
//saveByIdToXml("001001", "B", "321200_0", "泰州市_绩效管理系统2","江苏" , "泰州2", "市本级", "绩效管理系统", "321200_0", "0000", "lim", "13323225656",5);
xmloperation.saveByIdToXml(collecttime, objtype, objbatch, objid, objname, province, objcity, objcounty, objsystem, code, sys_name_code, contact, phone, realversion, realpath)
xmloperation.mkdataForPage(collecttime, objtype, realpath, objbatch, objid, objname, realversion);
res.send(200);
});
// 路径必须存在
function changefilename(oldfilepath, newfilepath){
fs.stat(oldfilepath,function(err,stats){
if(err){
changefilename(oldfilepath, newfilepath);
}
else{
//console.log("-------------------------------changefilename----");
if(stats.isFile()){
// 修改文件名
fs.rename(oldfilepath,newfilepath, function(err){
if(err){
var dirs = newfilepath.split("/");
var dirLength = dirs.length;
var dirpath = "";
//var isSuccess = "false";
for(var i=0; i < dirLength-1; i++){
dirpath = dirpath + dirs[i] + "/";
fs.mkdir(dirpath, 0777, function(err){
if(err){
//console.log("creat dir fail: "+dirpath);
}
});
}
changefilename(oldfilepath, newfilepath)
}
});
}else if(stats.isDirectory()){
var dirs = newfilepath.split("/");
var dirLength = dirs.length;
var dirpath = "";
for(var i=0; i < dirLength; i++){
dirpath = dirpath + dirs[i] + "/";
fs.mkdir(dirpath, 0777, function(err){
if(err){
//console.log("creat dir fail: "+dirpath);
}
});
}
console.log(" fail: this is Directory");
}else{
console.log("unknow type of file");
}
}
});
}
app.get('/setchmod2dir', function(req, res){
console.log("----------- setchmod2dir -------------------")
console.log(req.query);
var path = rootdir + req.query.path;
var tempfilesNum = req.query.filenum;
var realfilesnum = geFileList(path);
if(tempfilesNum <= realfilesnum){
shellprocess.exec("chmod -R 777 " + path);
console.log("------------------------------------------ "+path);
console.log(realfilesnum);
res.send(200,"chmod");
}
else{
console.log(realfilesnum);
res.send(200,"fail");
}
});
hawtio.use('/resumable.js',function(req,res){
res.setHeader("content-type", "text/javascript");
fs.createReadStream("./app/resumable.js").pipe(res);
});
/*hawtio.use('/style.css',function(req,res){
res.setHeader("content-type", "text/css");
fs.createReadStream("./app/style.css").pipe(res);
});*/
hawtio.use('/connectToOracle',function(req,res){
var rcName = req.query.oracleName;
var connectParam = req.query.param;
var taskIndex = -1;
for(var index in schedule){
var connectionTask = schedule[index];
if(connectionTask.hasOwnProperty("taskName") && connectionTask.taskName === rcName){
clearInterval(connectionTask[taskCrontab]);
taskIndex = index;
break;
}
}
if(taskIndex !== -1)
schedule.splice(taskIndex,1);
kubectl.rc.get(rcName,function(err, rc){
console.log(rc);
if(err){
console.log(err);
return
}
if(rc && rc.status.replicas === 1 && rc.metadata.labels.hasOwnProperty("style") && rc.metadata.labels.style === "oracle"){
var selector = rc.spec.selector;
var task = {
taskName: rcName,
taskTime: 0,
taskCrontab: crontab.scheduleJob("*/1 * * * *", function(){ //This will call this function every 2 minutes
console.log(rcName + "it's been 1 minutes!");
if(task.taskTime === 9){
kubectl.command("label rc " +rcName + " status=2 --overwrite" ,function(err, data){
if(err)
console.log(err);
crontab.cancelJob(task.taskCrontab);
});
}
/*kubectl.
oracledb.getConnection(
{
user : "system",
password : "oracle",
connectString : connectParam+"/orcl"
},function(err, connection){
if (err) {
console.log("connection failed! message" + err.message);
return;
}
console.log("connect success!");
kubectl.command("label rc " +rcName + " status=1 --overwrite" ,function(err, data){
if(err)
console.log(err);
crontab.cancelJob(task.taskCrontab);
});
if(connection !== null){
connection.close(function(err){
if (err){
console.error(err.message);
}
console.log("connection closed!");
});
}
});*/
task.taskTime++;
})
}
schedule.push(task);
}
res.send(200,"Ok");
res.end();
});
});
hawtio.use('/cancelOracleConection',function(req,res){
var rcName = req.query.oracleName;
console.log(rcName);
var taskIndex = -1;
for(var index in schedule){
var connectionTask = schedule[index];
console.log(connectionTask.taskName);
if(connectionTask.hasOwnProperty("taskName") && connectionTask.taskName === rcName){
console.log(connectionTask.taskCrontab);
clearInterval(connectionTask.taskCrontab);
console.log("connectionTask: " + rcName + "cancel");
taskIndex = index;
break;
}
}
if(taskIndex !== -1)
schedule.splice(taskIndex,1);
res.send(200,"Ok");
res.end();
});
hawtio.listen(function(server) {
var host = server.address().address;
var port = server.address().port;
console.log("started from gulp file at ", host, ":", port);
});
});
gulp.task('reload', function() {
gulp.src('.')
.pipe(hawtio.reload());
});
gulp.task('build', ['bower', 'path-adjust', 'tsc', 'less', 'template', 'concat', 'clean']);
gulp.task('site', ['clean', 'build'], function() {
gulp.src(['index.html', 'osconsole/config.js.tmpl', 'css/**', 'images/**', 'img/**', 'libs/**', 'dist/**'], {base: '.'}).pipe(gulp.dest('site'));
var dirs = fs.readdirSync('./libs');
dirs.forEach(function(dir) {
var path = './libs/' + dir + "/img";
try {
if (fs.statSync(path).isDirectory()) {
console.log("found image dir: " + path);
var pattern = 'libs/' + dir + "/img/**";
gulp.src([pattern]).pipe(gulp.dest('site/img'));
}
} catch (e) {
// ignore, file does not exist
}
});
});
gulp.task('default', ['connect']);
function geFileList(path)
{
var filesList = [];
  readFile(path,filesList);
return filesList.length;
}
//遍历读取文件
function readFile(path,filesList)
{
files = fs.readdirSync(path);//需要用到同步读取
files.forEach(walk);
function walk(file)
{
states = fs.statSync(path+'/'+file);  
   if(states.isDirectory())
   {
   readFile(path+'/'+file,filesList);
   }
else{
   //创建一个对象保存信息
    var obj = new Object();
    obj.size = states.size;//文件大小,以字节为单位
    obj.name = file;//文件名
    obj.path = path+'/'+file; //文件绝对路径
    filesList.push(obj);
   }
  }
}

9
hawtio-kubernetes.iml Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

316
img/host.svg Normal file
View File

@ -0,0 +1,316 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:cc="http://web.resource.org/cc/"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:ns1="http://sozi.baierouge.fr"
id="svg1612"
sodipodi:docname="sagar_ns_server.svg"
viewBox="0 0 359.37 469.36"
sodipodi:version="0.32"
version="1.0"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
inkscape:version="0.45.1"
sodipodi:docbase="/Users/johnolsen/Pictures/svg"
>
<defs
id="defs1614"
>
<linearGradient
id="linearGradient29808"
y2="654.74"
xlink:href="#linearGradient24757"
gradientUnits="userSpaceOnUse"
x2="191.45"
gradientTransform="translate(225.21 -257.03)"
y1="654.74"
x1="177.95"
inkscape:collect="always"
/>
<linearGradient
id="linearGradient29806"
y2="611.48"
xlink:href="#linearGradient24757"
gradientUnits="userSpaceOnUse"
x2="306.18"
gradientTransform="translate(-9.0156 192.16)"
y1="596.63"
x1="309.71"
inkscape:collect="always"
/>
<linearGradient
id="linearGradient24757"
>
<stop
id="stop24759"
style="stop-color:#d5d5d5"
offset="0"
/>
<stop
id="stop24761"
style="stop-color:#848484;stop-opacity:0"
offset="1"
/>
</linearGradient
>
<linearGradient
id="linearGradient29804"
y2="560.57"
xlink:href="#linearGradient24757"
gradientUnits="userSpaceOnUse"
x2="379.72"
y1="560.57"
x1="253.14"
inkscape:collect="always"
/>
<linearGradient
id="linearGradient29802"
y2="949.11"
xlink:href="#linearGradient22094"
gradientUnits="userSpaceOnUse"
x2="659.71"
gradientTransform="translate(-220.88 106.92)"
y1="400.17"
x1="491.76"
inkscape:collect="always"
/>
<linearGradient
id="linearGradient29800"
y2="482.62"
gradientUnits="userSpaceOnUse"
x2="265.58"
gradientTransform="translate(-208.22 109.74)"
y1="306.18"
x1="705.01"
inkscape:collect="always"
>
<stop
id="stop22985"
style="stop-color:#000000"
offset="0"
/>
<stop
id="stop22987"
style="stop-color:#000000;stop-opacity:0"
offset="1"
/>
</linearGradient
>
<linearGradient
id="linearGradient22094"
>
<stop
id="stop22096"
style="stop-color:#000000"
offset="0"
/>
<stop
id="stop22098"
style="stop-color:#000000;stop-opacity:0"
offset="1"
/>
</linearGradient
>
<linearGradient
id="linearGradient29798"
y2="211.3"
xlink:href="#linearGradient22094"
gradientUnits="userSpaceOnUse"
x2="576.57"
gradientTransform="translate(-208.22 109.74)"
y1="133.76"
x1="575.89"
inkscape:collect="always"
/>
</defs
>
<sodipodi:namedview
id="base"
bordercolor="#666666"
inkscape:pageshadow="2"
inkscape:window-y="176"
pagecolor="#ffffff"
inkscape:window-height="581"
inkscape:zoom="0.7"
inkscape:window-x="176"
borderopacity="1.0"
inkscape:current-layer="layer1"
inkscape:cx="454.3678"
inkscape:cy="517.33549"
inkscape:window-width="756"
inkscape:pageopacity="0.0"
inkscape:document-units="px"
/>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer"
transform="translate(-226.03 -301.23)"
>
<g
id="g29774"
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="c:\documents and settings\602654809\My Documents\My Icons\text9507.png"
transform="matrix(.95252 0 0 .80631 78.742 104.9)"
>
<path
id="path29776"
style="fill-rule:evenodd;fill:#ffffff"
d="m154.75 296.11l209-52.5 167.75 5.75-3 363.25-125.25 213-233.75-56.5-14.75-473z"
/>
<g
id="g29778"
>
<path
id="path29780"
sodipodi:nodetypes="ccccc"
style="fill-rule:evenodd;fill:url(#linearGradient29798)"
d="m363.7 243.5l168.21 6.13-127.82 56.4-249.31-9.77 208.92-52.76z"
/>
<path
id="path29782"
sodipodi:nodetypes="ccccc"
style="fill-rule:evenodd;fill:url(#linearGradient29800)"
d="m531.39 249.13l-3.1 362.98-125.04 212.97 0.18-519.27 127.96-56.68z"
/>
<path
id="path29784"
sodipodi:nodetypes="ccccc"
style="fill-rule:evenodd;fill:url(#linearGradient29802)"
d="m154.63 296.26l249.02 9.38-0.18 519.59-233.54-56.28-15.3-472.69z"
/>
<path
id="path29786"
sodipodi:nodetypes="ccccc"
style="fill-rule:evenodd;fill:url(#linearGradient29804)"
d="m253.14 300l124.46 4.6 2.47 514.77-33.29-7.78-93.64-511.59z"
/>
<path
id="path29788"
sodipodi:nodetypes="ccccc"
style="fill-rule:evenodd;fill:url(#linearGradient29806)"
d="m169.88 768.99l-0.53-16.09 233.7 53.39-0.06 18.38-233.11-55.68z"
/>
<path
id="path29790"
sodipodi:nodetypes="ccccc"
style="fill-rule:evenodd;fill:url(#linearGradient29808)"
d="m403.76 306.01l12.9-5.48v502.75l-13.49 21.57 0.59-518.84z"
/>
<path
id="path29792"
sodipodi:nodetypes="ccccc"
style="fill-rule:evenodd;fill:#3c36d3"
d="m352.16 337.78l39.58 2.22-0.76 11.63-39.42-2.26 0.6-11.59z"
/>
<path
id="path29794"
sodipodi:nodetypes="ccccc"
style="fill-rule:evenodd;fill:#3c36d3"
d="m352.16 371.94l39.58 2.22-0.76 11.63-39.42-2.26 0.6-11.59z"
/>
<path
id="path29796"
sodipodi:nodetypes="ccccc"
style="fill-rule:evenodd;fill:#3c36d3"
d="m352.16 406.1l39.58 2.22-0.76 11.63-39.42-2.26 0.6-11.59z"
/>
</g
>
</g
>
</g
>
<metadata
>
<rdf:RDF
>
<cc:Work
>
<dc:format
>image/svg+xml</dc:format
>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage"
/>
<cc:license
rdf:resource="http://creativecommons.org/licenses/publicdomain/"
/>
<dc:publisher
>
<cc:Agent
rdf:about="http://openclipart.org/"
>
<dc:title
>Openclipart</dc:title
>
</cc:Agent
>
</dc:publisher
>
<dc:title
>Server Cabinet CPU</dc:title
>
<dc:date
>2007-09-03T13:59:19</dc:date
>
<dc:description
>Represents a server in Network Diagrams</dc:description
>
<dc:source
>https://openclipart.org/detail/5159/server-cabinet-cpu-by-sagar_ns</dc:source
>
<dc:creator
>
<cc:Agent
>
<dc:title
>sagar_ns</dc:title
>
</cc:Agent
>
</dc:creator
>
<dc:subject
>
<rdf:Bag
>
<rdf:li
>mainframe</rdf:li
>
<rdf:li
>server</rdf:li
>
</rdf:Bag
>
</dc:subject
>
</cc:Work
>
<cc:License
rdf:about="http://creativecommons.org/licenses/publicdomain/"
>
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction"
/>
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution"
/>
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks"
/>
</cc:License
>
</rdf:RDF
>
</metadata
>
</svg
>

After

Width:  |  Height:  |  Size: 8.5 KiB

BIN
img/icons1.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 B

Some files were not shown because too many files have changed in this diff Show More