Skip to content
Snippets Groups Projects
Verified Commit 1d5f9578 authored by Alexander-Krause's avatar Alexander-Krause
Browse files

renaming to procezz

parent 15bbc593
No related branches found
No related tags found
No related merge requests found
Showing
with 72 additions and 73 deletions
......@@ -8,12 +8,12 @@ const {APP} = ENV;
/**
* This Adapter operates as communication abstraction for all network requests,
* that refer to Process objects. It provides functions for fetching,
* that refer to Agent objects. It provides functions for fetching,
* updating and uploading.
*
* TODO more description
*
* @class Process-Adapter
* @class Agent-Adapter
* @extends DS.JSONAPIAdapter
*
* @module explorviz.extension.discovery
......
......@@ -8,12 +8,12 @@ const {APP} = ENV;
/**
* This Adapter operates as communication abstraction for all network requests,
* that refer to Process objects. It provides functions for fetching,
* that refer to Procezz objects. It provides functions for fetching,
* updating and uploading.
*
* TODO more description
*
* @class Process-Adapter
* @class Procezz-Adapter
* @extends DS.JSONAPIAdapter
*
* @module explorviz.extension.discovery
......
import Component from '@ember/component';
import layout from '../templates/components/node-overview';
import { inject as service } from '@ember/service';
import processNameSelector from '../utils/helper/name-selector';
import procezzNameSelector from '../utils/helper/name-selector';
// Declare globals
/*global cytoscape*/
......@@ -64,7 +64,7 @@ export default Component.extend({
const emberModel = evt.target.data().emberModel;
if(emberModel) {
// closure action of discovery controller
// closure action of discovery controller
self.showDetails(emberModel);
}
......@@ -117,7 +117,7 @@ export default Component.extend({
'line-color': '#ddd',
'target-arrow-color': '#ddd'
})
.selector('.processes')
.selector('.procezzes')
.css({
'content': 'data(id)'
})
......@@ -207,25 +207,25 @@ export default Component.extend({
cy.add(agentAndEdge);
// look for processes and add to graph
const processes = agentRecord.get('processes');
processes.forEach((processRecord) => {
// look for procezzes and add to graph
const procezzes = agentRecord.get('procezzes');
procezzes.forEach((procezzRecord) => {
const processName = processNameSelector(processRecord);
const edgeID = processName + "To" + agentID;
const procezzName = procezzNameSelector(procezzRecord);
const edgeID = procezzName + "To" + agentID;
const processAndEdge = {
const procezzAndEdge = {
nodes: [
{ data: { id: processName, emberModel: processRecord},
classes: 'processes'
{ data: { id: procezzName, emberModel: procezzRecord},
classes: 'procezzes'
}
],
edges: [
{ data: { id: edgeID, source: processName, target: agentID } }
{ data: { id: edgeID, source: procezzName, target: agentID } }
]
};
cy.add(processAndEdge);
cy.add(procezzAndEdge);
});
......
import Component from '@ember/component';
import layout from '../templates/components/process-details';
import layout from '../templates/components/procezz-details';
import { inject as service } from "@ember/service";
export default Component.extend({
......@@ -9,8 +9,8 @@ export default Component.extend({
actions: {
saveProcess() {
this.get('process').save({include: 'agent'});
saveProcezz() {
this.get('procezz').save({include: 'agent'});
}
}
......
......@@ -4,18 +4,17 @@ import AlertifyHandler from 'explorviz-frontend/mixins/alertify-handler';
export default Controller.extend(AlertifyHandler, {
processList: [],
processForDetailView: null,
procezzList: [],
procezzForDetailView: null,
agentForDetailView: null,
renderingService: service("rendering-service"),
// closure action for node-overview component
showDetailsComponent(emberRecord) {
const modelName = emberRecord.constructor.modelName;
const possibleModels = ["process", "agent"];
const possibleModels = ["procezz", "agent"];
if(possibleModels.includes(modelName)) {
this.set(modelName + 'ForDetailView', emberRecord);
......@@ -28,49 +27,49 @@ export default Controller.extend(AlertifyHandler, {
this.set('renderingService.showTimeline', false);
this.resetState();
this.fetchProcessList();
//this.fetchprocezzList();
},
resetState() {
this.set('processList', null);
this.set('processForDetailView', null);
this.set('procezzList', null);
this.set('procezzForDetailView', null);
this.set('agentForDetailView', null);
},
fetchProcessList() {
/*fetchprocezzList() {
const self = this;
self.debug("start import ProcessList-request");
this.get('store').query("process", {}).then(success, failure).catch(error);
self.debug("start import procezzList-request");
this.get('store').query("procezz", {}).then(success, failure).catch(error);
function success(processList){
self.set('processList', self.preProcessListToPairs(processList.toArray()));
self.debug("end import ProcessList-request");
function success(procezzList){
self.set('procezzList', self.preprocezzListToPairs(procezzList.toArray()));
self.debug("end import procezzList-request");
}
function failure(e){
self.showAlertifyMessage("ProcessList couldn't be requested!" +
self.showAlertifyMessage("procezzList couldn't be requested!" +
" Backend offline?");
self.debug("ProcessList couldn't be requested!", e);
self.debug("procezzList couldn't be requested!", e);
}
function error(e){
self.debug("Error when fetching ProcessList: ", e);
self.debug("Error when fetching procezzList: ", e);
}
},
},*/
preProcessListToPairs(list) {
const preProcessedPairs = [];
preprocezzListToPairs(list) {
const preprocezzedPairs = [];
for(let i = 0; i < list.length; i += 2)
{
preProcessedPairs.push(list.slice(i, i + 2));
preprocezzedPairs.push(list.slice(i, i + 2));
}
return preProcessedPairs;
return preprocezzedPairs;
}
});
......@@ -20,6 +20,6 @@ export default BaseModel.extend({
ip: attr("string"),
port: attr("string"),
processes: hasMany("process")
procezzes: hasMany("procezz")
});
File moved
File moved
......@@ -37,7 +37,7 @@ export default Reload.extend(AlertifyHandler, {
const self = this;
this.debug("start agents-request");
this.get("store").findAll('agent', {include: 'processes'})
this.get("store").findAll('agent', {include: 'procezzes'})
.then(success, failure).catch(error);
//--------------inner functions--------------
......
<div class="panel-group">
<div class="panel panel-default">
<div data-toggle="collapse" data-target="#collapse{{process.id}}" class="panel-heading container-shadow" style="cursor:pointer">
<div data-toggle="collapse" data-target="#collapse{{procezz.id}}" class="panel-heading container-shadow" style="cursor:pointer">
<h4 class="panel-title">
<a data-toggle="collapse" href="#collapse{{process.id}}">
{{name-selector process.pid process.applicationName}}
<a data-toggle="collapse" href="#collapse{{procezz.id}}">
{{name-selector procezz.pid procezz.applicationName}}
</a>
</h4>
</div>
<div id="collapse{{process.id}}" class="panel-collapse collapse">
<div id="collapse{{procezz.id}}" class="panel-collapse collapse">
<div class="panel-body">
<div class="container-fluid">
<table class="table table-striped">
......@@ -19,51 +19,51 @@
</thead>
<tbody>
<tr>
<td><b>Process ID</b></td>
<td>{{process.pid}}</td>
<td><b>Procezz ID</b></td>
<td>{{procezz.pid}}</td>
</tr>
<tr>
<td><b>Name</b></td>
<td>
{{input class="form-control" value=process.applicationName}}
{{input class="form-control" value=procezz.applicationName}}
</td>
</tr>
<tr>
<td><b>Working Directory</b></td>
<td>
<div class="well well-sm container-word-wrap">
{{process.workingDirectory}}
{{procezz.workingDirectory}}
</div>
</td>
</tr>
<tr>
<td><b>Monitoring Active</b></td>
<td>
{{input type="checkbox" checked=process.monitoredFlag}}
{{input type="checkbox" checked=procezz.monitoredFlag}}
</td>
</tr>
<tr>
<td><b>Is web server?</b></td>
<td>
{{input type="checkbox" checked=process.webserverFlag}}
{{input type="checkbox" checked=procezz.webserverFlag}}
</td>
</tr>
<tr>
<td><b>User-defined Execution Command</b></td>
<td>
{{input class="form-control" style="height: auto;" value=process.userExecutionCommand}}
{{input class="form-control" style="height: auto;" value=procezz.userExecutionCommand}}
</td>
</tr>
<tr>
<td><b>Execution Command</b></td>
<td>
<div class="well well-sm container-word-wrap">{{process.osExecutionCommand}}
<div class="well well-sm container-word-wrap">{{procezz.osExecutionCommand}}
</div>
</td>
</tr>
</tbody>
</table>
<button type="button" class="btn btn-success" {{action "saveProcess"}}>Save</button>
<button type="button" class="btn btn-success" {{action "saveProcezz"}}>Save</button>
</div>
</div>
</div>
......
{{#if processForDetailView}}
{{process-details process=processForDetailView}}
{{#if procezzForDetailView}}
{{procezz-details procezz=procezzForDetailView}}
{{else if agentForDetailView}}
TODO
{{else}}
......@@ -8,11 +8,11 @@
<!-- <div class="container-fluid pre-scrollable" style="min-height: 100%;">
<!-- {{#each processList as |processPair|}}
<!-- {{#each procezzList as |procezzPair|}}
<div class="row">
{{#each processPair as |process|}}
{{#each procezzPair as |procezz|}}
<div class="col-md-6">
{{process-details process=process}}
{{procezz-details procezz=procezz}}
</div>
{{/each}}
</div>
......
export { default } from 'explorviz-frontend-extension-discovery/adapters/process';
export { default } from 'explorviz-frontend-extension-discovery/adapters/procezz';
export { default } from 'explorviz-frontend-extension-discovery/components/process-details';
\ No newline at end of file
export { default } from 'explorviz-frontend-extension-discovery/components/procezz-details';
\ No newline at end of file
export { default } from 'explorviz-frontend-extension-discovery/models/process';
export { default } from 'explorviz-frontend-extension-discovery/models/procezz';
export { default } from 'explorviz-frontend-extension-discovery/serializers/process';
export { default } from 'explorviz-frontend-extension-discovery/serializers/procezz';
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('process-details', 'Integration | Component | process details', {
moduleForComponent('procezz-details', 'Integration | Component | procezz details', {
integration: true
});
......@@ -9,15 +9,15 @@ test('it renders', function(assert) {
// Set any properties with this.set('myProperty', 'value');
// Handle any actions with this.on('myAction', function(val) { ... });
this.render(hbs`{{process-details}}`);
this.render(hbs`{{procezz-details}}`);
assert.equal(this.$().text().trim(), '');
// Template block usage:
this.render(hbs`
{{#process-details}}
{{#procezz-details}}
template block text
{{/process-details}}
{{/procezz-details}}
`);
assert.equal(this.$().text().trim(), 'template block text');
......
import { moduleFor, test } from 'ember-qunit';
moduleFor('adapter:process', 'Unit | Adapter | process', {
moduleFor('adapter:procezz', 'Unit | Adapter | procezz', {
// Specify the other units that are required for this test.
// needs: ['serializer:foo']
});
......
import { moduleForModel, test } from 'ember-qunit';
moduleForModel('process', 'Unit | Model | process', {
moduleForModel('procezz', 'Unit | Model | procezz', {
// Specify the other units that are required for this test.
needs: []
});
......
import { moduleForModel, test } from 'ember-qunit';
moduleForModel('process', 'Unit | Serializer | process', {
moduleForModel('procezz', 'Unit | Serializer | procezz', {
// Specify the other units that are required for this test.
needs: ['serializer:process']
needs: ['serializer:procezz']
});
// Replace this with your real tests.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment