"JOB_READ_LOG": "/api/job/log/"
},
"PACKAGE": {
- "TEST": "testtest"
+ "EXPORT": "/api/exports/"
},
"IMAGE": {
"IMAGE_GET_ALL_COUNT": "/api/image/count/",
});
ticCoreReq.write(postData);
+
+ ticCoreReq.on('error', function (err) {
+ res.send({
+ result: 'false',
+ message: err.message
+ })
+ });
+
ticCoreReq.end();
};
});
ticCoreReq.write(postData);
+
+ ticCoreReq.on('error', function (err) {
+ res.send({
+ result: 'false',
+ message: err.message
+ })
+ });
+
ticCoreReq.end();
};
</div><!-- /.container -->
</nav>
-
<!-- Package Section -->
<section id="tic-package-section">
<div class="container">
<!-- Package Left Column -->
<div class="col-md-6">
<div class="panel panel-primary">
+ <div class="panel-heading">
+ <h3 class="panel-title">Package List</h3>
+ </div>
<div class="panel-body">
- <!-- Profile Toolbar -->
- <div class="btn-group btn-group-justified">
- <div class="btn-group">
- <button type="button" class="btn btn-primary">All</button>
- </div>
- <div class="btn-group">
- <button type="button" class="btn btn-primary">Common</button>
- </div>
- <div class="btn-group">
- <button type="button" class="btn btn-primary">Mobile</button>
- </div>
- <div class="btn-group">
- <button type="button" class="btn btn-primary">Wearable</button>
- </div>
- <div class="btn-group">
- <button type="button" class="btn btn-primary">TV</button>
- </div>
- </div>
<!-- Package Tree Toolbar -->
<div id="tic-package-left-col-tree-toolbar">
<div class="input-group">
.catch(function (reason) {
logger.error(reason);
Util.showLoadingDialog(false);
- Util.showAlertDialog('Failed to load package list.<br>Please check the tic-core.');
+ Util.showAlertDialog('Failed to load package list.<br>Please check the tic-core.<br>Error: ' + reason);
});
// Keep the state of the active item on navbar
var groups = null;
var groupId = 0;
- // template for the URL
- var URL_EXPORTS = '<%= url %>/api/exports';
-
var JOB_STATUS_INPROGRESS = 'INPROGRESS';
// AppConfig
Job.doCreateAnImage(msgData);
}
- function getExportsUrl() {
- var url = _.template(URL_EXPORTS)({
- url: location.origin
- });
-
- logger.info('onClickHandlerForImgCreationBtn.getExportsUrl: ' + url);
- return url ;
- }
-
function getRecipeFile() {
var msgData;
return Util.POST(AppConfig.EVENT.JOB.JOB_EDIT_ONE + newJobModel.getJobId(), msgObj);
}
- return Util.POST(getExportsUrl(), msgData)
+ return Util.POST(AppConfig.EVENT.PACKAGE.EXPORT, msgData)
.then(onSuccessGetRecipeFile)
.catch(onErrorGetRecipeFile);
}
return Util.POST(ANALYSIS_URL, postBody)
.then(function (result) {
- repoStore = result.data.repos;
- _updateRepo();
- return result.data;
+ if (result.result === 'true') {
+ repoStore = result.data.repos;
+ _updateRepo();
+ return result.data;
+ } else {
+ return Promise.reject(result.message);
+ }
});
}
.catch(function (reason) {
logger.error(reason);
Util.showLoadingDialog(false);
- Util.showAlertDialog('Failed to load package list.<br>Please check the tic-core.');
+ Util.showAlertDialog('Failed to load package list.<br>Please check the tic-core.<br>Error: ' + reason);
});
}
$('#tic-repository-apply').on('click', _applyRepoBtnHandler);