These are chat archives for allegro/ralph

30th
Apr 2015
Linux-Dream
@Linux-Dream
Apr 30 2015 03:44
Add Device -> User Info Block : User、Owner field map to which table in admin mode
no matter what i input and save it, no error in page, but the User and Owner is still blank..
Uncaught Error: Mismatched anonymous define() module: function ($) {
(function() {
'use strict';
if ($(window).width() < 768) {
$(window).load(function() {
// Re-allign data center information in the mobile app
// to the top. To be changed later to correctly reallign
// using native views api.
$('div.additional-info').insertBefore('div.basic-info');
})
}
})();
}
require.8daafb4058c5.js: line 8
flashput
@flashput
Apr 30 2015 04:51
is there a complete manual about updating the manual installation of ralph?
Mateusz Kurek
@mkurek
Apr 30 2015 05:50
hard to say - there is something in our documentation (http://ralph.readthedocs.org/en/latest/installation.html#upgrading-an-existing-installation) but it assumes that you have ralph installed from packages or using docker. If you have ralph installed from sources then everything you need to is pull newest version of all packages (git pull), install each package (make install), run migrations (ralph migrate) and collect static files (ralph collecstatic)
*ralph collectstatic
flashput
@flashput
Apr 30 2015 05:52
that’s all I have to do?
Linux-Dream
@Linux-Dream
Apr 30 2015 05:53
what i use yesterday evening is show how to do this
Mateusz Kurek
@mkurek
Apr 30 2015 05:53
@flashput i think so
@Linux-Dream about user/owner?
Linux-Dream
@Linux-Dream
Apr 30 2015 05:54
this page "/assets/dc/add/device/"
user field and owner filed in user info block
i don't know how to install it
input it
flashput
@flashput
Apr 30 2015 05:57

@mkurek @Linux-Dream

!/bin/sh

projects=(
allegro:ralph
allegro:ralph_assets
allegro:ralph_pricing
allegro:django-bob
)

for project in ${projects[@]}
do
group=echo $project | cut -d ':' -f 1
name=echo $project | cut -d ':' -f 2
rm -rf $name
/usr/bin/git clone https://github.com/${group}/${name}.git
cd $name
/usr/bin/python2.7 setup.py build
/usr/bin/python2.7 setup.py install
cd ..
done
then i drop database ralph
1 ralph syncdb --all
2 ralph migrate --fake
3 pip install bob-ajax-selects
4 ralph collectstatic
4 ralph makeconf -f
5 ralph collectstatic
6 ralph run_gunicorn ip:8000 --debug

this procedure?
Mateusz Kurek
@mkurek
Apr 30 2015 05:58
this procedure is only for installing it first time - when upgrading you don't have to syncdb, fake migrations, makeconf etc
@Linux-Dream probably there are all users from admin/auth/user/
Linux-Dream
@Linux-Dream
Apr 30 2015 06:00
upgrading , you do ralph syncdb and ralph migrations --fake is no harm, i think
flashput
@flashput
Apr 30 2015 06:02
I have data existing in my database, and configuration file, python codes. I have to make sure every operation do no harm to my data.
Mateusz Kurek
@mkurek
Apr 30 2015 06:02
syncdb shouldn't make any mess if you run it without --all flag, but faking migrations could unsynchronize your code and database - so when upgrade run only ralph migrate to deal with database
@flashput so first of all - make backups :) when you sync to code from develop branch it might be a little bit unstable so maybe it'll be better to install ralph from master branch or pypi packages on production servers
Linux-Dream
@Linux-Dream
Apr 30 2015 07:20
Add devices has four part content need to fill. "Basic Info" "Financial Info" "User Info" "Additional Info"
what's the field in "User info"? the "user " field and "owner" field i don't know how to write
Linux-Dream
@Linux-Dream
Apr 30 2015 07:33
blob
this field, no matter what i input and click "save" button, it save successful, but the input control is still blank
Mateusz Kurek
@mkurek
Apr 30 2015 07:34
we're using it only for backoffice assets
leave it empty
Linux-Dream
@Linux-Dream
Apr 30 2015 07:35
i just use back office
url is : assets/back_office/edit/device/1/
Mateusz Kurek
@mkurek
Apr 30 2015 07:36
ok - so user and owner are autocomplete fields - you have to add users in admin to see something in this field (after typing few letters)
Linux-Dream
@Linux-Dream
Apr 30 2015 07:37
i need to know which filed is, in amdin mode
i almost find all the field and input some name,but no autocomplete
Mateusz Kurek
@mkurek
Apr 30 2015 07:38
amdin?
Linux-Dream
@Linux-Dream
Apr 30 2015 07:38
asset owner is not worked for me.
admin mode means click "admin" in right top corner
blob
i add some user name in "Aseet owners",but still no autocompelte in "Basic Info" fields
the asset models is worked now after i updated all the code..
Mateusz Kurek
@mkurek
Apr 30 2015 07:50
Asset owners are used in back office mode in field 'property of'. To fill user and owner fields you have to add users to Ralph (admin > auth > users)
Linux-Dream
@Linux-Dream
Apr 30 2015 07:54
blob
Mateusz Kurek
@mkurek
Apr 30 2015 07:54
do you have any user that starts with 'li'?
or have 'li' substring at all?
Linux-Dream
@Linux-Dream
Apr 30 2015 07:55
yeah
Mateusz Kurek
@mkurek
Apr 30 2015 07:56
any error in browser console?
Linux-Dream
@Linux-Dream
Apr 30 2015 07:56
may be the privileges problem
Mateusz Kurek
@mkurek
Apr 30 2015 07:56
don't think so - rather js error
Linux-Dream
@Linux-Dream
Apr 30 2015 07:57
Uncaught Error: Mismatched anonymous define() module: function ($) {
(function() {
'use strict';
if ($(window).width() < 768) {
$(window).load(function() {
// Re-allign data center information in the mobile app
// to the top. To be changed later to correctly reallign
// using native views api.
$('div.additional-info').insertBefore('div.basic-info');
})
}
})();
}
just this error in file require.8daafb4058c5.js: line 8
Mateusz Kurek
@mkurek
Apr 30 2015 07:59
do you have any traceback here?
Linux-Dream
@Linux-Dream
Apr 30 2015 08:04
no
i am not familiar with frontend, so i don't know how to provide js traceback
Mateusz Kurek
@mkurek
Apr 30 2015 08:08
could you paste here your content of <RALPH_URL>/static/assets/js/mobile.js ?
Linux-Dream
@Linux-Dream
Apr 30 2015 08:08
{"url": "/assets/user/details/dengjingbiao/", "pk": "3", "match": "\n <span> </span>\n <span class=\"asset-user-department\"></span>\n ", "value": 3, "repr": "\n <span> </span>\n <span class=\"asset-user-department\"></span>\n "}
the request has been sent to server, and browser also get the response
Mateusz Kurek
@mkurek
Apr 30 2015 08:11
ok - you have to fill first name and last name in user profile to see it in autocomplete
Linux-Dream
@Linux-Dream
Apr 30 2015 08:11
it worked, thank u..
this is culture differences, china usually doesn't has first name and last name in a system..
Mateusz Kurek
@mkurek
Apr 30 2015 08:14
so what name-system do you use?
Linux-Dream
@Linux-Dream
Apr 30 2015 08:15
just user name =。=
usually id and username
Mateusz Kurek
@mkurek
Apr 30 2015 08:16
so you can just fill first name (and leave last name empty) - copy value from username to first name field
Linux-Dream
@Linux-Dream
Apr 30 2015 08:16
sometimes is login name and nickname
ok,i know how to handle it now,thank u vevry much
Linux-Dream
@Linux-Dream
Apr 30 2015 08:24
blob
Mateusz Kurek
@mkurek
Apr 30 2015 08:47
it's not so easy for now - you have to add CI (/cmdb/add/) with type 'Service' (name of CI is name of service). You have to add environments analogously (use type 'Environment'). When you add them, you have to connect them using CMDB relations: cmdb/search?uid=&type=7&parent= - find you service here, go to relations tab, click 'Edit this CI', and then 'Add new child relation'. In child field type your environment name and choose relation type 'Contains'
Linux-Dream
@Linux-Dream
Apr 30 2015 09:19
it worked! thank u.
I got this error in runtime.log when doing autoscan
@mkurek any idea?
damian1976
@damian1976
Apr 30 2015 09:36
@flashput hi, please use dpaste.com or simiilar copy/paste logs. otherwise it's difficult to go through the chat history...:)
flashput
@flashput
Apr 30 2015 09:36
OK
flashput
@flashput
Apr 30 2015 09:43
log edited
Mateusz Kurek
@mkurek
Apr 30 2015 09:59
@flashput make sure that you have properly configured queues: first of all check your RQ_QUEUE_LIST in settings and make sure that queues defined in <RALPH_URL>/admin/discovery/discoveryqueue/ are on that list. Then check your environments (/admin/discovery/environment/) if they have set queue.
✪ vi4m Marcin Kliks
@vi4m
Apr 30 2015 10:20
@mkurek @flashput you can make first code contribution to the open source project by handling this exception the better way - just try: except KeyError and print some error message ("You forgot to add DQ-Office-Infrastructure-D into the settings file")
Mateusz Kurek
@mkurek
Apr 30 2015 10:39
ask @andrzej-jankowski first - maybe if queue is not found in settings there should be fallback to default queue?
✪ vi4m Marcin Kliks
@vi4m
Apr 30 2015 12:55
We do default queue with rocke
with docket
Fucking iPhone autocompletion. I meant Docker.