내 목표는 대시 보드의 랠리 눈금을 사용하는 커스텀 HTML 앱에서 일부 맞춤 포트폴리오 항목 (이그 제 큐 티브 챔피언이라고 함)을 표시하는 것입니다. 나는 문서들과 몇 가지 예들을 살펴 보았고 이것이 가능한 것처럼 보이지 않는다. 아무도 이것을 성취하지 못했습니까? 내 코드는 다음과 같습니다. 나는 다음을 사용하여 https://github.com/davidpthomas/BasicRallyGrid을 시작했다.맞춤 HTML 애플리케이션을 사용할 때 랠리 그리드에 맞춤 포트폴리오 필드를 표시 할 수 있습니까?
<!DOCTYPE html>
<html>
<head>
<title>BasicRallyGrid</title>
<script type="text/javascript" src="/apps/2.0rc2/sdk.js"></script>
<script type="text/javascript">
Rally.onReady(function() {
// Custom Rally App that displays Stories in a grid.
//
// Note: various console debugging messages intentionally kept in the code for learning purposes
Ext.define('CustomApp', {
extend: 'Rally.app.App', // The parent class manages the app 'lifecycle' and calls launch() when ready
componentCls: 'app', // CSS styles found in app.css
// Entry Point to App
launch: function() {
console.log('our first app'); // see console api: https://developers.google.com/chrome-developer-tools/docs/console-api
this._loadData(); // we need to prefix with 'this.' so we call a method found at the app level.
},
// Get data from Rally
_loadData: function() {
var myStore = Ext.create('Rally.data.wsapi.Store', {
model: 'PortfolioItem',
autoLoad: true, // <----- Don't forget to set this to true! heh
listeners: {
load: function(myStore, myData, success) {
console.log('got data!', myStore, myData);
this._loadGrid(myStore); // if we did NOT pass scope:this below, this line would be incorrectly trying to call _createGrid() on the store which does not exist.
},
scope: this // This tells the wsapi data store to forward pass along the app-level context into ALL listener functions
},
fetch: ['Executive Champion', 'Name', 'ScheduleState'] // Look in the WSAPI docs online to see all fields available!
});
},
// Create and Show a Grid of given stories
_loadGrid: function(myStoryStore) {
var myGrid = Ext.create('Rally.ui.grid.Grid', {
store: myStoryStore,
columnCfgs: [
'Executive Champion', 'Name', 'ScheduleState'
]
});
this.add(myGrid);
console.log('what is this?', this);
}
});
Rally.launchApp('CustomApp', {
name:"BasicRallyGrid",
parentRepos:""
});
});
</script>
<style type="text/css">
.app {
/* Add app styles here */
}
</style>
</head>
<body></body>
</html>
당신은 무엇을하려고 했습니까? – ciuak
내가 사용한 코드가 업데이트되었습니다. – user3869933