{"action":"created","issue":{"url":"https://api.github.com/repos/kimchi-project/ginger/issues/317","repository_url":"https://api.github.com/repos/kimchi-project/ginger","labels_url":"https://api.github.com/repos/kimchi-project/ginger/issues/317/labels{/name}","comments_url":"https://api.github.com/repos/kimchi-project/ginger/issues/317/comments","events_url":"https://api.github.com/repos/kimchi-project/ginger/issues/317/events","html_url":"https://github.com/kimchi-project/ginger/issues/317","id":148512929,"number":317,"title":"Ginger should NOT depeden on Ginger s390x","user":{"login":"alinefm","id":4921718,"avatar_url":"https://avatars.githubusercontent.com/u/4921718?v=3","gravatar_id":"","url":"https://api.github.com/users/alinefm","html_url":"https://github.com/alinefm","followers_url":"https://api.github.com/users/alinefm/followers","following_url":"https://api.github.com/users/alinefm/following{/other_user}","gists_url":"https://api.github.com/users/alinefm/gists{/gist_id}","starred_url":"https://api.github.com/users/alinefm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alinefm/subscriptions","organizations_url":"https://api.github.com/users/alinefm/orgs","repos_url":"https://api.github.com/users/alinefm/repos","events_url":"https://api.github.com/users/alinefm/events{/privacy}","received_events_url":"https://api.github.com/users/alinefm/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kimchi-project/ginger/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/kimchi-project/ginger/labels/UI","name":"UI","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-04-14T23:41:12Z","updated_at":"2016-04-15T12:43:08Z","closed_at":null,"body":"While testing Ginger, I noticed the \"Storage Devices\" section has an Add button. When selecting it I got the following view:\r\n\r\n![2a570d30bc942edb](https://cloud.githubusercontent.com/assets/4921718/14547100/cd266a14-0280-11e6-965a-8ee927dd6f4a.jpg)\r\n\r\nAs you can suppose, I am not running Ginger s390x and because that the 404 Not Found error.\r\n\r\nAfter that, looking at the code, I notice Ginger UI is doing requests to Ginger s390x API.\r\n**AFAIK, Ginger should not depend on Ginger s390x, right?**\r\n\r\nIMO it needs to be fixed ASAP.\r\n\r\n```\r\nui/js/host-network.js:        if ($.inArray(\"gingers390x\", result) != -1) {\r\nui/js/host-network.js:          wok.window.open('plugins/gingers390x/network.html');\r\nui/js/host-network.js:  // Remove button \"Add Adapter\" in case of architecture != s390x\r\nui/js/host-network.js:  if (ginger.hostarch != \"s390x\") {\r\nui/js/host-network.js:    if (ginger.hostarch != \"s390x\") {\r\nui/js/host-network.js:  // check architecture and gingers390x plugin for ethernet deletion\r\nui/js/host-network.js:  if (ginger.hostarch == 's390x') {\r\nui/js/host-network.js:      if ($.inArray(\"gingers390x\", result) != -1) {\r\nui/js/host-network.js:        // display message asking user to install gingers390x plugin to avail delete Ethernet interfaces functionality\r\nui/js/host-network.js:      // failed check gingers390x plugin\r\nui/js/host-network.js:    // if not s390x architecture, display error message that deletion of ethernet\r\nui/js/host-storage.js:      if ((ginger.hostarch == \"s390x\") && ($.inArray(\"gingers390x\", result) != -1)) {\r\nui/js/host-storage.js:  if (ginger.hostarch == 's390x') {\r\nui/js/host-storage.js:    if ((ginger.hostarch == \"s390x\") && ($.inArray(\"gingers390x\", result) != -1)) {\r\nui/js/host-storage.js:      wok.window.open('plugins/gingers390x/fcpsanadapter.html');\r\nui/js/host-storage.js:        $('#sd-add-FCP-button').attr('href', 'plugins/gingers390x/addFCPLuns.html');\r\nui/js/host-storage.js:        wok.window.open('plugins/gingers390x/eckd.html');\r\nui/js/host-storage.js:      if ((ginger.hostarch == \"s390x\") && ($.inArray(\"gingers390x\", result) != -1)) {\r\nui/js/util.js:s390xtrackingTasks = [];\r\nui/js/util.js:      ginger.tracks390xTask(taskID, suc, err, progress);\r\nui/js/util.js:      url : 'plugins/gingers390x/nwdevices/' + name + '/unconfigure',\r\nui/js/util.js:        url : 'plugins/gingers390x/lstapes',\r\nui/js/util.js:        url : \"/plugins/gingers390x/storagedevices/\"+ busId +\"/offline\",\r\nui/js/util.js:        url : \"/plugins/gingers390x/fcluns/\"+ lunPath,\r\nui/js/util.js:ginger.gets390xTask = function(taskId, suc, err) {\r\nui/js/util.js:      url: 'plugins/gingers390x/tasks/' + encodeURIComponent(taskId),\r\nui/js/util.js:ginger.tracks390xTask = function(taskID, suc, err, progress) {\r\nui/js/util.js:                ginger.tracks390xTask(taskID, suc, err, progress);\r\nui/js/util.js:    ginger.gets390xTask(taskID, onTaskResponse, err);\r\nui/js/util.js:    if(s390xtrackingTasks.indexOf(taskID) < 0)\r\nui/js/util.js:        s390xtrackingTasks.push(taskID);\r\nui/js/util.js:    url: 'plugins/gingers390x/lunscan',\r\nui/pages/help/en_US/host-storage.dita:<dd>FCP Tape device is any computing hardware that is used for storing, porting and extracting data files and objects. This feature is available for s390x architecture.</dd>\r\nui/pages/help/en_US/host-storage.dita:<dd>A SAN Adapter is IO device used to connect to the remote SAN storage devices. This feature is available for s390x architecture.</dd>\r\nui/pages/i18n.json.tmpl:    \"GINNET0014M\": \"$_(\"Plugin Ginger s390x not installed. Please install plugin 'Ginger s390x' to avail 'Add Adapter' functionality\")\",\r\nui/pages/i18n.json.tmpl:    \"GINNET0029M\": \"$_(\"Please install plugin 'Ginger s390x' to avail 'Delete' functionality for Ethernet interface.\")\",\r\nui/pages/i18n.json.tmpl:    \"GINNET0031M\": \"$_(\"Failed to verify 'Ginger s390x' plugin installation. Please try again.\")\",\r\n```\r\n\r\nThe last errors messages scares me about making Ginger s390x a Ginger dependency,"},"comment":{"url":"https://api.github.com/repos/kimchi-project/ginger/issues/comments/210449339","html_url":"https://github.com/kimchi-project/ginger/issues/317#issuecomment-210449339","issue_url":"https://api.github.com/repos/kimchi-project/ginger/issues/317","id":210449339,"user":{"login":"danielhb","id":866780,"avatar_url":"https://avatars.githubusercontent.com/u/866780?v=3","gravatar_id":"","url":"https://api.github.com/users/danielhb","html_url":"https://github.com/danielhb","followers_url":"https://api.github.com/users/danielhb/followers","following_url":"https://api.github.com/users/danielhb/following{/other_user}","gists_url":"https://api.github.com/users/danielhb/gists{/gist_id}","starred_url":"https://api.github.com/users/danielhb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielhb/subscriptions","organizations_url":"https://api.github.com/users/danielhb/orgs","repos_url":"https://api.github.com/users/danielhb/repos","events_url":"https://api.github.com/users/danielhb/events{/privacy}","received_events_url":"https://api.github.com/users/danielhb/received_events","type":"User","site_admin":false},"created_at":"2016-04-15T12:43:08Z","updated_at":"2016-04-15T12:43:08Z","body":"Let's talk about the user experience point of view. I have a s390x machine and want to try Ginger. Ginger depends on WoK and Gingerbase, thus I install Wok+Gingerbase+Ginger. \"Add Adapter\" button will show because the check is being made for arch = 's390x' instead of checking for gingers390x. The 'onClick' will not work because is checking for gingers390x.\r\n\r\nSo I'll have a button that does nothing because I haven't installed gingers390x and no way of knowing why it's not working. We can't take for granted that anyone running Ginger in s390x will have the Gingers390x plug-in. The UI isn't helping either, it's not informing the user about the missing plug-in, thus the user will not even be aware that it's missing. This is a true user experience problem but can be amended by adding gingers390x all over the place.\r\n\r\nThe other problem, however,  is more complex and it concerns more about Gingers390x than Ginger. Ginger devs can look at this UI code, think 'wow I do not like this', turn a blind eye and that's it. What about the gingers390x devs? This dev will have an API that's implemented in Gingers390x but the UI is in Ginger. Any backend change in this API in gingers390x will require a UI update in Ginger. I know that today we're talking about the same community, even the same maintainer. However it can be different in the future. Perhaps gingers390x will grow and get its own community, maintainer and agenda apart from Ginger. When you think in these terms having an API in one plug-in and the UI in the other will compromise Gingers390x development directly.\r\n\r\nI understand that both (1) and (2) options have drawbacks but, for the sake of the Gingers390x coding experience, we can't have the backend there and the UI in Ginger. I will not say  that this is a urgent, must fix now bug, but definitely this is something we'll need fixing rather sooner than later."}}